Changes for page 08 Communication

Last modified by Iris on 2025/07/24 15:23

From version 9.1
edited by Stone Wu
on 2022/08/30 09:58
Change comment: There is no comment for this version
To version 10.1
edited by Stone Wu
on 2022/09/23 14:49
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,12 +2,12 @@
2 2  
3 3  = **Modbus communication** =
4 4  
5 -== **Hardware wiring** ==
5 +== Hardware wiring ==
6 6  
7 7  The position of RS485 communication port (take VD2B as an example) is as the figure below.
8 8  
9 9  (% style="text-align:center" %)
10 -[[image:image-20220608154248-1.png]]
10 +[[image:image-20220608154248-1.png||class="img-thumbnail"]]
11 11  
12 12  Figure 8-1 The position of RS485 communication port of VD2B drive
13 13  
... ... @@ -16,7 +16,7 @@
16 16  The servo drive adopts RS485 half-duplex communication mode. The 485 bus should adopt the hand-in-hand structure instead of the star structure or the bifurcated structure. The star structure or bifurcation structure will produce reflected signals, which will affect the 485 communication.
17 17  
18 18  (% class="table-bordered" %)
19 -|(% style="text-align:center; vertical-align:middle" %)[[image:image-20220611153134-1.png]]
19 +(% class="warning" %)|(% style="text-align:center; vertical-align:middle" %)[[image:image-20220611153134-1.png]]
20 20  |(((
21 21  ✎The wiring must use shielded twisted pair, stay away from strong electricity, do not run in parallel with the power line, let alone bundle it together!
22 22  
... ... @@ -24,7 +24,7 @@
24 24  )))
25 25  
26 26  (% style="text-align:center" %)
27 -[[image:image-20220608174415-1.png]]
27 +[[image:image-20220608174415-1.png||class="img-thumbnail"]]
28 28  
29 29  Figure 8-2 RS485 communication network wiring diagram
30 30  
... ... @@ -33,7 +33,7 @@
33 33  No point in the RS485 network can be directly grounded. All devices in the network must be well grounded through their own grounding terminals.
34 34  
35 35  (% class="table-bordered" %)
36 -|(% style="text-align:center; vertical-align:middle" %)[[image:image-20220611153144-2.png]]
36 +(% class="warning" %)|(% style="text-align:center; vertical-align:middle" %)[[image:image-20220611153144-2.png]]
37 37  |Under no circumstances can the grounding wire form a closed loop.
38 38  
39 39  When wiring, consider the drive capability of the computer/PLC and the distance between the computer/PLC and the servo drive. If the drive capacity is insufficient, a repeater is needed.
... ... @@ -40,7 +40,7 @@
40 40  
41 41  = **Modbus communication protocol analysis** =
42 42  
43 -== **Modbus data frame format** ==
43 +== Modbus data frame format ==
44 44  
45 45  The VD2 series servo drives currently support the RTU communication format. The typical data frame format is shown in the table.
46 46  
... ... @@ -48,7 +48,7 @@
48 48  |=(% rowspan="2" scope="row" style="text-align: center; vertical-align: middle; width: 425px;" %)**There should be a message interval not less than 3.5 characters at the beginning**|=(% style="text-align: center; vertical-align: middle; width: 166px;" %)**Address**|=(% style="text-align: center; vertical-align: middle; width: 189px;" %)**Function code**|=(% style="text-align: center; vertical-align: middle; width: 155px;" %)**Data**|=(% style="text-align: center; vertical-align: middle; width: 158px;" %)**CRC check code**
49 49  |(% style="text-align:center; vertical-align:middle; width:166px" %)1 byte|(% style="text-align:center; vertical-align:middle; width:189px" %)1 byte|(% style="text-align:center; vertical-align:middle; width:155px" %)N bytes|(% style="text-align:center; vertical-align:middle; width:158px" %)2 bytes
50 50  
51 -== **Description of supported function codes** ==
51 +== Supported function codes ==
52 52  
53 53  The host reads and writes data to the servo through Modbus RTU format (03, 06 function codes). The corresponding Modbus function codes are as follows:
54 54  
... ... @@ -62,15 +62,15 @@
62 62  
63 63  Request format:
64 64  
65 -|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Initial address**|(% colspan="2" %)**Number of reads**|(% rowspan="2" %)**CRC check code**
66 -|**high byte**|**low byte**|**high byte**|**low byte**
65 +|=(% rowspan="2" %)**Address**|=(% rowspan="2" %)**Function code**|=(% colspan="2" %)**Initial address**|=(% colspan="2" %)**Number of reads**|=(% rowspan="2" %)**CRC check code**
66 +|=**high byte**|=**low byte**|=**high byte**|=**low byte**
67 67  |1 byte|03|1 byte|1 byte|1 byte|1 byte|2 bytes
68 68  
69 69  Correct response format:
70 70  
71 71  (% style="width:1055px" %)
72 -|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% rowspan="2" style="width:279px" %)**Number of bytes of returned data**|(% colspan="2" style="width:274px" %)**Register 1**|(% rowspan="2" style="width:98px" %)**…**|(% rowspan="2" %)**CRC check code**
73 -|(% style="width:160px" %)**high byte**|(% style="width:114px" %)**low byte**
72 +|=(% rowspan="2" %)**Address**|=(% rowspan="2" %)**Function code**|=(% rowspan="2" style="width: 279px;" %)**Number of bytes of returned data**|=(% colspan="2" style="width: 274px;" %)**Register 1**|=(% rowspan="2" style="width: 98px;" %)**…**|=(% rowspan="2" %)**CRC check code**
73 +|=(% style="width: 160px;" %)**high byte**|=(% style="width: 114px;" %)**low byte**
74 74  |1 byte|03|(% style="width:279px" %)1 byte|(% style="width:160px" %)1 byte|(% style="width:114px" %)1 byte|(% style="width:98px" %)…|2 bytes
75 75  
76 76  **Write function code: 0x06**
... ... @@ -85,16 +85,16 @@
85 85  
86 86  Response format:
87 87  
88 -|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Register address**|(% colspan="2" %)**Data**|(% rowspan="2" %)**CRC check code**
89 -|**high byte**|**low byte**|**high byte**|**low byte**
88 +|=(% rowspan="2" %)**Address**|=(% rowspan="2" %)**Function code**|=(% colspan="2" %)**Register address**|=(% colspan="2" %)**Data**|=(% rowspan="2" %)**CRC check code**
89 +|=**high byte**|=**low byte**|=**high byte**|=**low byte**
90 90  |1 byte|06|1 byte|1 byte|1 byte|1 byte|2 bytes
91 91  
92 92  If the setting is successful, the original is returned
93 93  
94 -|(% rowspan="2" style="width:551px" %)**There should be a message interval not less than 3.5 characters at the beginning**|(% style="width:114px" %)**Address**|(% style="width:127px" %)**Function code**|(% style="width:104px" %)**Data**|(% style="width:180px" %)**CRC check code**
94 +|=(% rowspan="2" style="width: 551px;" %)**There should be a message interval not less than 3.5 characters at the beginning**|=(% style="width: 114px;" %)**Address**|=(% style="width: 127px;" %)**Function code**|=(% style="width: 104px;" %)**Data**|=(% style="width: 180px;" %)**CRC check code**
95 95  |(% style="width:114px" %)1 byte|(% style="width:127px" %)1 byte|(% style="width:104px" %)N bytes|(% style="width:180px" %)2 bytes
96 96  
97 -(% style="color:inherit; font-family:inherit; font-size:26px" %)**CRC check**
97 +== (% style="color:inherit; font-family:inherit; font-size:26px" %)CRC check(%%) ==
98 98  
99 99  The servo uses a 16-bit CRC check, and the host computer must also use the same check rule, otherwise the CRC check will make mistake. When transmitting, the low bit is in the front and the high bit is at the back. The CRC code are as follows:
100 100  
... ... @@ -165,8 +165,6 @@
165 165  
166 166  == **Communication example** ==
167 167  
168 -
169 -
170 170  **03 Function code read**
171 171  
172 172  Read the monitoring volume U0-31 bus voltage, the Modbus register address corresponding to this variable is 7716 (0x1E24)
... ... @@ -173,20 +173,18 @@
173 173  
174 174  Request format:
175 175  
176 -|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Register address**|(% colspan="2" %)**Data**|(% rowspan="2" %)**CRC check code**
177 -|**high byte**|**low byte**|**high byte**|**low byte**
174 +|=(% rowspan="2" %)**Address**|=(% rowspan="2" %)**Function code**|=(% colspan="2" %)**Register address**|=(% colspan="2" %)**Data**|=(% rowspan="2" %)**CRC check code**
175 +|=**high byte**|=**low byte**|=**high byte**|=**low byte**
178 178  |01|03|1E|24|00|01|C2 29
179 179  
180 180  The slave responds normally:
181 181  
182 -|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% rowspan="2" %)**Number of bytes**|(% colspan="2" %)**Data**|(% rowspan="2" %)**CRC high byte**
183 -|**high byte**|**low byte**
180 +|=(% rowspan="2" %)**Address**|=(% rowspan="2" %)**Function code**|=(% rowspan="2" %)**Number of bytes**|=(% colspan="2" %)**Data**|=(% rowspan="2" %)**CRC high byte**
181 +|=**high byte**|=**low byte**
184 184  |01|03|02|0C|4F|FC B0
185 185  
186 186  For example: The value read is 0x0C4F, which means that the voltage is 315.1V.
187 187  
188 -
189 -
190 190  **06 Function Code Write**
191 191  
192 192  P1-10 the maximum speed threshold is set to 3000rpm. This variable corresponds to the Modbus address: 266 (0x010A)
... ... @@ -193,14 +193,14 @@
193 193  
194 194  Request format:
195 195  
196 -|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Register address**|(% colspan="2" %)**Data**|(% rowspan="2" %)**CRC check code**
197 -|**high byte**|**low byte**|**high byte**|**low byte**
192 +|=(% rowspan="2" %)**Address**|=(% rowspan="2" %)**Function code**|=(% colspan="2" %)**Register address**|=(% colspan="2" %)**Data**|=(% rowspan="2" %)**CRC check code**
193 +|=**high byte**|=**low byte**|=**high byte**|=**low byte**
198 198  |01|06|01|0A|0B|B8|AF, 76
199 199  
200 200  The slave responds normally:
201 201  
202 -|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Register address**|(% colspan="2" %)**Data**|(% rowspan="2" %)**CRC check code**
203 -|**high byte**|**low byte**|**high byte**|**low byte**
198 +|=(% rowspan="2" %)**Address**|=(% rowspan="2" %)**Function code**|=(% colspan="2" %)**Register address**|=(% colspan="2" %)**Data**|=(% rowspan="2" %)**CRC check code**
199 +|=**high byte**|=**low byte**|=**high byte**|=**low byte**
204 204  |01|06|01|0A|0B|B8|AF, 76
205 205  
206 206  **10 Function code write**
... ... @@ -209,23 +209,24 @@
209 209  
210 210  Request format:
211 211  
212 -|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Initial address**|(% colspan="2" %)**Number of register**|(% rowspan="2" %)**Number of data**|(% colspan="2" %)**Data 1**|(% colspan="2" %)**Data 2**|(% colspan="2" %)**CRC check code**
213 -|**high byte**|**low byte**|**high byte**|**low byte**|**high byte**|**low byte**|**high byte**|**low byte**|**high byte**|**low byte**
208 +|=(% rowspan="2" %)**Address**|=(% rowspan="2" %)**Function code**|=(% colspan="2" %)**Initial address**|=(% colspan="2" %)**Number of register**|=(% rowspan="2" %)**Number of data**|=(% colspan="2" %)**Data 1**|=(% colspan="2" %)**Data 2**|=(% colspan="2" %)**CRC check code**
209 +|=**high byte**|=**low byte**|=**high byte**|=**low byte**|=**high byte**|=**low byte**|=**high byte**|=**low byte**|=**high byte**|=**low byte**
214 214  |01|10|07|09|00|02|04|00|00|07|D0|16|59
215 215  
216 216  The slave responds normally:
217 217  
218 -|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Register address**|(% colspan="2" %)**Data**|(% colspan="2" %)**CRC check code**
219 -|**high byte**|**low byte**|**high byte**|**low byte**|**high byte**|**low byte**
214 +|=(% rowspan="2" %)**Address**|=(% rowspan="2" %)**Function code**|=(% colspan="2" %)**Register address**|=(% colspan="2" %)**Data**|=(% colspan="2" %)**CRC check code**
215 +|=**high byte**|=**low byte**|=**high byte**|=**low byte**|=**high byte**|=**low byte**
220 220  |01|10|07|09|00|02|90|BE
221 221  
222 222  = **Servo communication parameter setting** =
223 223  
224 224  (% style="text-align:center" %)
225 -[[image:image-20220608174504-2.png]]
221 +(((
222 +(% class="wikigeneratedid img-thumbnail" style="display:inline-block" %)
223 +[[Figure 8-3 Modbus communication parameter setting process>>image:image-20220608174504-2.png||id="Iimage-20220608174504-2.png"]]
224 +)))
226 226  
227 -Figure 8-3 Modbus communication parameter setting process
228 -
229 229  **Set the servo address P12-1**
230 230  
231 231  When multiple servos are in network communication, each servo can only have a unique address, otherwise it will cause abnormal communication and fail to communicate.
... ... @@ -254,7 +254,7 @@
254 254  If you need to change the value of the function code frequently, it is recommended to turn off the function of real-time writing to EERPOM of function code, otherwise the EEPROM will be shortened due to frequent erasing and writing of the EEPROM.
255 255  
256 256  (% class="table-bordered" %)
257 -|(% style="text-align:center; vertical-align:middle" %)[[image:image-20220611153214-3.png]]
254 +(% class="warning" %)|(% style="text-align:center; vertical-align:middle" %)[[image:image-20220611153214-3.png]]
258 258  |After the EEPROM is damaged, the servo will have an non resettable fault!
259 259  
260 260  **Set the high and low order of the 32-bit monitoring data**
... ... @@ -304,7 +304,7 @@
304 304  
305 305  = **Modbus communication variable address and value** =
306 306  
307 -== **Variable address description** ==
304 +== **Variable address** ==
308 308  
309 309  Modbus registers are divided into two categories:
310 310  
... ... @@ -339,7 +339,7 @@
339 339  
340 340  For detailed parameter addresses, please refer to __[["11.1 Lists of parameters".>>https://docs.we-con.com.cn/bin/view/Servo/Manual/02%20VD2%20SA%20Series/11%20Appendix/#HListsofparameters]]__
341 341  
342 -== **Variable value type description** ==
339 +== **Variable value type** ==
343 343  
344 344  When writing function codes with signed numbers, you need to convert the pre-written data into hexadecimal complements. The conversion rules are as follows:
345 345