Wiki source code of LX5V-2ADVDAV

Last modified by Wecon on 2025/09/03 21:02

Show last authors
1 = **1.Installation** =
2
3 * Before installation, it must be ensured that the PLC host and the related device of the BD module terminal wiring are powered off reliably. The module shell is inserted into the BD module slot of PLC host, and then locked with two standard screws for fixation.
4 * Two standard terminal heads are equipped with this BD module. After connecting the wiring, insert them into its terminal. After confirming that the host, BD module, wiring, etc. are installed correctly, it can be powered on for use.
5 * **✎Note:**
6 ** When DAV current is output, ensure that the external load resistance is greater than or equal to 2KΩ. If the external load resistance is less than 2KΩ, the output current will be lower than normal value.
7 ** The ADV input cannot exceed the absolute maximum (-15V/+15V), otherwise the BD module will be damaged.
8 ** Please install the BD module firmly and fix it on PLC. Poor contact may lead to failure.
9 ** Tightening torque for fixing BD module or PLC top cover is 0.3N.m to 0.6N.m. Please tighten it firmly to avoid malfunction.
10 ** You can only use one LX5V-2ADV2DAV-BD on the PLC main unit of LX5 series.
11 * **Warning: Cut off the power before installing, removing or wiring the BD module to avoid electric shock or product damage.**
12
13 = **2. Appearance and terminal** =
14
15
16 [[image:image-20221223103536-1.png]]
17
18 Table1 Terminal distribution
19
20 |(% colspan="2" %)(((
21 **IN_2ADV part**
22
23 **Input voltage range: -10Vto10V**
24 )))|(% colspan="2" %)(((
25 **OUT_2DAV part**
26
27 **Voltage output range: -10Vto10V**
28 )))
29 |Vi2-|(((
30 Channel 2
31
32 Voltage input negative
33 )))|Vo2-|(((
34 Channel 2
35
36 voltage output negative
37 )))
38 |Vi2+|(((
39 Channel 2
40
41 Voltage input positive
42 )))|Vo2+|(((
43 Channel 2
44
45 Voltage output positive
46 )))
47 | |NC| |NC
48 |Vi1+|(((
49 Channel 1
50
51 Voltage input positive
52 )))|Vo1+|(((
53 Channel 1
54
55 Voltage output positive
56 )))
57 |Vi1-|(((
58 Channel 1
59
60 Voltage input negative
61 )))|Vo1-|(((
62 Channel 1
63
64 voltage output negative
65 )))
66
67 Table2 LED lamp function description
68
69 |**Indicator lamp**|**Description**
70 |PWR|ON when power-on (when the program is running, it will be ON).
71 |COM|It flashes when communicating with PLC normally, and it is OFF when timeout.
72 |CH1|Channel 1 lamp: Always on in range; Flashing outside the range of (-10V to 10V); Off when the channel is closed.
73 |CH2|Channel 2 lamp: Always on in range; flashing outside the range of (-10V to 10V); Off when the channel is closed.
74 |CH3|(((
75 Channel 3 lamp: Set it always on in the digital value of -2000to 2000 (-10V to 10V); Flashes outside the digital value of -2000 to2000 (-10V to 10V).
76
77 When the channel is open, the light is on, and the voltage is output; When the channel is closed, the light is off, and the voltage is not output (approaching 0).
78 )))
79 |CH4|Channel 4 lamp: Set it always on in the digital value of -2000to 2000 (-10V to 10V); Flashes outside the digital value of -2000 to2000 (-10V to 10V). When the channel is open, the light is on, and the voltage is output; When the channel is closed, the light is off, and the voltage is not output (approaching 0).
80
81 = **3.Specification** =
82
83 1. General specification: Same as PLC main unit. (Please refer to the accompanying manual of the PLC main unit.)
84 1. Power supply specification: The power supply is provided internally by PLC.
85 1. Performance specifications:
86
87 |**Project**|**Description**
88 |Power supply|24VDC±10%, 50mA; 5VDC±10%, 70mA (The power supply is provided internally by host)
89 |(% colspan="2" %)**ADV section**
90 |Analog input range|DC -10V to 10V (input resistor 160KΩ). ✎Note: If the input voltage exceeds ±15V, the unit will be damaged.
91 |Rated range|(-10V to10V: -2000 to 2000)
92 |Maximum display range|-2048 to 2048
93 |Resolution|5mV (10V default range 1/2000)
94 |Comprehensive precision|±0.5% of full scale
95 |A/D conversion time|1 scan cycle (A/D conversion after ladder diagram END instruction is executed, and BD channel mapping value is updated)
96 |Input features|[[image:image-20221223104016-6.png]]
97 |Insulation|There is no insulation between the channels of the module
98 |Points occupied|0 point (2ADV is not affected by the standard maximum control points of the main PLC because it is operated through the data register)
99 |(% colspan="2" %)**DAV section**
100 |Analog output range|DC -10V to 10V (external load resistance ≥ 2KΩ)
101 |Rated range|(-2000 to 2000:-10V to 10V)
102 |Digital output|12-bit binary
103 |Resolution|5mV (10V default range 1/2000)
104 |Comprehensive precision|±0.5% of full scale
105 |D/A conversion time|One scan cycle (D/A conversion after ladder diagram END instruction is executed, and BD channel output value is updated)
106 |Output features|[[image:image-20221223103722-5.png]]
107 |Points occupied|0 point (2ADI is not affected by the standard maximum control points of the main PLC because it is operated through the data register)
108
109 = 4.Wiring =
110
111 |[[image:image-20221223104148-7.png]]
112 |Cut off the power before installing, removing or wiring the BD module to avoid electric shock or product damage.
113
114 **✎Note:**
115
116 * \\
117 ** Do not place signal cables near high voltage power cables or in the same trunk line. Otherwise, it may be disturbed or surged. Keep a safe distance between signal cable and power cable, at least 100mm.
118 ** Ground the shielding of shielded wire or shielded cable. But the ground point and high voltage line cannot be the same.
119 ** Do not connect cables of impermissible size to avoid poor contact or product damage.
120 ** Fix the cable so that no force directly acts on the terminal line or cable connection area.
121 ** The tightening torque of terminal is 0.5Nm to 0.6N.m. Please tighten it to prevent malfunction.
122 ** Do not use empty terminals.
123
124 === **4.1 Applicable cables** ===
125
126 1. AWG25-16 is used for connection with output device.
127 1. Maximum terminal tightening torque is 0.5N.m to 0.6N.m.
128 1. Using different types of cables may cause poor contact with terminals. Please use pressfit terminals for good contact.
129
130 **Line number and cross-sectional area**
131
132
133 |**Line number**|**Cross-sectional area (mm^^2^^)**|**End processing**
134 |AWG26|0.1288|(% rowspan="3" %)(((
135 Stranded cable: Strip off the sheath, rub the core wire, and then connect the cable.
136
137 Single-core cable: Strip off the sheath and connect the cable.
138 )))
139 |...|...
140 |AWG16|1.309
141
142 [[image:image-20221223104252-9.png]]
143
144 === **4.2 I/O Mode** ===
145
146 [[image:image-20221223104446-10.png]]
147
148
149 1. Analog inputs are received via twisted-pair shielded cables away from power lines or other wires that may cause electrical interference.
150 1. If there is voltage fluctuation in the input or electrical interference in the external wiring, a smoothing capacitor can be connected (0.1uF to 0.47uF, 25V).
151
152 [[image:image-20221223104534-11.png]]
153
154 1. When using twisted pair shielded cables for the analog outputs, the cables should be located away from power lines or other wires that may generate electrical interference.
155 1. Use single point grounding at the load end of the output cable. (Level 3 grounding: no more than 100 Ω).
156
157 If there is electrical noise or voltage fluctuation in the output, a smoothing capacitor(0.1 uF to 0.47 uF, 25V) can be connected
158
159 = **5.Description of PLC device** =
160
161 1. When connected to LX3 series PLC, please refer to LX3 series BD module manual.
162 1. When connected to LX5 series PLC, if the firmware version of PLC is lower than 2.051 (excluding 2.051), or BD module is not configured by host computer, it can be controlled by the following system devices:
163
164 Table3Device allocation
165
166 |**PLC model**|**BD Model**|**Devices**|(% colspan="2" %)**Description**|**Devices**|**Description**
167 |(% colspan="1" rowspan="4" %)LX5V|(% colspan="1" rowspan="4" %)2ADV2DAV|SM2010|CH1 voltage input channel open flag|(% colspan="1" rowspan="4" %)(((
168 OFF: Open
169
170 ON: Close
171 )))|SD2010|(((
172 CH1 digital value
173
174 (-10V to10V: -2000 to 2000)
175 )))
176 |SM2011|CH2 voltage input channel open flag|SD2011|(((
177 CH2 digital value
178
179 (-10V to10V: -2000 to 2000)
180 )))
181 |SM2012|CH3 current output channel open flag|SD2012|(((
182 CH3 digital value
183
184 (-2000 to 2000:-10V to 10V)
185 )))
186 |SM2013|CH4 current output channel open flag|SD2013|(((
187 CH4 digital value
188
189 (-2000 to 2000:-10V to 10V)
190 )))
191
192 3. You can select device through I/O mapping to use the configuration function of new BD module. For details, please refer to "[[6.1 Parameter configuration>>path:#_6.1 参数配置]]".
193
194 = **6. Instructions** =
195
196 === **6.1 Parameter configuration** ===
197
198 ① Open the host computer software and create a new project, in “Project Manager” → “Extended Function” , double-click "BD Module Configuration" **^^Note^^**to enter “BD settings” interface;
199
200 ② Configure the currently connected PLC (take the LX5V-2416 model as an example) and BD module model on the BD module configuration interface: Select “LX5V-2ADV2DAV" in the device bar on the right side of the BD module configuration interface and double-click to add it to the corresponding slot position of PLC (slot number 1 or 2, the software will select slot 1 by default, and right-click to move down to slot 2);
201
202 ③ After adding the BD module to the slot, double-click or right-click to select configuration parameters to enter LX5V-2ADV2DAV-BD configuration parameters interface, as shown in the following figure. Configure related parameters on this interface.
203
204
205 [[image:image-20221223105418-12.png]]
206
207 **Note: This function is only supported in the following versions of host computer, slave computer and BD module:**
208
209 (1) Supported host computer software versions: Wecon PLC Editor2 2.1.204 and above, as shown in the following figure:
210
211 [[image:image-20221223105439-13.png||height="430" width="721"]]
212
213 (2) Supported PLC firmware: 2.051 and above, as shown in the following figure:
214
215 [[image:image-20221223105636-14.png]]
216
217 (3) Supported BD module version number: 1013 and above, as shown in the following figure:
218
219 [[image:image-20221223105652-15.png||height="81" width="1148"]]
220
221 **The parameter configuration interface is as below:**
222
223 ~1. Module setting: Set response time (The response time is the interval time between PLC acquisition of BD module data. Range: 0.1ms to 3276.7ms).
224
225 [[image:image-20221223105755-16.png]]
226
227 2.ADV configuration:
228
229 [[image:image-20221223105813-17.png]]
230
231 * Check enable channel to set whether to enable the current BD module channel.
232 * The conversion mode is set to ADV conversion mode by default. The measurement range is -10V to 10V (-2000 to 2000).
233 * Setting the filtering intensity can reduce the jitter of BD channel value. The default configuration of filter intensity is 4. Level 0 is the lowest and level 9 is the highest. The filter intensity can be adjusted according to actual use.
234 * Check enable calibration, you could calculate the gain offset according to the following formula to convert the corresponding channel value:
235
236 Channel value = digital value × gain value + offset value
237
238 * When the channel value deviates, you could also set the gain offset to calibrate the channel. For example:
239
240 * When the channel input analog is 10V, the digital quantity of BD module acquisition channel value is 1970, and the actual digital value should be 2000.
241 * When the channel input analog quantity is 0V, the digital quantity of BD module acquisition channel value is 30, and the actual digital value should be 0.
242
243 Suppose the gain is a, and the offset is b, then[[image:image-20221223105952-18.png]]
244
245 Solve and get[[image:image-20221223110026-19.png]]The calibration can be completed by setting the corresponding gain offset to the current channel.
246
247 3.DAV configuration:
248
249 [[image:image-20221223110244-21.png]]
250
251 * Check enable channel to set whether to enable the current BD module channel.
252 * The conversion mode is set to DAV conversion mode by default, and the measurement range is -10V to 10V (-2000 to 2000).
253 * Output state after stop: When PLC stops, the output state of BD module channel mainly includes the following three types:
254
255 Output clear: When PLC stops, the output voltage of BD module channel is 0V.
256
257 Output hold: When PLC stops, the channel output of the BD board maintains the digital voltage value set by the corresponding channel in the current I/O mapping device.
258
259 Output preset value: When the PLC STOP, the BD module channel outputs the voltage value corresponding to the preset digital quantity or the preset analog quantity.
260
261 * Check enable calibration, you could calculate the gain offset according to the following formula to convert the corresponding channel value:
262
263 Channel input digital value = digital quantity of the actual voltage output pair × gain value + offset value
264
265 * When the channel value deviates, you could also set the gain offset to calibrate the channel. For example:
266
267 * When the channel input digital value is 0, the multimeter measures the output voltage of BD module channel to be 0.5V (corresponding digital value is 100).
268 * When the channel input digital value is 2000, the multimeter measures the output current of BD module channel to be 9.5V (corresponding digital value is 1900).
269
270 Suppose the gain is a, and the offset is b, then[[image:image-20221223110338-23.png]]
271
272 Solve and get[[image:image-20221223110348-24.png]] The calibration can be completed by setting the corresponding gain offset to the current channel.
273
274 4.Set I/O mapping. The channels are mapped to R device according to the current number of BD module channels by default. As shown in the following figure, BD module CH1 to CH4 is mapped to device R0 to R3.
275
276 [[image:image-20221223110908-25.png]]
277
278 5.After the above configuration is completed, check the program, download the configuration to PLC, and STOP→RUN configuration takes effect.
279
280 [[image:image-20221223110942-26.png]]
281
282 === **6.2 Ladder Diagram** ===
283
284 1. Programming example that does not use the host computer software "BD module configuration" function. For device allocation, please refer to "[[5 PLC device description>>path:#_PLC软元件说明]]".[[image:image-20221223111122-27.png]]
285 1. (((
286 .Programming example using the "BD module configuration" function of host computer software:[[image:image-20221223111206-28.png]]
287 )))
288
289 === **6.3 BD monitoring interface and buffer memory** ===
290
291 Open the module monitoring interface, select BD module, select LX5V-2ADV2DAV from the list of BD modules on the right to monitor it online, and check the current BD module communication status and error information in time.
292
293 [[image:image-20221223111322-29.png]]
294
295 ① ADV buffer memory (BFM): used for BD module status monitoring.
296
297 |(((
298 **BFM**
299
300 **Address**
301 )))|**Power-off hold**|**Read/write**|**Memory name**|**Default**|**Range**|**Description**
302 |0x2000|×|R/W|Channel 1 channel enable|1|0 to 1|0: Channel closed; 1: Channel open
303 |0x2001|×|R/W|Channel 1 channel mode selection|1|1|0: Voltage mode (-10V to 10V)
304 |0x2002|×|R/W|Channel 1 filter intensity|4|0 to 9|0: Minimum filter strength; 9: Maximum filter strength
305 |0x2080|×|R|Channel 1 channel value|0|-2000 to 2000|
306 |0x2082|×|R|Channel 1 status information|0|0 to 2|(((
307 0: Channel closed; 1: Channel opened
308
309 2: Channel value exceeds the range
310 )))
311 |0x2084|×|R|Channel 1 error code|0|0 to 1|0: No error; 1: Channel value exceeds the range
312 |0x2100|×|R/W|Channel 2 channel enable|1|0 to 1|0: Channel closed; 1: Channel open
313 |0x2101|×|R/W|Channel 2 channel mode selection|1|1|0: Voltage mode (-10V to 10V)
314 |0x2102|×|R/W|Channel 2 filter intensity|4|0 to 9|0: Minimum filter strength; 9: Maximum filter strength
315 |0x2180|×|R|Channel 2 channel value|0|-2000 to 2000|
316 |0x2182|×|R|Channel 2 status information|0|0 to 2|(((
317 0: Channel closed; 1: Channel opened
318
319 2: Channel value exceeds the range
320 )))
321 |0x2184|×|R|Channel 2 error code|0|0 to 1|0: No error; 1: Channel value exceeds the range
322
323 ② DAV buffer memory (BFM): used for BD module status monitoring.
324
325 |(((
326 **BFM**
327
328 **Address**
329 )))|**Power-off hold**|**Read/write**|**Memory name**|**Default**|**Range**|**Description**
330 |0x2200|×|R/W|Channel 3 channel enable|1|0 to 1|0: Channel closed; 1: Channel open
331 |0x2201|×|R/W|Channel 3 channel mode selection|0|0|0: Voltage mode (-10V to 10V)
332 |0x2203|×|R/W|Output status after channel 3 stops|0|0 to 2|(((
333 0: Output cleared; 1: Output held
334
335 2: Output preset value
336 )))
337 |0x2204|×|R/W|Channel 3 output preset value|0|-32768 to 32767|
338 |0x2280|×|R|Channel 3 channel value|0|-2000 to 2000|Only supported in channel mapping device setting
339 |0x2282|×|R|Channel 3 status information|1|0 to 2|(((
340 0: Channel closed; 1: Channel opened
341
342 2: Channel value exceeds the range
343 )))
344 |0x2284|×|R|Channel 3 error code|0|0 to 1|0: No error; 1: Channel value exceeds the range
345 |0x2300|×|R/W|Channel 4 channel enable|1|0 to 1|0: Channel closed; 1: Channel open
346 |0x2301|×|R/W|Channel 4 channel mode selection|0|0|0: Voltage mode (-10V to 10V)
347 |0x2303|×|R/W|Output status after channel 4 stops|0|0 to 2|(((
348 0: Output cleared; 1: Output held
349
350 2: Output preset value
351 )))
352 |0x2304|×|R/W|Channel 4 output preset value|0|-32768 to 32767|
353 |0x2380|×|R|Channel 4 channel value|0|-2000 to 2000|Only supported in channel mapping device setting
354 |0x2382|×|R|Channel 4 status information|1|0 to 2|(((
355 0: Channel closed; 1: Channel opened
356
357 2: Channel value exceeds the range
358 )))
359 |0x2384|×|R|Channel 4 error code|0|0 to 1|0: No error; 1: Channel value exceeds the range
360
361 ③ Universal buffer memory (BFM): used to diagnose the communication status of the currently connected BD module.
362
363 |(((
364 **BFM**
365
366 **Address**
367 )))|**Power-off hold**|(((
368 **Read/write**
369
370 **Function**
371 )))|**Memory name**|**Default**|**Range**|**Description**
372 |0x200|×|R|Current maximum package length|0|0 to 0xFFFF|The maximum length of the currently sent package
373 |0x202|×|R|Number of retransmissions|0|0 to 0xFFFF|Number of retransmissions
374 |0x204|×|R|Number of retransmissions of subpackages|0|0 to 0xFFFF|Number of retransmissions of subpackages
375 |0x206|×|R|Received times of sync frames|0|0 to 0xFFFF|Received times of sync frames
376 |0x208|×|R|Sent times of sync frame|0|0 to 0xFFFF|Sent times of sync frame
377 |0x20A|×|R|Control the number of transmissions|0|0 to 0xFFFF|Control the number of transmissions
378 |0x20C|×|R|Control the number of receptions|0|0 to 0xFFFF|Control the number of receptions
379 |0x20E|×|R|Number of subscriptions sent|0|0 to 0xFFFF|Number of subscriptions sent
380 |0x210|×|R|Number of subscriptions received|0|0 to 0xFFFF|Number of subscriptions received
381 |0x212|√|R/W|Latest error code|0|Only 0 can be written.|Protocol internal error code, write 0 to clear
382 |0x214|×|R|Number of bytes sent|0|0 to 0xFFFFFFF|Number of bytes sent
383 |0x218|×|R|Number of valid bytes sent|0|0 to 0xFFFFFFF|Number of valid bytes sent
384 |0x21C|×|R|Number of bytes received|0|0 to 0xFFFFFFF|Number of bytes received
385 |0x220|×|R|Number of valid bytes received|0|0 to 0xFFFFFFF|Number of valid bytes received
386 |0x224|×|R|Communication time (unit s)|0|0 to 0xFFFFFFF|Normal communication time since the BD(((
387 module (% style="background-color:transparent" %)is powered on
388 )))