Wiki source code of LX3V-4PG

Version 2.1 by Leo Wei on 2022/06/08 14:42

Hide last authors
Leo Wei 1.1 1 = **1 Introduction** =
2
3 The LX3V-4PG is pulse generator unit which has four channels. Each channel can control positioning of an axis independently. It works by sending specified quantity of pulses (200 kHz maximum) to Server controller or step motors.
4
5 The LX3V-4PG is an extension module of LX3V series PLC, which transfers data with the PLC using the FROM/TO instructions.
6
7 There are two versions for LX3V-4PG, one is LX3V-4PGA (Advanced), and the other is LX3V-4PGB (Basic). Please get more detail from [BFM description]
8
9 **Warnings:**
10
11 Make sure power is Cut off before installation/disassembly of the unit or connection of wires onto the unit, to prevent electric shock or product damage.
12
13 = **2 Dimensions** =
14
15 (% style="text-align:center" %)
16 [[image:LX3V-4PG_html_bf6ccc4678f6c050.png||class="img-thumbnail" height="426" width="1100"]]
17
18 Figure 2‑1
19
20 ①Extension cable and connector
21
22 ②Com LED: Light when communicating
23
24 ③Power LED: Light when connect to 24V
25
26 ④State LED: Light when normal condition
27
28 ⑤Module name
29
30 ⑥Analog signal output terminal
31
32 ⑦Extension module interface
33
34 ⑧DIN rail mounting slot
35
36 ⑨DIN rail hook
37
38 ⑩Mounting holes (φ4.5)
39
40 = **3 Crimp terminations** =
41
42 (((
43 * Please use crimp terminals as indicated on the graph.
44 * The tightening torque should be applied 5 to 8 Kg.cm.
45 * Other terminals should be empty but only wiring terminals mention in this manual.
46
47 (% style="text-align:center" %)
48 [[image:LX3V-4PG_html_a035e325e1e93843.png||class="img-thumbnail" height="195" width="400"]]
49 )))
50
51 = **4 Terminals Definition** =
52
53 (% class="table-bordered" %)
54 |**Terminal**|**Instruction**|**Terminal**|**Instruction**|**Terminal**|**Instruction**
55 |COM0|Common terminal for channel 1|FP2|Channel 3 outputs pulses|(% rowspan="2" %)S/S|(% rowspan="2" %)Common terminal for X and DOG, it supports NPN/PNP type.
56 |FP0|Channel 1 outputs pulses|RP2|Channel 3 outputs direction
57 |RP0|Channel 1 outputs direction|FP3|Channel 4 outputs pulses|DOG 3|Home position return: Channel 4 near point signal input
58 |COM1|Common terminal for channel 2|RP3|Channel 4 outputs direction|X 0|Channel 1 interrupt signal input
59 |FP1|Channel 2 outputs pulses|DOG 0|Home position return: Channel 1 near point signal input|X 1|Channel 2 interrupt signal input
60 |RP1|Channel 2 outputs direction|DOG 1|Home position return: Channel 2 near point signal input|X 2|Channel 3 interrupt signal input
61 |COM 2|Common terminal for channel 3 and 4|DOG 2|Home position return: Channel 3 near point signal input|X 3|Channel 4 interrupt signal input
62
63 = **5 Input and output Specification** =
64
65 **Input specification**
66
67 (% class="table-bordered" %)
68 |(% colspan="4" %)**LX3V-4PG input specification**
69 |(% colspan="4" %)(((
70 X input and DOG input
71
72 Input terminal: X0-X3, DOG0-DOG3
73
74 This is NPN type, if you want to PNP type, please connect S/S to 24V negative electrode, and X connects to positive electrode.
75
76 (% style="text-align:center" %)
77 [[image:LX3V-4PG_html_3b5702fca4add783.gif||class="img-thumbnail" height="352" width="250"]]
78 )))
79 |Input signal voltage|DC V 24 ±10%|Input signal type|Contact input, NPN and PNP
80 |Input signal current|5 mA /DC24V|Circuit insulation|Optocouples insulation
81 |Input ON current|3.5 mA / DC24 V|Input action|LED turns on, when input ON
82 |Input OFF current|Less than 1.5 mA| |
83
84 == **5.1 Output specification** ==
85
86 (% class="table-bordered" %)
87 |(% colspan="3" %)**Output circuit**
88 |(% colspan="3" %)(((
89 **Output:**
90
91 FP0-3: High-speed pulse output;
92
93 Electrical parameters: Same as PLC high speed output (Y0-Y1);
94
95 PR0-3: Normal output direction;
96
97 Electrical parameters: Same as PLC normal output ( from Y4);
98
99 (% style="text-align:center" %)
100 [[image:LX3V-4PG_html_9e4a6cda17d864b3.gif||class="img-thumbnail" height="194" width="400"]]
101 )))
102 |(% colspan="2" %)**Items**|**Transistor output**
103 |(% colspan="2" %)Models|LX3V series PLC
104 |(% colspan="2" %)External power supply|DC 5~~30V
105 |(% colspan="2" %)Circuit insulation|Optocouplers insulation
106 |(% colspan="2" %)Action|LED turns on when optocoupler works.
107 |(% rowspan="3" %)(((
108 Maximum
109
110 load
111 )))|Resistance|0.5A/ each point, 0.8A/ four points (0.3A/each point in FP terminal)
112 |Inductance|12W/DC24V (7.2W/DC24V in FP terminal)
113 |Lamp|0.9W/DC24V (0.9W/DC24V in FP terminal)
114 |(% colspan="2" %)Leakage current|0.1mA/DC30V
115 |(% colspan="2" %)Minimum load|DC5V2mA
116 |(% rowspan="2" %)Response time|Input current (ON)|5us less than 0.2ms (FP terminal)
117 |Input current (OFF)|5us less than 0.2ms (FP terminal)
118 |(% colspan="2" %)Output type|NPN signal
119
120 = **6 Function description** =
121
122 **BFM list**
123
124 (% class="table-bordered" %)
125 |(% colspan="8" %)**BFM**|(% rowspan="3" %)**Latched**|(% rowspan="3" %)**Operation**|(% rowspan="3" %)**Register name**|(% rowspan="3" %)**B15**|(% rowspan="3" %)**B14**|(% rowspan="3" %)**B13**|(% rowspan="3" %)**B12**|(% rowspan="3" %)**B11**|(% rowspan="3" %)**B10**|(% rowspan="3" %)**Default**|(% rowspan="3" %)**Range**
126 |(% colspan="2" %)**CH1**|(% colspan="2" %)**CH2**|(% colspan="2" %)**CH3**|(% colspan="2" %)**CH4**
127 |**H16**|**L16**|**H16**|**L16**|**H16**|**L16**|**H16**|**L16**
128 |(% colspan="2" %)0|(% colspan="2" %)40|(% colspan="2" %)80|(% colspan="2" %)120|X|R/W|Pulse rate|(% colspan="6" %)Unit : PLUSE/ REV (Pulse/ Revolution) [1]|2000|1-32,767
129 |2|1|42|41|82|81|122|121|X|R/W|Feed rate|(% colspan="6" %)Unit: it set by b2-b0 of BFM#3 [1]|1000|1-999,999
130 |(% colspan="2" %)3|(% colspan="2" %)43|(% colspan="2" %)83|(% colspan="2" %)123|X|R/W|Parameters|(% colspan="3" %)~-~-|DOG input polarity|S-type acceleration and deceleration [3]|Home position return direction|0|0-5
131 |5|4|45|44|85|84|125|124|X|R/W|Maximum speed)|(% colspan="6" %)The unit value depends on the system of units set in the BFM #3 b1 and b0|100KHz|10Hz-200,000Hz
132 |(% colspan="2" %)6|(% colspan="2" %)46|(% colspan="2" %)86|(% colspan="2" %)126|X|R/W|Bias speed|(% colspan="6" %)The unit value depends on the system of units set in the BFM #3 b1 and b0|0Hz|0Hz-10,000Hz
133 |8|7|48|47|88|87|128|127|X|R/W|JOG speed|(% colspan="6" %)The unit value depends on the system of units set in the BFM #3 b1 and b0|10KHz|10Hz-100,000Hz
134 |10|9|50|49|90|89|130|129|X|R/W|Home position return speed (high speed|(% colspan="6" %)The unit value depends on the system of units set in the BFM #3 b1 and b0|50KHz|1Hz-100,000Hz
135 |(% colspan="2" %)11|(% colspan="2" %)51|(% colspan="2" %)91|(% colspan="2" %)131|X|R/W|Home position return speed (creep speed)|(% colspan="6" %)The unit value is depending on the system of units set in the BFM #3 b1 and b0|1KHz|0Hz-10,000Hz
136 |(% colspan="2" %)12|(% colspan="2" %)52|(% colspan="2" %)92|(% colspan="2" %)132|X|R/W|Reserved|(% colspan="6" %)~-~-|~-~-|~-~-
137 |14|13|54|53|94|93|134|133|O|R/W|Home position|(% colspan="6" %)The unit value depends on the system of units set in the BFM #3 b1 and b0|0|-999,999-999,999
138 |(% colspan="2" %)15|(% colspan="2" %)55|(% colspan="2" %)95|(% colspan="2" %)135|X|R/W|Acceleration time|(% colspan="6" %)Time from the bias speed Accelerating to the maximum speed.|100ms|20-32000ms
139 |(% colspan="2" %)16|(% colspan="2" %)56|(% colspan="2" %)96|(% colspan="2" %)136|X|R/W|Deceleration time|(% colspan="6" %)Time from the maximum Deceleration to the bias speed.|100ms|20-32000ms
140 |18|17|58|57|98|97|138|137|X|R/W|Set position (I)|(% colspan="6" %)The unit value depends on the system of units set in the BFM #3 b1 and b0|0|-999,999-999,999
141 |20|19|60|59|100|99|140|139|X|R/W|Operating speed (I)|(% colspan="6" %)The unit value depends on the system of units set in the BFM #3 b1 and b0|10Hz|10Hz-200,000Hz
142 |22|21|62|61|102|101|142|141|X|R/W|Set position (II)|(% colspan="6" %)The unit value is depending on the system of units set in the BFM #3 b1 and b0|0|-999,999-999,999
143 |24|23|64|63|104|103|144|143|X|R/W|Operating speed (II)|(% colspan="6" %)The unit value is depending on the system of units set in the BFM #3 b1 and b0|10Hz|10Hz-200,000Hz
144 |(% colspan="2" %)25|(% colspan="2" %)65|(% colspan="2" %)105|(% colspan="2" %)145|X|R/W|Operating mode|(% colspan="3" %)-|Variable speed operation start|-|Two-speed position start|~-~-|~-~-
145 |27|26|67|66|107|106|147|146|O|R/W|Current position|(% colspan="6" %)The unit value is depending on the system of units set in the BFM #3 b1 and b0| |
146 |(% colspan="2" %)28|(% colspan="2" %)68|(% colspan="2" %)108|(% colspan="2" %)148|X|R/W|Status flag|(% colspan="5" %)~-~-|Interrupt signal|~-~-|~-~-
147 |(% colspan="2" %)29|(% colspan="2" %)69|(% colspan="2" %)109|(% colspan="2" %)149|X|R|Error code|(% colspan="6" %)~-~-|~-~-|~-~-
148 |(% colspan="2" %)30|(% colspan="2" %)70|(% colspan="2" %)110|(% colspan="2" %)150|X|R|Model code|(% colspan="6" %)(((
149 LX3V-4PGB: 5110;
150
151 LX3V-4PGA: 5120; [5]
152 )))|K5110|
153 |(% colspan="2" %)31|(% colspan="2" %)71|(% colspan="2" %)111|(% colspan="2" %)151|X|R|Version code|(% colspan="6" %) |K13301|~-~-
154 |(% colspan="2" %)32|(% colspan="2" %)72|(% colspan="2" %)112|(% colspan="2" %)152|X|R|Reserved|(% colspan="6" rowspan="8" %)~-~-|(% colspan="2" rowspan="8" %)~-~-
155 |(% colspan="2" %)33|(% colspan="2" %)73|(% colspan="2" %)113|(% colspan="2" %)153|X|R|Reserved
156 |(% colspan="2" %)34|(% colspan="2" %)74|(% colspan="2" %)114|(% colspan="2" %)154|X|R|Reserved
157 |(% colspan="2" %)35|(% colspan="2" %)75|(% colspan="2" %)115|(% colspan="2" %)155|X|R|Reserved
158 |(% colspan="2" %)36|(% colspan="2" %)76|(% colspan="2" %)116|(% colspan="2" %)156|X|R|Reserved
159 |(% colspan="2" %)37|(% colspan="2" %)77|(% colspan="2" %)117|(% colspan="2" %)157|X|R|Reserved
160 |(% colspan="2" %)38|(% colspan="2" %)78|(% colspan="2" %)118|(% colspan="2" %)158|X|R|Reserved
161 |(% colspan="2" %)39|(% colspan="2" %)79|(% colspan="2" %)119|(% colspan="2" %)159|X|R|Reserved
162
163 (% class="table-bordered" %)
164 |(% rowspan="4" %)**BFM List**|**CH1**|(% style="width:411px" %)3|(% style="width:274px" %)25|(% style="width:268px" %)28
165 |**CH2**|(% style="width:411px" %)43|(% style="width:274px" %)65|(% style="width:268px" %)68
166 |**CH3**|(% style="width:411px" %)83|(% style="width:274px" %)105|(% style="width:268px" %)108
167 |**CH4**|(% style="width:411px" %)123|(% style="width:274px" %)145|(% style="width:268px" %)148
168 |(% colspan="2" %)**Device name**|(% style="width:411px" %)Parameters|(% style="width:274px" %)Operating mode|(% style="width:268px" %)Flags
169 |(% colspan="2" %)**b9**|(% style="width:411px" %)Rotation direction|(% style="width:274px" %)(((
170 Interrupt
171
172 single speed positioning start[3]
173 )))|(% style="width:268px" %)CLR signal
174 |(% colspan="2" %)**b8**|(% style="width:411px" %)~-~-|(% style="width:274px" %)Single speed positioning start|(% style="width:268px" %)Positioning completed flag
175 |(% colspan="2" %)**b7**|(% style="width:411px" %)~-~-|(% style="width:274px" %)Relative /absolute position|(% style="width:268px" %)Error flag
176 |(% colspan="2" %)**b6**|(% style="width:411px" %)Interrupt signal input polarity[3]|(% style="width:274px" %)(((
177 Home position
178
179 return start
180 )))|(% style="width:268px" %)Current position value overflow
181 |(% colspan="2" %)**b5**|(% rowspan="2" style="width:411px" %)Positioning data multiple 10^^0^^~~10^^3^^|(% style="width:274px" %)JOG- operation|(% style="width:268px" %)~-~-
182 |(% colspan="2" %)**b4**|(% style="width:274px" %)JOG+ operation|(% style="width:268px" %)DOG signal
183 |(% colspan="2" %)**b3**|(% rowspan="2" style="width:411px" %) |(% style="width:274px" %)Forward pulse stop|(% style="width:268px" %)Stop signal
184 |(% colspan="2" %)**b2**|(% style="width:274px" %)Reverse pulse stop|(% style="width:268px" %)Home position return completed
185 |(% colspan="2" %)**b1**|(% rowspan="2" style="width:411px" %)System units: motor systems, mechanical systems, combined systems.|(% style="width:274px" %)STOP|(% style="width:268px" %)Reverse rotation/ Forward rotation
186 |(% colspan="2" %)**b0**|(% style="width:274px" %)Error reset|(% style="width:268px" %)Ready/Busy
187
188 **✎Note: **
189
190 Symbol remarks: O means power-off save type; X means power-off non-save type; R means read only; W means read and write.
191
192 1. Unit is um/R, mdeg/R or 10-4 inch/R.
193 1. Unit is PLS, um/R, mdeg/R or 10-4 inch depending on the system of units set in the BFM #3 b1 and b0.
194 1. S-type acceleration and deceleration interrupt single speed positioning and two-speed positioning are available in advanced version.
195 1. When there are more than one bits set on in BFM #25 b6~~b4, b12~~b8, the operation will not be executed.
196 1. “5110” (basic): it has JOG, single speed positioning, home position return and speed change; “5120” (advanced): it has all functions.
197
198 = **7 BFM instruction** =
199
200 **System of Units and Parameter Setting**
201
202 * **[BFM #0] Pulse rate**
203
204 This is the count of input pulses what the motor needs to rotate 1 revolution. It is not the count of encoder pulses that generates by motor when it rotates 1 revolution. (The pulse speed is different value according with the electronic gear ratio.) The BFM #0 is not required to be set when the motor system of units is selected.
205
206 * **[BFMs #2 and #1] Feed rate**
207
208 b1 (distance specification) = 1 to 999,999 um/R
209
210 b2 (angle specification) = 1 to 999,999 mdeg/R
211
212 b3 (distance specification) = 1 to 999,999x10-4 inch/R
213
214 This is the machine feeding distance while the motor rotates by 1 revolution. One of B1, B2 and B3 could be selected, the unit could be um/R, mdeg/R and 10-4 inch/R. The BFMs #2 and #1 are not required to be set when the motor system of units is selected.
215
216 * **[BFM #3] Parameters (b0 to b15)**
217 * System of units (b1, b0)
218
219 (% class="table-bordered" %)
220 |**b1**|**b0**|**System of units**|**Remarks**
221 |0|0|Motor system|Units based on pulses
222 |0|1|Machine system|Units based on lengths and angles
223 |1|0|(% rowspan="2" %)Combined system|(% rowspan="2" %)Units based on lengths and angles for position units based on HZ for speed
224 |1|1
225
226 The table below shows the units for position and speed in accordance with the setting of the BFMs #2 and #1
227
228 (% class="table-bordered" %)
229 | |**Selection of feed rate**|**Motor system**|**Machine system**|**Combined system**
230 |(% rowspan="3" %)Position data*1|Unit 1|PLS|(% colspan="2" %)um
231 |Unit 2|PLS|(% colspan="2" %)mdeg
232 |Unit 3|PLS|(% colspan="2" %)10^^-4^^ inch
233 |(% rowspan="3" %)Speed data*2|Unit 1|(% colspan="2" %)Hz|cm / min
234 |Unit 2|(% colspan="2" %)Hz|10 deg /min
235 |Unit 3|(% colspan="2" %)Hz|inch / min
236
237 *1 position data: HP, P (I), P (II), CP.
238
239 *2 speed data: Vmax, Vbia, Vjog, Vrt, V (I), V (II).
240
241 * Multiplication of position data (b5, b4)
242
243 (((
244 (% class="table-bordered" %)
245 |**b5**|**b6**|(((
246 The position data HP, P (I), P (II) and CP will be multiplied by the value shown in the table on the left.
247
248 **Multiplication**
249 )))
250 |0|0|10^^0^^
251 |0|1|10^^1^^
252 |1|0|10^^2^^
253 |1|1|10^^3^^
254 )))
255
256 Example: When the value of the set position P(I) is 123 and the BFM #3 (b5, b4) is (1, 1), the actual position (or travel) becomes as follows:
257
258 (% class="table-bordered" %)
259 |Motor system units|123 * 10^^3^^=123,000 (pulses)
260 |Machine system units|(% rowspan="2" %)(((
261 123*10^^3^^=123,000 (um, mdeg, 10^^-4^^inch)
262
263 ~=123 (mm,deg, 10^^-1^^inch)
264 )))
265 |Combined system units
266
267 * Rotation direction (b9)
268
269 When b9 = 0: The current position (CP) value increases with a forward pulse (FP).
270
271 When b9 = 1: The current position (CP) value decreases with a forward pulse (FP).
272
273 This bit is used for the initialized setting. The change of rotation direction is not active when the positioning works.
274
275 * The direction of home position return (b10)
276
277 When b10 = 0: The current position (CP) value decreases during return to the home position.
278
279 When b10 = 1: The current position (CP) value increases during return to the home position.
280
281 * S-type acceleration and deceleration(b11)
282
283 When b11=0, the acceleration is constant during the process of accelerating and decelerating for positioning, the curve of speed is trapezoidal.
284
285 When b11=1, the curve of speed is S-type during the process of accelerating and decelerating for positioning.
286
287 * DOG input polarity (b12)
288
289 When b12 = 0: The DOG (near point signal) is turned on when the workpiece is approaching the home position.
290
291 When b12 = 1: The DOG (near point signal) is turned off when the workpiece is approaching the home position.
292
293 = **8 Speed Data and Positioning Data** =
294
295 * **[BFMs #5 and #4] Maximum speed V,,max,,**
296
297 Motor system and combined system: 1 to 200,000 Hz
298
299 This is the setting of maximum speed. Make sure that the bias speed (BFM #6), the JOG speed (BFMs #7 and #8), the speed of home position return (BFMs #9 and #10), the creep speed (BFM #11), the operating speed (I) (BFMs #19 and #20) and the operating speed (II) (BFMs #23 and #24) should be equal to or less than the maximum speed. The degree of acceleration/deceleration is determined by this maximum speed, the bias speed (BFM #6), the acceleration time (BFM #15) and the deceleration time (BFM#16).
300
301 * **[BFM #6] Bias speed V,,bia,,**
302
303 The range is 0 to 10,000Hz
304
305 This is the bias speed for start. When the LX3V-4PG and the stepper motor works together, it is necessary to set a value while considering the resonance area and the self-start frequency of the stepper motor
306
307 * **[BFMs #8 and #7] JOG speed V,,JOG,,**
308
309 The range is 1 to 100,000Hz
310
311 This is the speed for manual forward/reverse (JOG+/JOG-). It should be between the bias speed V,,bia,, and the maximum speed V,,max,,
312
313 * **[BFMs #10 and #9] The speed of home position return (high speed) V,,RT,,**
314
315 The range is 10 to 100,000Hz
316
317 This is the speed (high speed) for returning to home position. It should be between the bias speed V,,bia,, and the maximum speed V,,max,,.
318
319 * **[BFM #11] The speed of home position return (creep) V,,CR,,**
320
321 This is the speed (extremely slow speed) after the ear point signal (DOG) for returning to home position. It is instantaneous velocity before stopping at home position. Slower speed could get high precision of home positioning.
322
323 * **[BFMs#14 and #13] Home position HP**
324
325 Motor system: 0 to ±999,999 PLS. Machine system and combined system: 0 to ±999,999
326
327 This is the position of home position return, when return actions completes, the value is written to the current position (BFMs #26 and #27).
328
329 * **[BFM #15] Acceleration time T,,a,,**
330
331 The range is 20 to 32,000 ms
332
333 This is accelerating time from the bias speed (BFM #6) to the maximum speed (BFMs #5 and #4).
334
335 * **[BFM #16] Deceleration time T,,d,,**
336
337 The range is 20 to 32,000 ms
338
339 This is the decelerating time between the bias speed (BFM#6) and the maximum speed (BFMs #5 and #4).
340
341 (% style="text-align:center" %)
342 [[image:LX3V-4PG_html_159c549ad122fb42.png||class="img-thumbnail" height="285" width="600"]]
343
344 * **[BFMs#18 and #17] Set position (I) P (I)**
345
346 Motor system: 0 to ±999,999 PLS. Machine system and combined system: 0 to ±999,999
347
348 This is the target position or the travel distance for operation. When the absolute position is used, the rotation direction is determined in accordance with the absolute value of the set position based on the current position (BFMs #26 and #27). When the relative position is used, the rotation direction is determined by the sign of the set position.
349
350 * **[BFMs #20 and #19] Operating speed (I) V (I)**
351
352 The range is 10 to 100,000 Hz.
353
354 This is the actual operating speed within the range between the bias speed V,,bia,, and the maximum speed V,,max,,. In variable speed operation and external command positioning operation, forward rotation or reverse rotation is performed in accordance with the sign (positive or negative) of this set speed.
355
356 * **[BFMs #22 and #21] Set position (II) P (II)**
357
358 Motor system: 0 to ±999,999 PLS. Machine system and combined system: 0 to ±999,999
359
360 This is the set position for the second speed in two-speed positioning operation.
361
362 * **[BFMs #24 and #23] Operating speed (II) V (II)**
363
364 The range is 1 to 200,000Hz
365
366 This is the second operating speed in two-speed positioning operation.
367
368 * **[BFMs #27 and #26] Current position CP**
369
370 Motor system: -2,147,483,648 to +2,147,483,647 Hz. Machine system and combined system: -2,147,483,648 to +2,147,483,647
371
372 The current position data is automatically written here.
373
374 * **Position Data, Home Position and Current Position**
375
376 The position data includes the following: HP: Home position, P (I): Set position (I), P(II): Set position (II) and CP: Current position.
377
378 When the operation of returning to the machine home position is completed, the home position HP (BFMs #14 and #13) value is automatically written to the current position CP (BFMs #27 and #26).
379
380 The set positions P(I) and P(II) can be treated as absolute positions (distance from the current position CP = 0) or relative positions (travel from the current stop position) as described later.
381
382 * **Operation Command**
383
384 **[BFM #25] Operation command (b0 to b11, b12)**
385
386 After data is written to the BFMs #0 to #24, write the BFM #25 (b0 to b12) as follows.
387
388 1. When b0 = 1: The error flag (BFM #28 b7) is reset.
389 1. When b1 = 0→1: Stop, if this bit is changed from 0 to 1 in positioning mode, the machine is decelerated and stopped.
390 1. When b2 = 1: Forward pulse stop, the forward pulse is immediate stopped in the forward limit position.
391 1. When b3 = 1: Reverse pulse stop, the reverse pulse is immediate stopped in the reverse limit position.
392 1. When b4 = 1: JOG+ operation, when b4 continues to be 1 for less than 300ms, one forward pulse is generated. When b4 continues to be 1 for 300 ms or more, continuous forward pulses are generated.
393 1. When b5 = 1: JOG- operation, when b5 continues to be 1 for less than 300ms, one reverse pulse is generated. When b5 continues to be 1 for 300 ms or more, continuous reverse pulses are generated.
394 1. When b6 = 0→1: Home position return start, the machine starts to return to the home position, and is stopped at the machine home position when the DOG input (near point signal) is given.
395 1. When b7 = 0: Absolute position. When b7 = 1: Relative position. The relative or absolute position is specified in accordance with the b7 status (1 or 0). (This bit is valid while operation is performed using b8, b9 or b10.)
396 1. When b8 = 0→1: Single-speed positioning operation is performed.
397 1. When b9 = 0→1: Interrupt single-speed positioning operation is performed.
398 1. When b10 = 0→1: Two-speed positioning operation is performed.
399 1. Reserved
400 1. When b12 = 1: Variable speed operation is performed.
401
402 **Operation command data transfer method**
403
404 * Error can be reset by forcedly turning on/off the peripheral unit. The input X000 does not have to be used. When the data on absence/presence of error and the error code should be saved even after power interrupt, use power down save register.
405 * In operation which does not require returning to the home position such as inching operation with a constant feed rate, the input X006 is not required.
406
407 (% style="text-align:center" %)
408 [[image:LX3V-4PG_html_3d648b433d213dfd.png||class="img-thumbnail" height="370" width="900"]]
409
410 * In the program below, the start bit for the operation mode cannot be set to OFF inside the PGU, so operation from the second time and later cannot be performed. Correct it as shown in the right.
411
412 (% style="text-align:center" %)
413 [[image:LX3V-4PG_html_d88dd0506b0a57bf.png||class="img-thumbnail" height="127" width="600"]]
414
415 = **9 Status and Error Codes** =
416
417 * **[BFM #28] Status information (b0 to b10)**
418
419 The status information to notify the PC of the PGU status is automatically saved in the BFM #28. Read it into the PC using the FROM instruction.
420
421 1. When b0 = 0: BUSY. When b0 = 1: READY. This bit is set to BUSY while the PGU is generating pulses.
422 1. When b1 = 0: Reverse rotation. When b1 = 1: Forward rotation. This bit is set to 1 when operation is started with forward pulse.
423 1. When b2 = 0: Home position return unexecuted. When b2 = 1: Home position return completed. When returning to the home position is completed, b2 is set to 1, and continues to be 1 until the power is turned off. To reset b2, use the program.
424 1. When b3 = 0: STOP input OFF. When b3 = 1: STOP input ON.
425 1. When b4 = 0: DOG input OFF. When b4 = 1: DOG input ON.
426 1. Reserved
427 1. When b6 = 1: Current position value overflow. The 32-bit data saved in the BFMs (#27 and#26) has overflown. This bit is reset when returning to the home position is completed or the power is turned off.
428 1. When b7 = 1: Error flag, b7 becomes 1 when an error has occurred in the PGU, and the contents of the error are saved in the BFM #29. This error flag is reset when the BFM #25 b0 becomes 1 or the power is turned off.
429 1. When b8 = 0: Positioning started. When b8 = 1: Positioning completed b8 is cleared when positioning is started home position return start, or error reset, and set when positioning is completed. b8 is also set when returning to the home position is completed.
430 1. CLR signal, when returning to the home position is completed, CLR signal is output, the duration is XXX ms.
431 1. When b10=0: interrupt input OFF. When b10 = 1: interrupt input ON.
432
433 * Various start commands are accepted exclusively while the BFM #28 b0 is set to 1 (READY).
434 * Various data is also accepted exclusively while the BFM #28 b0 is set to 1 (READY). However, the BFM #25 b1 (stop command), the BFM #25 b2 (forward pulse stop) and the BFM #25 b3 (reverse pulse stop) are accepted even while the BFM #28 b0 is set to 0 (BUSY)
435
436 (% style="text-align:center" %)
437 [[image:LX3V-4PG_html_d166ba395b9da027.png||class="img-thumbnail" height="545" width="700"]]
438
439 * **[BFM #29] Error code number**
440
441 The following error codes Nos. are saved in the BFM#29. Read and check it when the BFM #28 b7 is set to 1 (Error present).
442
443 001: Large/small relationship is incorrect. (V max <Vbia or V RT < V CR);
444
445 002: Setting is not performed yet. (V (I), P (I), V (II) or P (II));
446
447 003: Setting range is incorrect;
448
449 00 indicates the corresponding BFM No. For example, “172" indicates that the BFMs #18 and #17 are set to 0. “043" indicates that the BFMs #5 and #4 are set to a value outside the range.
450
451 When a speed command specifies a value equivalent to or more than V max or a value equivalent to or less than Vbia, error does not occur. V max or Vbia is used for operation. Though the ready status can be specified even while an error is present, the start command is not accepted.
452
453 == **9.1 Function description** ==
454
455 Seven operation modes are available in the PG in accordance with the start command type. The data on speed and position should be transferred preliminarily from the PC to the buffer memories (BFMs) of the PG.
456
457 = **10 JOG operation** =
458
459 While the forward or reverse button is pressed and held, the motor is driven forward or in reverse.
460
461 (% style="text-align:center" %)
462 [[image:LX3V-4PG_html_ad2c03a6a25bb100.png||class="img-thumbnail" height="207" width="400"]]
463
464 Any value between the bias speed V,,bia,, (BFM #6) and the maximum speed V,,max,, (BFMs #5 and #4) is valid as the command speed V,,JOG,, (BFMs #8 and #7). When JOG signal continues to be 1 for less than 300ms, one reverse pulse is generated. When JOG signal continues to be 1 for 300 ms or more, continuous reverse pulses are generated.
465
466 **Machine home position return operation**
467
468 When the home position start command is received, the motor makes the machine return to the home position. When returning to the home position is completed, the home position HP (BFMs #14 and #13) value is written to the current position CP (BFMs #27 and #26).
469
470 (% style="text-align:center" %)
471 [[image:LX3V-4PG_html_877fe39646739cde.png||class="img-thumbnail" height="183" width="400"]]
472
473 * When the home position return start command is changed from OFF to ON, the home position return operation is started at the speed V RT (BFMs #10 and #9).
474 * When the near point signal DOG input is turned on, the motor decelerates to the creep speed V CR (BFM #11).
475 * When the near point signal DOG input is changed from ON to OFF, the motor is immediately stopped in the position 4).
476
477 For the details, refer to “DOG Switch” and “Home Position Return Operation”
478
479 = **11 DOG Switch** =
480
481 DOG switch for returning to home position
482
483 (% style="text-align:center" %)
484 [[image:LX3V-4PG_html_1462d6ed9d95fa59.png||class="img-thumbnail" height="229" width="400"]]
485
486 * A dog whose length is L is fixed to a table driven in the left and right direction by a servo motor via a ball thread.
487 * When the table moves in the home position return direction, the dog is in contact with the limit switch (LSD) for near point detection, and the LSD is actuated.
488 * The LSD is turned ON from OFF when the BFM #3 b12 is set to 0, and turned OFF from ON when the BFM #3 b12 is set to 1.
489 * The home position return direction is determined by the BFM #3 b9 (rotation direction) and b10 (home position return direction).
490 * The limit switch LSD is often referred to as dog switch. The actuation point of the dog switch is rather dispersed.
491
492 1. **Home Position Return Operation**
493
494 The home position return operation varies depending on the start position.
495
496 (% style="text-align:center" %)
497 [[image:LX3V-4PG_html_b7f046f5cdca216.png||class="img-thumbnail" height="188" width="400"]]
498
499 1. The near point signal is turned off (before the DOG passes).
500 1. The near point signal is turned on.
501 1. The near point signal is turned off (after the DOG has passed).
502
503 For this operation, the limit switches for detecting the forward limit and the reverse limit should be provided on the PC.
504
505 When the limit switch for limit detection is actuated, the home position return operation is not performed even if the home position return operation is started. Move the dog by performing the JOG operation so that the limit switch for limit detection is not actuated, then start the home position returns operation.
506
507 1. The example above shows the case where the BFM #3 b12 is set to 0 (DOG input polarity OFF→ON).
508 1. When the limit switch for limit detection is turned on, the pulse output is immediately stopped (BFM #25 b3: ON). At this time, the clear signal is also output.
509
510 [[image:LX3V-4PG_html_12fc794d28fc726.png||class="img-thumbnail"]] **When the stepper motor is used**
511
512 When the stepper motor is used, rigid attention should be paid to the following items.
513
514 1. If the motor capacity is not sufficient compared with the load torque, the motor may stall. In such a case, even if the specified quantity of pulses are supplied the motor, the expected drive quantity may not be obtained.
515 1. Start and stop the motor slowly enough (by setting a long acceleration/deceleration time to the BFM #15) so that the acceleration/ deceleration torque does not become excessive.
516 1. A resonance point is present in low speed operation. It is recommended to avoid this point. Set the bias speed (BFM #6), and do not perform operation at a speed slower than that.
517 1. An external power supply may be required for signal communication with the drive amplifier
518
519 **Single-Speed Positioning Operation**
520
521 When the start command is given, the motor accelerates up to the operating speed V (I) (BFMs #20 and #19), then decelerates and stops in the set position P(I) (BFMs #18 and #17).
522
523 (% style="text-align:center" %)
524 [[image:LX3V-4PG_html_a7a6fd6ba9fc4199.png||class="img-thumbnail" height="184" width="400"]]
525
526 **Interrupt Single-Speed Positioning Operation**
527
528 (% style="text-align:center" %)
529 [[image:LX3V-4PG_html_4dc171ea85e1220f.png||class="img-thumbnail" height="228" width="400"]]
530
531 When the start command is received, the motor starts operation. When the INTERRUPT input is received, the motor moves by the specified distance, then stops (The relative travel exclusively can be specified.) The current value is cleared by the start command. The current value starts to change by the INTERRUPT input, and becomes equivalent to the set position when the operation is completed.
532
533 **Two-Speed Positioning Operation**
534
535 (% style="text-align:center" %)
536 [[image:LX3V-4PG_html_b77df89d18c43372.png||class="img-thumbnail" height="202" width="400"]]
537
538 The motor performs the following operation by the two-speed positioning operation command. Approach at high speed as well as processing and moving forward at low speed can be performed. When the start command is received, the motor performs positioning at the operating speed V(I) (BFMs #20 and #19) until the set position P(I) (BFMs #18 and #17), then at the operating speed V(II) (BFMs #24 and #23) until the set position P(II) (BFMs #22 and #21) (two-step speed).
539
540 **Variable Speed Operation**
541
542 * When the operation command BFM #25 b12 is set to 1, the speed pulses specified in the BFMs (#20 and #19) are generated.
543 * This operating speed can be freely changed even while pulses are generated. However, acceleration and deceleration must be controlled by the PC.
544 * Only b0 (error reset) and b12 (variable speed operation) of the operation command BFM #29 are valid in this mode.
545
546 When b12 is set to 1, variable speed operation is performed.
547
548 When b12 is set to 0, pulse output is stopped.
549
550 (% style="text-align:center" %)
551 [[image:LX3V-4PG_html_735a15a6a93c266d.png||class="img-thumbnail" height="208" width="400"]]
552
553 * The pulse output does not stop even if “0” is written in BFM #21, #20
554 * As for the parameter BFM #3, only b1 and b0 (system of units) and b8 (pulse output format) are valid.
555 * The rotation direction (forward or reverse) can be specified by the sign (positive or negative) of the speed command (BFMs #20 and #19)
556
557 The procedure of changing the direction of the rotation
558
559 1. Turn OFF b12 of BFM #25.
560 1. Change the value at drive speed (BFM #20, BFM #19).
561 1. Again, turn ON b12 of BFM #25.
562
563 = **12 Common Matter for Operation Modes** =
564
565 * **Handling the stop command**
566
567 In all operation modes, the stop command is valid at any time during operation. However, if a stop command is received during a positioning operation, the motor decelerates and stops. And after restarting, the motor doesn't travel by the remaining distance, but the next positioning operation.
568
569 * ​​​​​​​**About multiple commands**
570
571 When the bits which determine operation modes such as b4, b5 and b8, b10 are turned on simultaneously in the operation command BFM #25, any operation is not executed. If other mode input is turned on while operation is being performed in any mode, such an input is neglected.
572
573 * ​​​​​​​**When travel time is small**
574
575 When the travel time is small compared to the acceleration/deceleration time (Ta), the motor cannot realize specified speed.
576
577 * Single-speed positioning operation
578
579 (% style="text-align:center" %)
580 [[image:LX3V-4PG_html_cfc4732b4e37fa45.png||class="img-thumbnail" height="225" width="400"]]
581
582 * Interrupt single operation
583
584 (% style="text-align:center" %)
585 [[image:LX3V-4PG_html_76edbb4c65fd3cd3.png||class="img-thumbnail" height="212" width="400"]]
586
587 * Two-speed positioning operation
588
589 (% style="text-align:center" %)
590 [[image:LX3V-4PG_html_2beb6801972ccbe1.png||class="img-thumbnail" height="187" width="600"]]
591
592 * **Connection of DOG and X Inputs and Handling of Limit Switches for Limit Detection**
593
594 Various limit switch inputs are connected to the DOG input and the X input in accordance with the operation mode.
595
596 The polarity of these limit switch inputs is inverted by the state of the BFM #3 b12 and b6.
597
598 To assure safety, provide limit switches for detecting the forward and reverse limits on the servo amplifier also.
599
600 Make sure so that the limit switches on the PLC are actuated simultaneously with or a little earlier than the limit switches on the servo amplifier.
601
602 Because a drive amplifier for a stepper motor does not have these terminals, make sure to provide limit switches on the PLC.
603
604 Evade from the state of the pulse output stop by Jog in the opposite direction when forward pulse stop or reverse pulse stop is turned on.
605
606 (% style="text-align:center" %)
607 [[image:LX3V-4PG_html_f795aac75a3e73ac.png||class="img-thumbnail" height="219" width="400"]]
608
609 = **13 Example** =
610
611 The reciprocation by single-speed positioning
612
613 Do not put the load on the motor for safety when you confirm the operation according to this program example.
614
615 1. The position of the motor moves to the machine home position according to the home position return start instruction now. (Machine home position return operation) At this time, the machine home position address is assumed to be “0”.
616 1. While the forward or reverse button is pressed and held, the motor is driven forward or in reverse. (Jog operation)
617 1. The value of the motor advances 10000 mm according to the automatic drive start instruction.
618 1. After wards, Y000 is turned on for two seconds as a stand by display stopping and at this time. Finally, the value of the motor retreats by 10000 mm. (Single-speed positioning operation)
619
620 (% class="table-bordered" %)
621 |(% colspan="2" %)**Input**|**Output**|4PG terminals
622 |X000: error reset|X005:JOG- operation|(% rowspan="5" %)Y000: display|DOG: input return signal
623 |X001: stop command|X006: start home return|FP: Pulse output to servo amplifier PP
624 |X002: stop forward pulse|(% rowspan="3" %)X007: Single-speed positioning operation|RP: pulse output direction
625 |X003: stop reverse pulse|(% rowspan="2" %)
626 |X004: JOG+ operation
627
628 (% style="text-align:center" %)
629 [[image:LX3V-4PG_html_d551759788b9cd25.png||class="img-thumbnail" height="1376" width="1400"]]
630
631 = **14 Diagnostic** =
632
633 Preliminary Checks and Error Indication
634
635 **To ensure correct operation**
636
637 1. Make sure that the PG I/O wiring and the extension cable connections are correct.Indicate clearly the special block No. on the panel face by adhering the labels offered as accessories.
638 1. In any positioning operation, the specified data should be written preliminarily to the BFMs #0 to #24, and then the BFM #25 should give an appropriate command. Otherwise, the PG does not function.
639
640 **Error indication**
641
642 * LED indication
643
644 The PG panel has the following LEDs:
645
646 Power indication: The POWER LED is lighted when 5 V power is supplied from the PLC.
647
648 Input indication: When DOG or X is received by the PG, the corresponding LED is lighted respectively.
649
650 Output indication: When FP or RP is output by the PG, the corresponding LED is lighted respectively.
651
652 Error indication: When an error occurs, the ERR LED flashes.
653
654 * Error check
655
656 Errors are indicated by BFM#28 bit 7. Various errors can be checked by reading the contents of the BFM #29 to the PC.
657
658 43 WECON Technology Co., Ltd.