Changes for page 07 Communication
Last modified by Devin Chen on 2024/08/19 14:28
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,1 @@ 1 -PLC Editor. 1 User Manual.WebHome1 +PLC Editor.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Stone1 +XWiki.Mora - Content
-
... ... @@ -1,6 +1,6 @@ 1 -= ** 1PLC COM2 Modbus RTU** =1 += **PLC COM2 Modbus RTU** = 2 2 3 -== ** 1.1Protocol Setting (D8126)** ==3 +== **Protocol Setting (D8126)** == 4 4 5 5 |=(% scope="row" %)**Protocol**|=**Description**|=**Value of D8126** 6 6 |=WECON PLC Protocol|Using WECON PLC Protocol|01H ... ... @@ -9,7 +9,7 @@ 9 9 |=MODBUS RTU Slave|PLC is master device|20H 10 10 |=MODBUS ASCII Slave|PLC is master device|30H 11 11 12 -== ** 1.2CommunicationFormat (D8120)** ==12 +== **Communication format (D8120)** == 13 13 14 14 (% border="1" %) 15 15 |(% rowspan="2" %)**Item**|(% rowspan="2" %)**parameter**|(% colspan="8" %)**Bit value of D8120** ... ... @@ -38,11 +38,14 @@ 38 38 |Even|-|-|-|-|-|1|1|- 39 39 |(% rowspan="2" %)Data bit|7 bit|-|-|-|-|-|-|-|0 40 40 |8 bit|-|-|-|-|-|-|-|1 41 -|(% colspan="10" %)Example: the communication format is 9600.1.8.None, b7b6b5b4=1000, b3=0, b2b1=00, b 0=1. D8120=81H ( (10000001),,2,,=81H, 81H means [[hexadecimal>>path:C:/Users/Administrator/AppData/Local/Yodao/DeskDict/frame/20140818134937/javascript:void(0);]][[number>>path:C:/Users/Administrator/AppData/Local/Yodao/DeskDict/frame/20140818134937/javascript:void(0);]])41 +|(% colspan="10" %)Example: the communication format is 9600.1.8.None, b7b6b5b4=1000, b3=0, b2b1=00, b 0=1. D8120=81H ( (10000001),,2,,=81H, 81H means hexadecimal number) 42 42 43 +(% class="box infomessage" %) 44 +((( 43 43 **✎Note:** If use Data bit=7.Parity can not choose None. 46 +))) 44 44 45 -== ** 1.3WECON PLC - MODBUS (Slave) addresses rules** ==48 +== **WECON PLC - MODBUS (Slave) addresses rules** == 46 46 47 47 (% border="1" %) 48 48 |(% colspan="3" %)** PLC Bit Address** ... ... @@ -53,9 +53,9 @@ 53 53 |S0 ~~ S999|0xE000 ~~ 0xE3E7|57344 ~~ 58343 54 54 |T0 ~~ T256|0xF000 ~~ 0xF100|61440 ~~ 61696 55 55 |C0 ~~ C255|0xF400 ~~ 0xF4FF|62464 ~~ 62719 56 -|X0 ~~ X 255|0xF800 ~~ 0xF9FE|63488 ~~ 6399857 -|Y0 ~~ Y 255|0xFC00 ~~ 0xFDFE|64512 ~~ 6502258 -|(% colspan="3" %)** 59 +|X0 ~~ X377|0xF800 ~~ 0xF8FF|63488 ~~ 63743 60 +|Y0 ~~ Y377|0xFC00 ~~ 0xFCFF|64512 ~~ 64767 61 +|(% colspan="3" %)** PLC Word Address** 59 59 |(% rowspan="2" %)PLC Address|(% colspan="2" %)MODBUS Address 60 60 |Hex|Decimal 61 61 |D0 ~~ D8255|0 ~~ 0x203F|0 ~~ 8255 ... ... @@ -63,9 +63,9 @@ 63 63 |C0 ~~ C199|0xF400 ~~ 0xF4C7|62464 ~~ 62663 64 64 |C200 ~~ C255|0xF700 ~~ 0xF7FF|63232 ~~ 63487 65 65 66 -== ** 1.4MODBUSFunctionCodeIntroduction** ==69 +== **MODBUS function code introduction** == 67 67 68 -** (1)Function code 0x01(01): read coil (bit address)**71 +**Function code 0x01(01): read coil (bit address)** 69 69 70 70 Frame format: Station number of slave&0x01 + start address + number of coils + CRC 71 71 ... ... @@ -77,7 +77,7 @@ 77 77 |4|(% style="width:352px" %)Number of coils|(% style="width:252px" %)2 bytes| 78 78 |5|(% style="width:352px" %)CRC|(% style="width:252px" %)2 bytes| 79 79 80 -** (2)Function code 0x03(03): read register (word address)**83 +**Function code 0x03(03): read register (word address)** 81 81 82 82 Frame format: Station number of slave&0x03 + start address+ number of registers + CRC 83 83 ... ... @@ -89,7 +89,7 @@ 89 89 |4|Number of registers|2 bytes| 90 90 |5|CRC|2 bytes| 91 91 92 -** (3)Function code 0x05(05): write single coil**95 +**Function code 0x05(05): write single coil** 93 93 94 94 Frame format: Station number of slave&0x05 + address + state of coil + CRC 95 95 ... ... @@ -101,7 +101,7 @@ 101 101 |4|State of coil|2 bytes| 102 102 |5|CRC|2 bytes| 103 103 104 -** (4)Function code 0x06 (06): Write single register**107 +**Function code 0x06 (06): Write single register** 105 105 106 106 Frame format: Station number of slave&0x06 + address + value + CRC 107 107 ... ... @@ -113,7 +113,7 @@ 113 113 |4|Value of register|2 bytes| 114 114 |5|CRC|2 bytes| 115 115 116 -** (5)Function code 0x0f(15): Write continuous coils**119 +**Function code 0x0f(15): Write continuous coils** 117 117 118 118 Frame format: Station number of slave&0x0f + start address + number of coils + length + state of coil + CRC 119 119 ... ... @@ -127,7 +127,7 @@ 127 127 |6|State of coils|[(N+7)/8] bytes| 128 128 |7|CRC|2 bytes| 129 129 130 -** (6)Function code 0x10 (10): Write continuous registers**133 +**Function code 0x10 (10): Write continuous registers** 131 131 132 132 Frame format: Station number of slave&0x10 + start address + number of registers + length + value of register + CRC 133 133 ... ... @@ -141,66 +141,63 @@ 141 141 |6|Value of register|N*2 bytes| 142 142 |7|CRC|2 bytes| 143 143 144 -== ** 1.5Example** ==147 +== **Example** == 145 145 146 -** (1)Read bit address from device**149 +**Read bit address from device** 147 147 148 - **(When reading the bit address, the return value of 256 means that the coil is turned ON, and the return value of 0 means that the coil is turned OFF.)**151 +(When reading the bit address, the return value of 256 means that the coil is turned ON, and the return value of 0 means that the coil is turned OFF.) 149 149 150 150 (% style="text-align:center" %) 151 -[[image:1641781999957-637.png|| class="img-thumbnail" height="390" width="750"]]154 +[[image:1641781999957-637.png||height="390" width="750" class="img-thumbnail"]] 152 152 153 -** (2)Read word address from device**156 +**Read word address from device** 154 154 155 155 (% style="text-align:center" %) 156 -[[image:1641782024282-424.png|| class="img-thumbnail" height="439" width="750"]]159 +[[image:1641782024282-424.png||height="439" width="750" class="img-thumbnail"]] 157 157 158 -** (3)Write single coil**161 +**Write single coil** 159 159 160 160 (% style="text-align:center" %) 161 -[[image:1641782057319-761.png|| class="img-thumbnail" height="440" width="750"]]164 +[[image:1641782057319-761.png||height="440" width="750" class="img-thumbnail"]] 162 162 163 - **Tip:**166 +Tip: (When writing a single coil or a continuous coil, write HFF00 to turn the coil on, and write H0000 to turn off the coil.) 164 164 165 -** (When writingasinglecoil ora continuouscoil, writeHFF00 to turn the coil on, and write H0000 to turn off the coil.)**168 +**Write single register** 166 166 167 -**(4) Write single register** 168 - 169 169 (% style="text-align:center" %) 170 -[[image:1641782078927-432.png|| class="img-thumbnail" height="442" width="750"]]171 +[[image:1641782078927-432.png||height="442" width="750" class="img-thumbnail"]] 171 171 172 -** (5)Write continuous coils**173 +**Write continuous coils** 173 173 174 174 (% style="text-align:center" %) 175 -[[image:1641782101687-540.png|| class="img-thumbnail" height="452" width="750"]]176 +[[image:1641782101687-540.png||height="452" width="750" class="img-thumbnail"]] 176 176 177 -** (6)Write continuous registers**178 +**Write continuous registers** 178 178 179 179 (% style="text-align:center" %) 180 -[[image:1641782118748-978.png|| class="img-thumbnail" height="448" width="750"]]181 +[[image:1641782118748-978.png||height="448" width="750" class="img-thumbnail"]] 181 181 183 +**PLC is slave devic** 182 182 183 -**(7) PLC is slave devic** 184 - 185 185 [[image:1641782203514-616.png||height="230" width="746"]] 186 186 187 187 188 -** (8)WECON PLC Protocol (COM2)**188 +**WECON PLC Protocol (COM2)** 189 189 190 190 [[image:1641782240401-942.png||height="161" width="754"]] 191 191 192 -= (% style="color:inherit; font-family:inherit" %)** 2N:N network**(%%) =192 += (% style="color:inherit; font-family:inherit" %)**N:N network**(%%) = 193 193 194 194 **LX3VP COM2 N:N Application** 195 195 196 -== ** 2.1LX3VP196 +== **LX3VP COM2 N:N Connection** == 197 197 198 198 PLC built-in N:N connection protocol provides a effective way to exchange data among multiple PLC (Max. 8 devices). Technically, it only requires the twisted pair RS485 cable to connect with each PLC COM2 (in parallel). 199 199 200 200 (% style="text-align:center" %) 201 -[[image:9.Communication example_html_8c43baa1ae891689.jpg|| class="img-thumbnail" height="142" width="500"]]201 +[[image:9.Communication example_html_8c43baa1ae891689.jpg||height="142" width="500" class="img-thumbnail"]] 202 202 203 -== =**2.1.1COM2 N:N Instructions ** ===203 +== **COM2 N:N Instructions ** == 204 204 205 205 User should put data to specified register unit. Exchanging the data among PLCs, This function only requires putting data in preset register block, all the data in this register block would share with other PLCs. There are five modes for choice, according to data volume and communication speed. See the preset register block from table below. 206 206 ... ... @@ -231,12 +231,12 @@ 231 231 Communication between each PLC (up to 8 PLC), please see the connection construction below (For 3 PLC interconnection). 232 232 233 233 (% style="text-align:center" %) 234 -[[image:9.Communication example_html_b805bca9e1166337.jpg|| class="img-thumbnail" height="93" width="600"]]234 +[[image:9.Communication example_html_b805bca9e1166337.jpg||height="93" width="600" class="img-thumbnail"]] 235 235 236 -== =**2.1.2 The special devices in N: N network** ===236 +== **Special devices in N: N network** == 237 237 238 238 (% border="1" %) 239 -|**Register**|**Description** 239 +|=**Register**|=**Description** 240 240 |D8120|Communication format settings 241 241 |D8126|COM2 communication protocol settings, 40h means N:N Master Device, 04h means N:N Slave device 242 242 |D8176|Station number, from 0 to 7, 0 means master device ... ... @@ -262,10 +262,10 @@ 262 262 ))) 263 263 |M8191|Processing sending data 264 264 265 -== =**2.1.3Communications format:** ===265 +== **Communications format:** == 266 266 267 267 (% border="1" %) 268 -|**Item**|(% style="width:115px" %)**Parameters**|(% style="width:239px" %)**b15(RS2)**|**b14-b8**|**b7**|**b6**|**b5**|**b4**|**b3**|**b2**|**b1**|**b0** 268 +|=**Item**|=(% style="width: 115px;" %)**Parameters**|=(% style="width: 239px;" %)**b15(RS2)**|=**b14-b8**|=**b7**|=**b6**|=**b5**|=**b4**|=**b3**|=**b2**|=**b1**|=**b0** 269 269 |(% rowspan="2" %)**Bit mode**|(% style="width:115px" %)8 bit|(% style="width:239px" %)0|(% rowspan="15" %)Retention|-|-|-|-|-|-|-|- 270 270 |(% style="width:115px" %)16-bit|(% style="width:239px" %)1|-|-|-|-|-|-|-|- 271 271 |(% rowspan="6" %)**Baud rate (Bps)**|(% style="width:115px" %)115200|(% style="width:239px" %)-|1|1|0|0|-|-|-|- ... ... @@ -282,7 +282,7 @@ 282 282 |(% rowspan="2" %)**Data bit**|(% style="width:115px" %)7 bit|(% style="width:239px" %)-|-|-|-|-|-|-|-|0 283 283 |(% style="width:115px" %)8 bit|(% style="width:239px" %)-|-|-|-|-|-|-|-|1 284 284 285 -== =**2.1.4Program example** ===285 +== **Program example** == 286 286 287 287 LX3VP COM2 port communication parameters: 9600, 1, 8, NONE. Register block mode: 3 288 288 ... ... @@ -289,19 +289,22 @@ 289 289 **PLC as master** 290 290 291 291 (% style="text-align:center" %) 292 -[[image:9.Communication example_html_a3fdef81ab69639.jpg|| class="img-thumbnail" height="448" width="750"]]292 +[[image:9.Communication example_html_a3fdef81ab69639.jpg||height="448" width="750" class="img-thumbnail"]] 293 293 294 -PLC as slave 294 +**PLC as slave** 295 295 296 296 (% style="text-align:center" %) 297 -[[image:9.Communication example_html_cc8af72b56d9c539.jpg|| class="img-thumbnail" height="236" width="750"]]297 +[[image:9.Communication example_html_cc8af72b56d9c539.jpg||height="236" width="750" class="img-thumbnail"]] 298 298 299 -**Note for use** 299 +(% class="box infomessage" %) 300 +((( 301 +✎**Note:** 300 300 301 301 * There are two modes of N:N protocol configuration. one is LX3VP built-in N:N protocol, the other one is LX3V N:N protocol (LX3V-2RS485-BD required). 302 302 * In LX3VP series PLC, only one kind of N:N configuration available. Second mode would be disabled when LX3VP built-in N:N protocol configured. 305 +))) 303 303 304 -= =(% style="color:inherit; font-family:inherit" %)**3RS485-BD and ETH-BD communiaction**(%%) ==307 += (% style="color:inherit; font-family:inherit" %)**RS485-BD and ETH-BD communiaction**(%%) = 305 305 306 306 Please kindly check the link as below. 307 307