Wiki source code of 13 Positioning control

Version 1.1 by Leo Wei on 2022/06/08 12:57

Show last authors
1 = **6.13.1 DABS instruction** =
2
3 **Instruction description**
4
5 (% border="1" %)
6 |**Name**|**Function**|**Bits(bits)**|**Pulse type**|**Instruction format**|**Step**
7 |DABS|Absolute current value read|32|No|DABS S D,,1,, D,,2,,|13
8
9 This instruction reads the absolute position data when a servo motor with absolute positioning function is connected.
10
11 * S: The first of three inputs used for communication flags;
12 * D,,1,,: The first of three communication outputs;
13 * D,,2,,: The data destination registers;
14
15 (% border="1" %)
16 |(% rowspan="2" %)**Operands**|(% colspan="4" %)**Bit device**|(% colspan="12" %)**Word device**
17 |X|Y|M|S|K|H|E|KnX|KnY|KnM|KnS|T|C|D|V|Z
18 |S|√|√|√|√| | | | | | | | | | | |
19 |D,,1,,| |√|√|√| | | | | | | | | | | |
20 |D,,2,,| | | | | | | | |√|√|√|√|√|√|√|√
21
22 **Program example**
23
24 (% style="text-align:center" %)
25 [[image:7-12Positioning control_html_b6a870d9f81963bb.jpg||class="img-thumbnail" height="59" width="400"]]
26
27 Corresponding wiring as shown below, it shows servos drive with absolute position detection of the encoder servo motor.
28
29 (% style="text-align:center" %)
30 [[image:7-12Positioning control_html_73c8f43269dde3a3.jpg||class="img-thumbnail" height="234" width="600"]]
31
32 * When M10 is set to ON, it begins to read. When DABS instruction is completed, the M8029 flag is set to ON;
33 * When the instruction is running in process and the driver flag is set to OFF, the read operation will be interrupted;
34 * The programming example for reading ABS data is as follows: when the X6 terminal is closed, it begins to read. If it is not completed in 5s, the timeout flag M21 will be set. The demo is as following:
35
36 (% style="text-align:center" %)
37 [[image:7-12Positioning control_html_df5c5753d6434a33.jpg||class="img-thumbnail" height="182" width="400"]]
38
39 The signal time sequence of the ABS read operation is shown in the following figure. When implementing an instruction, the PLC will automatically implement the access operation with servo driver.
40
41 (% style="text-align:center" %)
42 [[image:7-12Positioning control_html_87cef258a20fd646.jpg||class="img-thumbnail" height="314" width="600"]]
43
44 = **6.13.2 ZRN instruction** =
45
46 **Instruction description**
47
48 (% border="1" %)
49 |**Name**|**Function**|**Bits(bits)**|**Pulse type**|**Instruction format**|**Step**
50 |ZRN|(% rowspan="2" %)Return to home point|16|No|(% rowspan="2" %)ZRN S,,1,, S,,2,, S,,3,, D|9
51 |DZRN|32|No|13
52
53 When executing incremental or absolute positioning, the PLC stores the current position values which increase or decrease during operation. Using these values, the PLC always knows the machine position. When the power to the PLC is turned off, this data would be lost. To cope with this the machine should return to the zero point when the power is turned ON, or during initial set up, to teach the zero position.
54
55 * S,,1,,: The Zero Return Speed, the range is 10~~32,767Hz (16bit), 10~~100,000Hz (32bit);
56 * S,,2,,: The Creep Speed, the range is 10~~32,767Hz;
57 * S,,3,,: The Near Point Signal;
58 * D: The Pulse Output Designation, Y0~~Y3 are for LX3V (2N firmware), LX3VP, LX3VE, Y0~~Y1 are for LX3V (1S firmware);
59
60 If the setting exceeds the highest frequency, it will run at the highest frequency, if it is set lower than the lowest frequency, it will run at the lowest frequency. Refer to DRVA (absolute positioning instruction) for the deceleration time and minimum frequency setting of this instruction.
61
62 (% border="1" %)
63 |(% rowspan="2" %)**Operands**|(% colspan="4" %)**Bit device**|(% colspan="12" %)**Word device**
64 |X|Y|M|S|K|H|E|KnX|KnY|KnM|KnS|T|C|D|V|Z
65 |S,,1,,| | | | |√|√| |√|√|√|√|√|√|√|√|√
66 |S,,2,,| | | | |√|√| |√|√|√|√|√|√|√|√|√
67 |S,,3,,|√|√|√|√| | | | | | | | | | | |
68 |D| |√| | | | | | | | | | | | | |
69
70 **Program example**
71
72 (% style="text-align:center" %)
73 [[image:7-12Positioning control_html_234d2dd18d59229.jpg||class="img-thumbnail" height="57" width="400"]]
74
75 This instruction means that, after M10 turns ON, PLC sends out pulses at speed of 1000Hz fromY0, which makes stepper motor run back toward original point. While when X3 (DOG) turns ON, the output pulse frequency turns into 80Hz creep speed, until X3(DOG) turns OFF again, and Y0 stops to output pulse, and write 0 to the current value register (Y000: [D8141, D8140], Y001: [D8143, D8142]). In addition, when M8140 (clear signal output function) is ON, a clear signal is output at the same time. Subsequently, when the execution completion flag (M8029) is turned ON, the monitoring of the pulse output (Y000: [M8147], Y00l: [M8148]) becomes OFF.
76
77 (% style="text-align:center" %)
78 [[image:7-12Positioning control_html_1bcca6c378295301.jpg||class="img-thumbnail" height="308" width="600"]]
79
80 During this instruction is executed, systemic variables concerned are:
81
82 * D8141 (high byte), D8140 (low byte):Y000 outputs value of current register (using 32-bit)
83 * D8143 (high byte), D8142 (low byte):Y001 outputs value of current register (using 32-bit)
84 * M8145: Y000 represents the pulse output stopped (instantly)
85 * M8146: Y001 represents the pulse output stopped (instantly)
86 * M8147: Y000 represents monitoring during the pulse output process (BUSY/READY)
87 * M8148:Y001 represents monitoring during the pulse output process (BUSY/READY)
88
89 Since servo driver has the function of power-fail-safeguard towards location information, this command does not need to execute after power-on every time. Meanwhile, for servo driver could only move one way, movement of backing to original point must be done before DOG.
90
91 = **6.13.3 DRVI instruction** =
92
93 **Instruction description**
94
95 (% border="1" %)
96 |**Name**|**Function**|**Bits(bits)**|**Pulse type**|**Instruction format**|**Step**
97 |DRVI|(% rowspan="2" %)Increment positioning|16|No|(% rowspan="2" %)DRVI S,,1,, S,,2,, D,,1,, D,,2,,|9
98 |DDRVI|32|No|17
99
100 This instruction is for single speed positioning in the form of incremental movements.
101
102 * S,,1,,: The number of pulses, the range is 16-bit -32,768 to 32,767 pulses or 32-bit -2,147,483,648 to 2,147,483,647 pulses;
103
104 If D,,1,,=Y0, [D8141 (high byte), D8140 (low byte)] (32-bit) are increment position;
105
106 If D,,1,,=Y1, [D8143 (high byte), D8142 (low byte)] (32-bit) are increment position;
107
108 If D,,1,,=Y2, [D8151 (high byte), D8150 (low byte)] (32-bit) are increment position;
109
110 If D,,1,,=Y3, [D8153 (high byte), D8152 (low byte)] (32-bit) are increment position;
111
112 * S,,2,,: The output frequency, the range is 16-bit 10 to 32,767Hz or 32-bit 10 to 200 kHz; The set value exceeds the highest frequency and runs at the highest frequency. The set value is less than the lowest frequency and runs at the lowest frequency.
113 * D,,1,,: The Pulse Output Designations, only Y000 or Y001or Y002 or Y003 in LX3V (2N firmware), LX3VP, LX3VE and LX3VM could be used for the pulse output. Only Y000 or Y001 in LX3V (1S firmware) could be used for the pulse output.
114 * D,,2,,: The rotation direction signal. If D,,2,,= OFF, rotation = negative, if D,,2,,= ON, rotation = positive.
115
116 (% border="1" %)
117 |(% rowspan="2" %)**Operands**|(% colspan="4" %)**Bit device**|(% colspan="12" %)**Word device**
118 |X|Y|M|S|K|H|E|KnX|KnY|KnM|KnS|T|C|D|V|Z
119 |S,,1,,| | | | |√|√| |√|√|√|√|√|√|√|√|√
120 |S,,2,,| | | | |√|√| |√|√|√|√|√|√|√|√|√
121 |D,,1,,| |√| | | | | | | | | | | | | |
122 |D,,2,,| |√|√|√| | | | | | | | | | | |
123
124 If the contents of an operand are changed while the instruction is executed, it is not reflected on the operation. The new contents become effective when the instruction is next driven.
125
126 If the instruction drive contact turns off while the instruction is being executed, the machine decelerates and stops. At this time the execution complete flag M8029 does not turn ON.
127
128 Once the instruction drive contact is off, re-drive of the instruction is not possible while the pulse output flag (Y000: [M8147], Y001: [M8148]) is ON.
129
130 **Program example**
131
132 (% style="text-align:center" %)
133 [[image:7-12Positioning control_html_24c4682530955744.jpg||class="img-thumbnail" height="48" width="400"]]
134
135 With 30000 pulses exported from the Y0 port at the frequency of 4 kHz, the external server allows the machine to operate in directions that are determined by Y3.
136
137 (% style="text-align:center" %)
138 [[image:7-12Positioning control_html_88c541f9c4fe0315.jpg||class="img-thumbnail" height="172" width="600"]]
139
140 (% style="text-align:center" %)
141 [[image:7-12Positioning control_html_f4e1cc2757bc52c9.jpg||class="img-thumbnail" height="339" width="800"]]
142
143 During the pulse output, the frequency will increase or decrease according to the predetermined value.
144
145 The minimum value of output pulse frequency which could be actually used is determined by the following equation.
146
147 (% style="text-align:center" %)
148 [[image:7-12Positioning control_html_b97453e7feb82438.jpg||class="img-thumbnail" height="30" width="600"]]
149
150 Even if the assigned value is lower than the above calculated result, the frequency to be exported will still be the calculated value. The frequencies in the initial stage of acceleration and in the final section of deceleration must not be lower than the above calculated result.
151
152 During the instruction execution, the involved system variables are as follows:
153
154 * [D8145]: Base speed when executing DRVI and DRVA instructions. During the operation of stepping motor, the stepping motor's resonance region and automatic start frequency must be considered when setting up the speed. Setting Range: below 1/10 of the maximum speed (D8147, D8146). When the setting surpasses the indicated range, the operating speed will automatically decelerate to the 1/10 of the highest speed.
155 * [D8147 (high byte), D8146 (low byte)]: Maximum speed when executing DRVI and DRVA instructions. The assigned output pulse frequency must be lower than the maximum speed. Setting range: 10 ~~100,000(Hz)
156 * [D8148]: acceleration and deceleration time when executing FNC158 (DRVI) and FNC159 (DRVA) instructions. Acceleration/Deceleration time means the time required in order to reach the maximum speed (D8147, D8146). The output pulse frequency is lower than the maximum speed (D8147, D8146), the actual acceleration/deceleration time will reduce. Setting range: 50 ~~ 5,000 (ms)
157 * [M8145]: Y000 pulse output stopping (immediate stopping)
158 * [M8146]: Y001 pulse output stopping (immediate stopping)
159 * [M8152]: Y002 pulse output stopping (immediate stopping)
160 * [M8153]: Y003 pulse output stopping (immediate stopping)
161 * [M8147]: Y000 pulse output monitoring (BUSY/READY)
162 * [M8148]: Y001 pulse output monitoring (BUSY/READY)
163 * [M8149]: Y002 pulse output monitoring (BUSY/READY)
164 * [M8150]: Y003 pulse output monitoring (BUSY/READY)
165
166 **Note for use**
167
168 * Position instruction (ZRN/PLSV/DRVI/DRVA) could be reused in the program, but do not output to the same port;
169 * If the drive power flow for an instruction turns OFF and ON again, if could only be driven after one operation cycle when status bit (Y000: [M8147], Y001: [M8148], Y0002: [M8149], Y003: [M8150]) turns OFF.
170 * When positioning instruction is driven again, there should be at least one cycle of OFF time. If the re-drive is implemented in the time less than above condition, there will be calculation error when firstly implementing calculation instruction.
171
172 = **6.13.4 PLSV instruction** =
173
174 **Instruction description**
175
176 (% border="1" %)
177 |**Name**|**Function**|**Bits(bits)**|**Pulse type**|**Instruction format**|**Step**
178 |PLSV|(% rowspan="2" %)Variable speed pulse output|16|No|(% rowspan="2" %)PLSV S D,,1,, D,,2,,|9
179 |DPLSV|32|No|13
180
181 This is a variable speed output pulse instruction, with a rotation direction output. Only the PLC with the transistor output could execute the instruction.
182
183 * S: The pulse frequency. In 16-bit mode, the range are 1~~32,767Hz and -1~~-32,768Hz. In 32-bit mode, the range are 1~~ 200,000Hz and 1~~-200,000Hz;
184 * D,,1,,: The pulse output designation, Y0~~Y3 are specified by LX3V (2N firmware), LX3VP, LX3VE and LX3VM, Y0~~Y1 are specified by LX3V (1S firmware);
185 * D,,2,,: The rotation direction, the ON state means forward, the OFF state means reverse;
186
187 For 32-bit instructions, when S is greater than 200,000, it is treated as 200,000, and less than -200000, as -200000
188
189 (% border="1" %)
190 |(% rowspan="2" %)**Operands**|(% colspan="4" %)**Bit device**|(% colspan="12" %)**Word device**
191 |X|Y|M|S|K|H|E|KnX|KnY|KnM|KnS|T|C|D|V|Z
192 |S| | | | |√|√| |√|√|√|√|√|√|√|√|√
193 |D,,1,,| |√| | | | | | | | | | | | | |
194 |D,,2,,| |√|√|√| | | | | | | | | | | |
195
196 **Program example**
197
198 (% style="text-align:center" %)
199 [[image:7-12Positioning control_html_950ac90fd7b076fe.jpg||class="img-thumbnail" height="60" width="400"]]
200
201 When M1 is triggered, Y1 is specified for output pulse, the frequency of pulse is 10KHz, Y4 is specified for direction control. If Y4=ON means forward.
202
203 During this instruction is executed, systemic variables concerned are:
204
205 * D8141 (high byte), D8140 (low byte):Y000 outputs value of current register (using 32-bit)
206 * D8143 (high byte), D8142 (low byte):Y001 outputs value of current register (using 32-bit)
207 * M8145: Y000 represents the pulse output stopped (instantly)
208 * M8146: Y001 represents the pulse output stopped (instantly)
209 * M8147: Y000 represents monitoring during the pulse output process (BUSY/READY)
210 * M8148:Y001 represents monitoring during the pulse output process (BUSY/READY)
211
212 = **6.13.5 DRVA instruction** =
213
214 **Instruction description**
215
216 (% border="1" %)
217 |**Name**|**Function**|**Bits(bits)**|**Pulse type**|**Instruction format**|**Step**
218 |DRVA|(% rowspan="2" %)Absolute positioning|16|No|(% rowspan="2" %)DRVA S,,1,, S,,2,, D,,1,, D,,2,,|9
219 |DDRVA|32|No|17
220
221 This instruction is for single speed positioning using a zero home point and absolute measurements.
222
223 * S,,1,,: The number of pulses, the range is 16-bit -32,768 to 32,767 pulses or 32-bit -2,147,483,648 to 2,147,483,647 pulses;
224
225 If D,,1,,=Y0, [D8141 (high byte), D8140 (low byte)] (32-bit) are absolute position;
226
227 If D,,1,,=Y1, [D8143 (high byte), D8142 (low byte)] (32-bit) are absolute position;
228
229 If D,,1,,=Y2, [D8151 (high byte), D8150 (low byte)] (32-bit) are absolute position;
230
231 If D,,1,,=Y3, [D8153 (high byte), D8152 (low byte)] (32-bit) are absolute position;
232
233 * S,,2,,: The output frequency, the range is 16-bit 10 to 32,767Hz or 32-bit 10 to 200 kHz; The set value exceeds the highest frequency and runs at the highest frequency. The set value is less than the lowest frequency and runs at the lowest frequency.
234 * D,,1,,: The Pulse Output Designations, only Y000 or Y001or Y002 or Y003 in LX3V (2N firmware), LX3VP, LX3VE and LX3VM could be used for the pulse output. Only Y000 or Y001 in LX3V (1S firmware) could be used for the pulse output.
235 * D,,2,,: The rotation direction signal. If D,,2,,= OFF, rotation = negative, if D,,2,,= ON, rotation = positive.
236
237 (% border="1" %)
238 |(% rowspan="2" %)**Operands**|(% colspan="4" %)**Bit device**|(% colspan="12" %)**Word device**
239 |X|Y|M|S|K|H|E|KnX|KnY|KnM|KnS|T|C|D|V|Z
240 |S,,1,,| | | | |√|√| |√|√|√|√|√|√|√|√|√
241 |S,,2,,| | | | |√|√| |√|√|√|√|√|√|√|√|√
242 |D,,1,,| |√| | | | | | | | | | | | | |
243 |D,,2,,| |√|√|√| | | | | | | | | | | |
244
245 If the contents of an operand are changed while the instruction is executed, it is not reflected on the operation. The new contents become effective when the instruction is next driven.
246
247 If the instruction drive contact turns off while the instruction is being executed, the machine decelerates and stops. At this time the execution complete flag M8029 does not turn ON.
248
249 Once the instruction drive contact is off, re-drive of the instruction is not possible while the pulse output flag (Y000: [M8147], Y001: [M8148]) is ON.
250
251 **Program example**
252
253 (% style="text-align:center" %)
254 [[image:7-12Positioning control_html_8f22faf9626cc046.jpg||class="img-thumbnail" height="50" width="400"]]
255
256 The instruction controls the target to run from the specified origin position to the target position;
257
258 (% style="text-align:center" %)
259 [[image:7-12Positioning control_html_e655365afcd25b70.jpg||class="img-thumbnail" height="172" width="600"]]
260
261 (% style="text-align:center" %)
262 [[image:7-12Positioning control_html_6d8386e23f9de0b2.jpg||class="img-thumbnail" height="337" width="800"]]
263
264 During the pulse output, the frequency will increase or decrease according to the predetermined value.
265
266 The minimum value of output pulse frequency which could be actually used is determined by the following equation.
267
268 (% style="text-align:center" %)
269 [[image:7-12Positioning control_html_b97453e7feb82438.jpg||class="img-thumbnail" height="30" width="600"]]
270
271 Even if the assigned value is lower than the above calculated result, the frequency to be exported will still be the calculated value. The frequencies in the initial stage of acceleration and in the final section of deceleration must not be lower than the above calculated result.
272
273 During the instruction execution, the involved system variables are as follows:
274
275 * [D8145]: Base speed when executing DRVI and DRVA instructions. During the operation of stepping motor, the stepping motor's resonance region and automatic start frequency must be considered when setting up the speed. Setting Range: below 1/10 of the maximum speed (D8147, D8146). When the setting surpasses the indicated range, the operating speed will automatically decelerate to the 1/10 of the highest speed.
276 * [D8147 (high byte), D8146 (low byte)]: Maximum speed when executing DRVI and DRVA instructions. The assigned output pulse frequency must be lower than the maximum speed. Setting range: 10 ~~100,000(Hz)
277 * [D8148]: acceleration and deceleration time when executing FNC158 (DRVI) and FNC159 (DRVA) instructions. Acceleration/Deceleration time means the time required in order to reach the maximum speed (D8147, D8146). The output pulse frequency is lower than the maximum speed (D8147, D8146), the actual acceleration/deceleration time will reduce. Setting range: 50 ~~ 5,000 (ms)
278 * [M8145]: Y000 pulse output stopping (immediate stopping)
279 * [M8146]: Y001 pulse output stopping (immediate stopping)
280 * [M8152]: Y002 pulse output stopping (immediate stopping)
281 * [M8153]: Y003 pulse output stopping (immediate stopping)
282 * [M8147]: Y000 pulse output monitoring (BUSY/READY)
283 * [M8148]: Y001 pulse output monitoring (BUSY/READY)
284 * [M8149]: Y002 pulse output monitoring (BUSY/READY)
285 * [M8150]: Y003 pulse output monitoring (BUSY/READY)
286
287 **Note for use:**
288
289 * Position instruction (ZRN/PLSV/DRVI/DRVA) could be reused in the program, but do not output to the same port;
290 * If the drive power flow for an instruction turns OFF and ON again, if could only be driven after one operation cycle when status bit (Y000: [M8147], Y001: [M8148], Y0002: [M8149], Y003: [M8150]) turns OFF.
291 * When positioning instruction is driven again, there should be at least one cycle of OFF time. If the re-drive is implemented in the time less than above condition, there will be calculation error when firstly implementing calculation instruction.
292
293 = **6.13.6 DVIT instruction** =
294
295 **1) Instruction description**
296
297 (% border="1" %)
298 |**Name**|**Function**|**Bits(bits)**|**Pulse type**|**Instruction format**|**Step**
299 |DVIT|(% rowspan="2" %)Interrupt positioning|16|No|(% rowspan="2" %)DVIT S,,1,, S,,2,,D,,1,,D,,2,,D,,3,,|11
300 |DDVIT|32|No|21
301
302 //**This instruction is only supported by 3VP/3VE/3VM series PLC.**//
303
304 This instruction outputs pulses according to the specified port, frequency and running direction. When the interrupt signal is received, it stops after sending the specified number of pulses. This instruction can only be used by the transistor output PLC.
305
306 S,,1,,: it is the specified number of output pulses. The range is -32768~~ 32,767 (16-bit) and -2,147,483,648~~ 2,147,483,647 (32-bit). When the output is negative, it indicates the reverse direction;
307
308 S,,2,,: it is the specified output pulse frequency. The range is 10 ~~ 32767Hz (16-bit) and – 10 ~~ 200,000Hz (32-bit);
309
310 D,,1,,: output port, for LX3V/3VP/3VE, it could be Y0~~Y3, for LX3V (1s) type, it could only be Y0 or Y1;
311
312 D,,2,,: the running direction or bit variable, when it is ON, indicates running in the forward direction; otherwise it is running in the reverse direction;
313
314 D,,3,,: interrupt signal, when the interrupt signal is received, it stops after sending the specified number of pulses;
315
316 (% border="1" %)
317 |(% rowspan="2" %)**Operand**|(% colspan="4" %)**Bit device**|(% colspan="11" %)**Word device**
318 |**X**|**Y**|**M**|**S**|**K**|**H**|**E**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**V**
319 |S,,1,,| | | | |v|v|v|v|v|v|v|v|v|v|v
320 |S,,2,,| | | | |v|v|v|v|v|v|v|v|v|v|v
321 |D,,1,,| |v| | | | | | | | | | | | |
322 |D,,2,,| |v|v|v| | | | | | | | | | |
323 |D,,3,,|v|v|v|v| | | | | | | | | | |
324
325 The number of output pulses is relative to the following registers as relative positions
326
327 l D8141 (high byte), D8140 (low byte): The number of output pulse in Y000. It would be reduced during reversal. (32-bit)
328
329 l D8143 (high byte), D8142 (low byte): The number of output pulse in Y001. It would be reduced during reversal. (32-bit)
330
331 l D8151 (high byte), D8150 (low byte): The number of output pulse in Y002. It would be reduced during reversal. (32-bit)
332
333 l D8153 (high byte), D8152 (low byte): The number of output pulse in Y003. It would be reduced during reversal. (32-bit)
334
335 a) During the execution of the instruction, the modified parameters cannot be executed immediately and need to be valid when the instruction is executed again.
336
337 b) If the contact triggered by the instruction turns OFF during the execution of the instruction, it will decelerate to a stop. At this time, the execution completion flag M8029 will not operate.
338
339 c) When the instruction trigger contact turns OFF, the pulse output interrupt flag M8147 (Y000), M8148 (Y001), M8149 (Y002), and M8150 (Y003) are turned ON, and the re-trigger of the instruction will not be accepted.
340
341 **2) Program example**
342
343 (% style="text-align:center" %)
344 [[image:1620627885699-215.png||class="img-thumbnail" height="63" width="400"]]
345
346 [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml15248\wps1.jpg]]
347
348 The above program outputs a pulse from the Y0 port at a frequency of 4 kHz to operate the external servo actuator. When receiving the signal of M1, it sends 30,000 pulses, and the direction is determined by Y1.
349
350 (% style="text-align:center" %)
351 [[image:1620627899698-405.png||class="img-thumbnail" height="459" width="600"]]
352
353 During the pulse output, the frequency will have acceleration and deceleration according to the predetermined value:
354
355 (% style="text-align:center" %)
356 [[image:1620627911913-511.png||class="img-thumbnail" height="687" width="800"]]
357
358 **The minimum pulse frequency of the actual output is determined by the following formula**
359
360 **Minimum frequency**
361
362 **~ = **
363
364 (% style="text-align:center" %)
365 [[image:1620627938186-193.png||class="img-thumbnail" height="27" width="600"]]
366
367 Even if the specified value is lower than the above calculation result, the last output frequency is still the calculated value result. The frequency of the initial stage of acceleration and the final part of deceleration should not be lower than the above calculation results.
368
369 **During the instruction execution, the involved system variables are as follows:**
370
371 [D8145]: Base speed when executing DRVI and DRVA instructions. During the operation of stepping motor, the stepping motor's resonance region and automatic start frequency must be considered when setting up the speed. Setting Range: below 1/10 of the maximum speed (D8147, D8146). When the setting surpasses the indicated range, the operating speed will automatically decelerate to the 1/10 of the highest speed.
372
373 [D8147 (high byte), D8146 (low byte)]: Maximum speed when executing DRVI and DRVA instructions. The assigned output pulse frequency must be lower than the maximum speed. Setting range: 10 ~~100,000(Hz)
374
375 [D8148]: acceleration and deceleration time when executing DRVI and DRVA instructions. Acceleration/Deceleration time means the time required in order to reach the maximum speed (D8147, D8146). The output pulse frequency is lower than the maximum speed (D8147, D8146), the actual acceleration/deceleration time will reduce. Setting range: 50 ~~ 5,000 (ms)
376
377 M8145: Stop output pulse in Y000 (stop immediately)
378
379 M8146: Stop output pulse in Y001 (stop immediately)
380
381 M8152: Stop output pulse in Y002 (stop immediately)
382
383 M8153: Stop output pulse in Y003 (stop immediately)
384
385 M8147: Monitoring the output pulse in Y000 (BUSY/READY)
386
387 M8148: Monitoring the output pulse in Y001 (BUSY/READY)
388
389 M8149: Monitoring the output pulse in Y002 (BUSY/READY)
390
391 M8150: Monitoring the output pulse in Y003 (BUSY/READY)
392
393 **3) ✎Note: **
394
395 * Position instruction (ZRN/PLSV/DRVI/DRVA/DVIT) can be reused in the program, but do not output to the same port;
396
397 * If the drive power flow for an instruction turns OFF and ON again, if can only be driven after one operation cycle when status bit (Y000: [M8147], Y001: [M8148], Y0002: [M8149], Y003: [M8150]) turns OFF.
398
399 * When positioning instruction is driven again, there should be at least one cycle of OFF time. If the re-drive is implemented in the time less than above condition, there will be calculation error when firstly implementing calculation instruction.