Wiki source code of LX5V-2PT2DAI

Last modified by WeconTurkey on 2024/10/16 22:58

Hide last authors
Jim 1.1 1 = **1. Installation** =
2
Karen 11.1 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.
Jim 1.1 5 * **✎Note:**
6 ** When DAI current is output, ensure that the external load resistance is less than 500Ω. If the external load resistance is greater than 500Ω, the output current will be lower than normal value.
Karen 11.1 7 ** Please install the BD module firmly and fix it on PLC. Poor contact may lead to failure.
8 ** Tightening torque for fixing BD module or PLC top cover is 0.3N.m to0.6N.m. Please tighten it firmly to avoid malfunction.
Jim 1.1 9 ** You can only use a LX5V-2PT2DAI-BD on the PLC main unit of LX5 series.
Karen 11.1 10 * **Warning: Cut off the power before installing, removing or wiring the BD module to avoid electric shock or product damage.**
Jim 1.1 11
Jim 5.1 12 = **2. Appearance and terminal** =
Jim 1.1 13
14 [[image:image-20221222110100-1.png]]
15
Jim 2.1 16 (% class="table-bordered" %)
Jim 1.1 17 |(% colspan="2" %)(((
18 **IN_2PT part**
19
20 **2-wire/3-wire PT100 thermal resistance**
21 )))|(% colspan="2" %)(((
22 **OUT_2DAI part**
23
24 **Current output range: 4mA to 20mA**
25 )))
26 |L2-|(((
27 Channel 2 sensor
28
29 signal input negative
30 )))|Io2-|(((
31 Channel 2
32
33 sensor signal output negative
34 )))
35 |L2+|(((
36 Channel 2 sensor
37
38 signal input positive
39 )))|Io2+|(((
40 Channel 2
41
42 sensor signal output positive
43 )))
44 |VI-|Sensor common pole| |NC
45 |L1+|(((
46 Channel 1 sensor
47
48 signal input positive
49 )))|Io1+|(((
50 Channel 1
51
52 sensor signal output positive
53 )))
54 |L1-|(((
55 Channel 1 sensor
56
57 Signal input negative
58 )))|Io1-|(((
59 Channel 1
60
61 sensor signal output negative
62 )))
Jim 2.1 63
64 (% class="table-bordered" %)
65 |**Indicator lamp**|**Description**
66 |PWR|ON when power-on (when the program is running, it will be ON).
67 |COM|It flashes when communicating with PLC normally, and it is OFF when timeout.
68 |CH1|Channel 1 lamp: Always on in range; Flashing outside the range of -100℃to600℃; Off when the channel is closed.
69 |CH2|Channel 2 lamp: Always on in range; Flashing outside the range of -100℃to600℃; Off when the channel is closed.
70 |CH3|(((
71 Channel 3 lamp: Set the digital value 0to 2000 (4mA) to 20mA) to be always on; Flashes outside the digital value 0 to2000 (4mA to 20mA).
72
73 When the channel is open, the light is on, and the current is output; When the channel is closed, the light is off, and the current is not output (approaching 0).
74 )))
75 |CH4|(((
76 Channel 4 lamp: Set the digital value 0to 2000 (4mA) to 20mA) to be always on; Flashes outside the digital value 0 to2000 (4mA to 20mA).
77
78 When the channel is open, the light is on, and the current is output; When the channel is closed, the light is off, and the current is not output (approaching 0).
79 )))
80
Jim 3.1 81 = 3. ** Specification** =
Jim 2.1 82
83 ~1. General specification: Same as PLC main unit. (Please refer to the accompanying manual of the PLC main unit.)
84
85 2. Power supply specification: The power supply is provided internally by PLC.
86
87 3. Performance specifications:
88
89 (% class="table-bordered" %)
90 |**Project**|(% colspan="2" %)**Description**
91 |Power supply|(% colspan="2" %)24VDC±10%, 50mA; 5VDC±10%, 70mA (The power supply is provided internally by host)
92 |(% colspan="3" %)**PT part**
93 |Analog input signal|(% colspan="2" %)Platinum thermal resistance PT100 sensor (100Ω), 3-wire, 2-channel input (CH1, CH2)
94 |Sensor current|(% colspan="2" %)1mA sensor: 100 Ω (PT100)
95 |Compensation range|-100 ℃ to 600 ℃ (recommended range)|Over range display: 32767
96 |Digital output|(% colspan="2" %)-1000 to 6000 (unit 0.1 ℃)
97 |Measurement accuracy|(% colspan="2" %)0.2℃ to 0.3℃
98 |Total accuracy|(% colspan="2" %)Full range ±0.5% (compensation range)
99 |Conversion speed|(% colspan="2" %)2 channels 50ms
100 |Conversion features|(% colspan="2" %)[[image:image-20221222110430-1.png]]
101 |(% colspan="3" %)**DAI section**
102 |Rated range|(% colspan="2" %)0 to 2000: 4mA to 20mA
103 |Analog output range|(% colspan="2" %)DC 4mA to 20mA (external load resistance ≤ 500 Ω)
104 |Digital output|(% colspan="2" %)12-bit binary
105 |Resolution|(% colspan="2" %)8uA (4mA to 20mA/2000)
106 |Comprehensive precision|(% colspan="2" %)±0.5% of full scale (4mA to 20mA: ±0.08 mA)
107 |D/A conversion time|(% colspan="2" %)One scan cycle (D/A conversion after ladder diagram END instruction is executed, and BD channel output value is updated)
108 |Output features|(% colspan="2" %)(((
109 External load is 250Ω. 0 to 2000 was converted to 4mA to 20mA.
110
111 [[image:image-20221222110430-2.png]]
112 )))
113 |Points occupied|(% colspan="2" %)0 point (2DAI is not affected by the standard maximum control points of the main PLC because it is operated through the data register)
114
115 = **4.  Wiring ** =
116
117 **Wiring instructions:**
118
119 1. 2-wire PT100: When using channel 1, L1- and VI- are shorted with wires, and the two leads of the sensor are connected to L1+ and LI- respectively. Similarly, when using channel 2, L2- and VI- are shorted with wires, and the two leads of the sensor are connected to L2+ and L2- respectively.
120 1. 3-wire PT100: When using channel 1, two leads of the same color are connected to L1- and VI- respectively, and the other lead of different color is connected to L1+. Channel 2 is connected in the same way.
121
122 |[[image:image-20221222110545-3.png]]
Karen 12.1 123 |Cut off the power before installing, removing or wiring the BD module to avoid electric shock or product damage.
Jim 2.1 124
125 **✎Note:**
126
WeconTurkey 16.1 127 *
Jim 2.1 128 ** 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.
129 ** Ground the shielding of shielded wire or shielded cable. But the ground point and high voltage line cannot be the same.
130 ** Do not connect cables of impermissible size to avoid poor contact or product damage.
131 ** Fix the cable so that no force directly acts on the terminal line or cable connection area.
132 ** The tightening torque of terminal is 0.5Nm to 0.6N.m. Please tighten it to prevent malfunction.
133 ** Do not use empty terminals.
134
135 === **4.1 Applicable cables** ===
136
137 ~1. AWG25-16 is used for connection with output device.
138
139 2. Maximum terminal tightening torque is 0.5N.m to 0.6N.m.
140
141 3. Using different types of cables may cause poor contact with terminals. Please use pressfit terminals for good contact.
142
143 **Line number and cross-sectional area**
144
145 |**Line number**|**Cross-sectional area (mm^^2^^)**|**End processing**
146 |AWG26|0.1288|(% rowspan="3" %)(((
147 Stranded cable: Strip off the sheath, rub the core wire, and then connect the cable.
148
149 Single-core cable: Strip off the sheath and connect the cable.
150 )))
151 |...|...
152 |AWG16|1.309
153
154 [[image:image-20221222110656-4.png]]
Jim 3.1 155
156 === **4.2 I/O Mode** ===
157
158 Thermal resistance PT100 input mode
159
160 [[image:image-20221222110832-1.jpeg]]
161
162 Current output mode
163
164 [[image:image-20221222110832-2.png]]
165
166 = **5. Description of PLC device** =
167
Karen 13.1 168 ~1. When connected to LX3 series PLC, please refer to LX3 series BD module manual.
Jim 3.1 169
Karen 13.1 170 2. 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:
Jim 3.1 171
Karen 13.1 172 3. User 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 参数配置]]".
Jim 3.1 173
174 **Device allocation**
175
176 |**PLC model**|**BD Model**|**Device**|(% colspan="2" %)**Description**|**Devices**|**Description**
177 |(% rowspan="4" %)LX5V|(% rowspan="4" %)2PT2DAI|SM2010|CH1 thermal resistance input channel open flag|(% rowspan="4" %)(((
178 OFF: Open
179
180 ON: Close
181 )))|SD2010|(((
182 The temperature of CH1 at 0.1°C
183
184 (-100℃ to 600℃: -1000 to 6000)
185 )))
186 |SM2011|CH2 thermal resistance input channel open flag|SD2011|(((
187 The temperature of CH2 at 0.1°C
188
189 (-100℃ to 600℃: -1000 to 6000)
190 )))
191 |SM2012|CH3 current output channel open flag|SD2012|(((
192 CH3 digital value
193
194 0 to 2000: 4mA to 20mA
195 )))
196 |SM2013|CH4 current output channel open flag|SD2013|(((
197 CH4 digital value
198
199 0 to 2000: 4mA to 20mA
200 )))
201
202 = **6. Instructions for use** =
203
204 === **6.1 Parameter configuration** ===
205
Karen 14.1 206 ① 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;
Jim 3.1 207
Karen 14.1 208 ② Configure the currently connected PLC (take the LX5V-2416 model as an example) and BD board model on the BD module configuration interface: Select “LX5V-2PTWDAI" 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);
Jim 3.1 209
Karen 14.1 210 ③ After adding the BD module to the slot, double-click or right-click to select configuration parameters to enter LX5V-2PT2DAI-BD configuration parameters interface, as shown in the following figure. Configure related parameters on this interface.
Jim 3.1 211
Jim 4.1 212 [[image:image-20221222111948-1.png]]
Jim 3.1 213
Jim 4.1 214
Karen 14.1 215 **Note: This function is only supported in the following versions of host computer, slave computer and BD module:**
Jim 3.1 216
217 (1) Supported host computer software versions: Wecon PLC Editor2 2.1.204 and above, as shown in the following figure:
218
Jim 6.1 219 [[image:image-20221222112338-1.png||height="374" width="627"]]
220
221 (2) Supported PLC firmware: 2.051 and above, as shown in the following figure:
222
223 [[image:image-20221222112424-2.png]]
224
Karen 14.1 225 (3) Supported BD module version number: 1013 and above, as shown in the following figure:
Jim 6.1 226
227 [[image:image-20221222112455-3.png]]
228
229 **The parameter configuration interface is as follows:**
230
Karen 14.1 231 ~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).
Jim 6.1 232
233 [[image:image-20221222112604-4.png]]
234
235 2. PT configuration:
236
237 [[image:image-20221222112628-5.png]]
238
Karen 14.1 239 * Check enable channel to set whether to enable the current BD module channel.
Jim 6.1 240 * Sensor type: PT100 by default.
241 * 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.
242 * Check enable overrun detection to judge that when the upper and lower limits of temperature exceed the current setting temperature, the host computer will prompt an error.
243 * Check enable calibration, you could calculate the gain offset according to the following formula to convert the corresponding channel value:
244
245 Channel value = actual temperature value × gain value + offset value
246
247 When the channel value deviates from the actual temperature value, the channel can be calibrated by setting the gain offset, for example:
248
249 * The input temperature of control channel is 0℃, the value of acquisition channel is 30 (unit: 0.1℃), and the actual channel value should be 0 (unit: 0.1℃).
250 * The input temperature of control channel is 500℃, the value of acquisition channel is 5200 (unit: 0.1℃), and the actual channel value should be 5000 (unit: 0.1℃).
251
Jim 7.1 252 Suppose the gain is a, and the offset is b, then[[image:image-20221222112833-6.png]]
Jim 6.1 253
Jim 7.1 254 Solve and get[[image:image-20221222112858-7.png]] The calibration can be completed by setting the corresponding gain offset to the current channel.
Jim 6.1 255
256 **✎Note**: **Using gain and offset calibration can only reduce the linear error. Since the PT100 resistance and temperature curve are nonlinear, there is still a certain error in partial temperature after the calibration is successful.**
257
258 3. DAI configuration:
259
260 [[image:image-20221222112945-8.png]]
261
262
Karen 14.1 263 * Check enable channel to set whether to enable the current BD module channel.
Jim 6.1 264 * The conversion mode is set to DAI conversion mode by default, and the measurement range is 4mA~~20mA (0~~2000).
Karen 14.1 265 * Output state after stop: When PLC stops, the output state of BD module channel mainly includes the following three types:
Jim 6.1 266
267 Output clear: When PLC stops, the output current of BD board channel is 4mA
268
Karen 14.1 269 Output hold: When PLC stops, the channel output of the BD module maintains the digital current value set by the corresponding channel in the current I/O mapping device.
Jim 6.1 270
Karen 14.1 271 Output preset value: When PLC stops, BD module channel outputs preset digital value or preset analog quantity corresponding to the current value.
Jim 6.1 272
273 * Check enable calibration, you could calculate the gain offset according to the following formula to convert the corresponding channel value:
274
275 Channel input digital value = actual output current corresponds to digital value × gain value + offset value
276
277 * When the channel value deviates, you could also set the gain offset to calibrate the channel. For example:
278
Karen 14.1 279 * When the channel input digital value is 0, the multimeter measures the output current of BD module channel to be 5mA (corresponding digital value is 125).
280 * When the channel input digital value is 2000, the multimeter measures the output current of BD module channel to be 5mA (corresponding digital value is 1875).
Jim 6.1 281
Jim 7.1 282 Suppose the gain is a, and the offset is b, then[[image:image-20221222113055-9.png]]
Jim 6.1 283
Jim 7.1 284 Solve and get[[image:image-20221222113102-10.png]]The calibration can be completed by setting the corresponding gain offset to the current channel.
Jim 6.1 285
Karen 14.1 286 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.
Jim 6.1 287
288 [[image:image-20221222113140-11.png]]
289
290 5. After the above configuration is completed, check the program, download the configuration to PLC, and STOP→RUN configuration takes effect.
291
292 [[image:image-20221222113208-12.png]]
293
294 === **6.2 Ladder Diagram** ===
295
296
Karen 14.1 297 ~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".
Jim 6.1 298
299 [[image:image-20221222113654-15.png]]
300
Karen 14.1 301 2. Programming example using "BD module configuration" function of host computer software:
Jim 6.1 302
303 === **6.3 BD monitoring interface and buffer memory** ===
304
Karen 14.1 305 Open the module monitoring interface, select BD module, select LX5V-2PT2DAI 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.
Jim 6.1 306
307 [[image:image-20221222113854-17.png]]
308
Karen 14.1 309 ① PT buffer memory (BFM): used for BD module status monitoring.
Jim 6.1 310
311 (% class="table-bordered" %)
312 |(((
313 **BFM**
314
315 **Address**
316 )))|**Power-off hold**|**Read/write**|**Memory name**|**Default**|**Range**|**Description**
317 |0x2000|×|R/W|Channel 1 channel enable|1|0 to 1|0: Channel closed; 1: Channel open
318 |0x2001|×|R/W|Channel 1 sensor type|0|0|0: PT100
319 |0x2002|×|R/W|Channel 1 filter intensity|4|0 to 9|0: Minimum filter strength; 9: Maximum filter strength
320 |0x2080|×|R|Channel 1 channel value|32767|-32768 to 32767|Unit: 0.1℃
321 |0x2082|×|R|Channel 1 status information|1|0 to 2|(((
322 0: Channel closed 1: Channel opened
323
324 2: Channel value exceeds the range
325 )))
326 |0x2084|×|R|Channel 1 error code|0|0 to 1|0: No error; 1: Channel value exceeds the range
327 |0x2100|×|R/W|Channel 2 channel enable|1|0 to 1|0: Channel closed; 1: Channel open
328 |0x2101|×|R/W|Channel 2 sensor type|0|0|0: PT100
329 |0x2102|×|R/W|Channel 2 filter intensity|4|0 to 9|0: Minimum filter strength; 9: Maximum filter strength
330 |0x2180|×|R|Channel 2 channel value|32767|-32768 to 32767|Unit: 0.1℃
331 |0x2182|×|R|Channel 2 status information|1|0 to 2|(((
332 0: Channel closed 1: Channel opened
333
334 2: Channel value exceeds the range
335 )))
336 |0x2184|×|R|Channel 2 error code|0|0 to 1|0: No error; 1: Channel value exceeds the range
Jim 7.1 337
Karen 14.1 338 ② DAI buffer memory (BFM): used for BD module status monitoring.
Jim 7.1 339
340 (% class="table-bordered" %)
341 |(((
342 **BFM**
343
344 **Address**
345 )))|**Power-off hold**|**Read/write**|**Memory name**|**Default**|**Range**|**Description**
346 |0x2200|×|R/W|Channel 3 channel enable|1|0 to 1|0: Channel closed; 1: Channel open
347 |0x2201|×|R/W|Channel 3 channel mode selection|1|1|1: Current output mode (4mA to 20mA)
348 |0x2203|×|R/W|Output status after channel 3 stops|0|0 to 2|(((
349 0: Output cleared; 1: Output held
350
351 2: Output preset value
352 )))
353 |0x2204|×|R/W|Channel 3 output preset value|0|-32768 to 32767|
354 |0x2280|×|R|Channel 3 channel value|0|0 to 2000|Only supported in channel mapping device setting
355 |0x2282|×|R|Channel 3 status information|1|0 to 2|(((
356 0: Channel closed 1: Channel opened
357
358 2: Channel value exceeds the range
359 )))
360 |0x2284|×|R|Channel 3 error code|0|0 to 1|0: No error; 1: Channel value exceeds the range
361 |0x2300|×|R/W|Channel 4 channel enable|1|0 to 1|0: Channel closed; 1: Channel open
362 |0x2301|×|R/W|Channel 4 channel mode selection|1|1|1: Current output mode (4mA to 20mA)
363 |0x2303|×|R/W|Output status after channel 4 stops|0|0 to 2|(((
364 0: Output cleared; 1: Output held
365
366 2: Output preset value
367 )))
368 |0x2304|×|R/W|Channel 4 output preset value|0|-32768 to 32767|
369 |0x2380|×|R|Channel 4 channel value|0|0 to 2000|Only supported in channel mapping device setting
370 |0x2382|×|R|Channel 4 status information|1|0 to 2|(((
371 0: Channel closed 1: Channel opened
372
373 2: Channel value exceeds the range
374 )))
375 |0x2384|×|R|Channel 4 error code|0|0 to 1|0: No error; 1: Channel value exceeds the range
376
Karen 14.1 377 ③ Universal buffer memory (BFM): used to diagnose the communication status of the currently connected BD module.
Jim 7.1 378
379 (% class="table-bordered" %)
380 |(((
381 **BFM**
382
383 **Address**
384 )))|**Power-off hold**|(((
385 **Read/write**
386
387 **Function**
388 )))|**Memory name**|**Default**|**Range**|**Description**
389 |0x200|×|R|Current maximum package length|0|0 to 0xFFFF|The maximum length of the currently sent package
390 |0x202|×|R|Number of retransmissions|0|0 to 0xFFFF|Number of retransmissions
391 |0x204|×|R|Number of retransmissions of subpackages|0|0 to 0xFFFF|Number of retransmissions of subpackages
392 |0x206|×|R|Received times of sync frame|0|0 to 0xFFFF|Received times of sync frame
393 |0x208|×|R|Sent times of sync frame|0|0 to 0xFFFF|Sent times of sync frame
394 |0x20A|×|R|Control the number of transmissions|0|0 to 0xFFFF|Control the number of transmissions
395 |0x20C|×|R|Control the number of receptions|0|0 to 0xFFFF|Control the number of receptions
396 |0x20E|×|R|Number of subscriptions sent|0|0 to 0xFFFF|Number of subscriptions sent
397 |0x210|×|R|Number of subscriptions received|0|0 to 0xFFFF|Number of subscriptions received
398 |0x212|√|R/W|Latest error code|0|Only 0 can be written.|Protocol internal error code, write 0 to clear
399 |0x214|×|R|Number of bytes sent|0|0 to 0xFFFFFFFF|Number of bytes sent
400 |0x218|×|R|Number of valid bytes sent|0|0 to 0xFFFFFFFF|Number of valid bytes sent
401 |0x21C|×|R|Number of bytes received|0|0 to 0xFFFFFFFF|Number of bytes received
402 |0x220|×|R|Number of valid bytes received|0|0 to 0xFFFFFFFF|Number of valid bytes received
Karen 14.1 403 |0x224|×|R|Communication time (unit s)|0|0 to 0xFFFFFFFF|Normal communication time since the BD module is powered on
Jim 7.1 404
405