Changes for page 08 Communication

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

From version 4.8
edited by Stone Wu
on 2022/07/07 15:18
Change comment: There is no comment for this version
To version 4.16
edited by Stone Wu
on 2022/07/07 15:37
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -164,39 +164,62 @@
164 164  
165 165  == **Communication example** ==
166 166  
167 -**03 Function Code Read**
168 168  
168 +
169 +**03 Function code read**
170 +
169 169  Read the monitoring volume U0-31 bus voltage, the Modbus register address corresponding to this variable is 7716 (0x1E24)
170 170  
171 171  Request format:
172 172  
173 -(% class="table-bordered" %)
174 -|(% style="text-align:center; vertical-align:middle" %)**Address**|(% style="text-align:center; vertical-align:middle" %)**Function code**|(% style="text-align:center; vertical-align:middle" %)**Register address high byte**|(% style="text-align:center; vertical-align:middle" %)**Register address low byte**|(% style="text-align:center; vertical-align:middle" %)**Data high byte**|(% style="text-align:center; vertical-align:middle" %)**Data low byte**|(% style="text-align:center; vertical-align:middle" %)**CRC check code**
175 -|(% style="text-align:center; vertical-align:middle" %)1 byte|(% style="text-align:center; vertical-align:middle" %)06|(% style="text-align:center; vertical-align:middle" %)1 byte|(% style="text-align:center; vertical-align:middle" %)1 byte|(% style="text-align:center; vertical-align:middle" %)1 byte|(% style="text-align:center; vertical-align:middle" %)1 byte|(% style="text-align:center; vertical-align:middle" %)2 bytes
175 +|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Register address**|(% colspan="2" %)**Data**|(% rowspan="2" %)**CRC check code**
176 +|**high byte**|**low byte**|**high byte**|**low byte**
177 +|01|03|1E|24|00|01|C2 29
176 176  
177 177  The slave responds normally:
178 178  
179 -(% class="table-bordered" %)
180 -|(% style="text-align:center; vertical-align:middle" %)**Address**|(% style="text-align:center; vertical-align:middle" %)**Function code**|(% style="text-align:center; vertical-align:middle" %)**Number of bytes**|(% style="text-align:center; vertical-align:middle" %)**Data high byte**|(% style="text-align:center; vertical-align:middle" %)**Data low byte**|(% style="text-align:center; vertical-align:middle" %)**CRC low byte**|(% style="text-align:center; vertical-align:middle" %)**CRC high byte**
181 -|(% style="text-align:center; vertical-align:middle" %)01|(% style="text-align:center; vertical-align:middle" %)03|(% style="text-align:center; vertical-align:middle" %)02|(% style="text-align:center; vertical-align:middle" %)0C|(% style="text-align:center; vertical-align:middle" %)26|(% style="text-align:center; vertical-align:middle" %)3C|(% style="text-align:center; vertical-align:middle" %)9E
181 +|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% rowspan="2" %)**Number of bytes**|(% colspan="2" %)**Data**|(% rowspan="2" %)**CRC high byte**
182 +|**high byte**|**low byte**
183 +|01|03|02|0C|4F|FC B0
182 182  
183 -The value read is 0x0C26, which means that the voltage is 311.0V. 
185 +For example: The value read is 0x0C4F, which means that the voltage is 315.1V.
184 184  
187 +
188 +
185 185  **06 Function Code Write**
186 186  
187 -P1-10 the maximum speed threshold is set to 3000rpm. This variable corresponds to the Modbus address: 266 (0x010A)
191 +P1-10 the maximum speed threshold is set to 3000rpm. This variable corresponds to the Modbus address: 266 (0x010A)
188 188  
189 189  Request format:
190 190  
191 -(% class="table-bordered" %)
192 -|(% style="text-align:center; vertical-align:middle" %)**Address**|(% style="text-align:center; vertical-align:middle" %)**Function code**|(% style="text-align:center; vertical-align:middle" %)**Register address high byte**|(% style="text-align:center; vertical-align:middle" %)**Register address low byte**|(% style="text-align:center; vertical-align:middle" %)**Data high byte**|(% style="text-align:center; vertical-align:middle" %)**Data low byte**|(% style="text-align:center; vertical-align:middle" %)**CRC low byte**
193 -|(% style="text-align:center; vertical-align:middle" %)01|(% style="text-align:center; vertical-align:middle" %)06|(% style="text-align:center; vertical-align:middle" %)01|(% style="text-align:center; vertical-align:middle" %)0A|(% style="text-align:center; vertical-align:middle" %)0B|(% style="text-align:center; vertical-align:middle" %)B8|(% style="text-align:center; vertical-align:middle" %)AF
195 +|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Register address**|(% colspan="2" %)**Data**|(% rowspan="2" %)**CRC check code**
196 +|**high byte**|**low byte**|**high byte**|**low byte**
197 +|01|06|01|0A|0B|B8|AF, 76
194 194  
195 195  The slave responds normally:
196 196  
197 -|(% style="text-align:center; vertical-align:middle" %)**Address**|(% style="text-align:center; vertical-align:middle" %)**Function code**|(% style="text-align:center; vertical-align:middle" %)**Register address high byte**|(% style="text-align:center; vertical-align:middle" %)**Register address low byte**|(% style="text-align:center; vertical-align:middle" %)**Data high byte**|(% style="text-align:center; vertical-align:middle" %)**Data low byte**|(% style="text-align:center; vertical-align:middle" %)**CRC low byte**
198 -|(% style="text-align:center; vertical-align:middle" %)01|(% style="text-align:center; vertical-align:middle" %)06|(% style="text-align:center; vertical-align:middle" %)01|(% style="text-align:center; vertical-align:middle" %)0A|(% style="text-align:center; vertical-align:middle" %)0B|(% style="text-align:center; vertical-align:middle" %)B8|(% style="text-align:center; vertical-align:middle" %)AF
201 +|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Register address**|(% colspan="2" %)**Data**|(% rowspan="2" %)**CRC check code**
202 +|**high byte**|**low byte**|**high byte**|**low byte**
203 +|01|06|01|0A|0B|B8|AF, 76
199 199  
205 +
206 +
207 +**10 Function code write**
208 +
209 +P07-09 set the 1st segment position to 2000, and this variable corresponds to the Modbus address: 1801 (0x0709).
210 +
211 +Request format:
212 +
213 +|(% 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**
214 +|**high byte**|**low byte**|**high byte**|**low byte**|**high byte**|**low byte**|**high byte**|**low byte**|**high byte**|**low byte**
215 +|01|10|07|09|00|02|04|00|00|07|D0|16|59
216 +
217 +The slave responds normally:
218 +
219 +|(% rowspan="2" %)**Address**|(% rowspan="2" %)**Function code**|(% colspan="2" %)**Register address**|(% colspan="2" %)**Data**|(% colspan="2" %)**CRC check code**
220 +|**high byte**|**low byte**|**high byte**|**low byte**|**high byte**|**low byte**
221 +|01|10|07|09|00|02|90|BE
222 +
200 200  = **Servo communication parameter setting** =
201 201  
202 202  (% style="text-align:center" %)
... ... @@ -216,14 +216,11 @@
216 216  
217 217  The data bit check methods of servo communication are:
218 218  
219 -Odd parity
242 +* Odd parity
243 +* Even parity
244 +* No parity
245 +* The stop bit: 1 stop bit and 2 stop bits.
220 220  
221 -Even parity
222 -
223 -No parity
224 -
225 -The stop bit: 1 stop bit and 2 stop bits.
226 -
227 227  The data frame format of the servo and the host computer must be consistent, otherwise the communication cannot be carried out.
228 228  
229 229  **(4) Set that whether the function code changed by Modbus communication is written into EEPROM in real time [P12-4]**
... ... @@ -251,12 +251,12 @@
251 251  **Setting method**
252 252  )))|(% style="text-align:center; vertical-align:middle; width:186px" %)(((
253 253  **Effective time**
254 -)))|(% style="text-align:center; vertical-align:middle; width:130px" %)**Default value**|(% style="text-align:center; vertical-align:middle; width:132px" %)**Range**|(% style="text-align:center; vertical-align:middle; width:335px" %)**Definition**|(% style="text-align:center; vertical-align:middle; width:189px" %)**Unit**
274 +)))|(% style="text-align:center; vertical-align:middle; width:130px" %)**Default value**|(% style="text-align:center; vertical-align:middle; width:132px" %)**Range**|(% style="text-align:center; vertical-align:middle; width:252px" %)**Definition**|(% style="text-align:center; vertical-align:middle; width:85px" %)**Unit**
255 255  |(% style="text-align:center; vertical-align:middle; width:121px" %)P12-02|(% style="text-align:center; vertical-align:middle; width:205px" %)Baud rate|(% style="text-align:center; vertical-align:middle; width:187px" %)(((
256 256  Operation setting
257 257  )))|(% style="text-align:center; vertical-align:middle; width:186px" %)(((
258 258  Effective immediately
259 -)))|(% style="text-align:center; vertical-align:middle; width:130px" %)2|(% style="text-align:center; vertical-align:middle; width:132px" %)0 to 5|(% style="width:335px" %)(((
279 +)))|(% style="text-align:center; vertical-align:middle; width:130px" %)2|(% style="text-align:center; vertical-align:middle; width:132px" %)0 to 5|(% style="width:252px" %)(((
260 260  0-2400bps
261 261  
262 262  1-4800bps
... ... @@ -268,12 +268,12 @@
268 268  4-38400bps
269 269  
270 270  5-57600bp
271 -)))|(% style="text-align:center; vertical-align:middle; width:189px" %)-
291 +)))|(% style="text-align:center; vertical-align:middle; width:85px" %)-
272 272  |(% style="text-align:center; vertical-align:middle; width:121px" %)P12-03|(% style="text-align:center; vertical-align:middle; width:205px" %)Serial data format|(% style="text-align:center; vertical-align:middle; width:187px" %)(((
273 273  Operation setting
274 274  )))|(% style="text-align:center; vertical-align:middle; width:186px" %)(((
275 275  Effective immediately
276 -)))|(% style="text-align:center; vertical-align:middle; width:130px" %)0|(% style="text-align:center; vertical-align:middle; width:132px" %)0 to 3|(% style="width:335px" %)(((
296 +)))|(% style="text-align:center; vertical-align:middle; width:130px" %)0|(% style="text-align:center; vertical-align:middle; width:132px" %)0 to 3|(% style="width:252px" %)(((
277 277  0: 1 stop bit, no parity
278 278  
279 279  1: 1 stop bit, odd parity
... ... @@ -281,16 +281,16 @@
281 281  2: 1 stop bit, even parity
282 282  
283 283  3: 2 stop bits, no parity
284 -)))|(% style="text-align:center; vertical-align:middle; width:189px" %)-
304 +)))|(% style="text-align:center; vertical-align:middle; width:85px" %)-
285 285  |(% style="text-align:center; vertical-align:middle; width:121px" %)P12-04|(% style="text-align:center; vertical-align:middle; width:205px" %)Modbus communication data is written into EEPROM|(% style="text-align:center; vertical-align:middle; width:187px" %)(((
286 286  Operation setting
287 287  )))|(% style="text-align:center; vertical-align:middle; width:186px" %)(((
288 288  Effective immediately
289 -)))|(% style="text-align:center; vertical-align:middle; width:130px" %)0|(% style="text-align:center; vertical-align:middle; width:132px" %)0 to 1|(% style="width:335px" %)(((
309 +)))|(% style="text-align:center; vertical-align:middle; width:130px" %)0|(% style="text-align:center; vertical-align:middle; width:132px" %)0 to 1|(% style="width:252px" %)(((
290 290  0: Do not write to EEPROM, and do not store after power failure;
291 291  
292 292  1: Write to EEPROM, power-down storage.
293 -)))|(% style="text-align:center; vertical-align:middle; width:189px" %)-
313 +)))|(% style="text-align:center; vertical-align:middle; width:85px" %)-
294 294  
295 295  = **Modbus communication variable address and value** =
296 296  
... ... @@ -298,24 +298,21 @@
298 298  
299 299  Modbus registers are divided into two categories:
300 300  
301 -~1. The first category is servo function code parameters (address: 0x0001 to 0x0D08), this part of the register is readable and writable (that is, 0x03 and 0x06 are supported);
321 +1. The first category is servo function code parameters (address: 0x0001 to 0x0D08), this part of the register is readable and writable (that is, 0x03 and 0x06 are supported);
322 +1. The second category is the monitoring volume of the servo (address: 0x1E01 to 0x2010), this part of the register is only readable (0x03 function is supported).
302 302  
303 -2. The second category is the monitoring volume of the servo (address: 0x1E01 to 0x2010), this part of the register is only readable (0x03 function is supported).
304 -
305 305  **Servo function code representation: PXX-YY.**
306 306  
307 -XX: represents the function code group number,
326 +* XX: represents the function code group number,
327 +* YY: represents the bias within the function code group;;
308 308  
309 -YY: represents the bias within the function code group;;
310 -
311 311  During servo communication, the communication address of the function code is a 16-bit address, which is composed of the function code group number (high 8 bits) + group bias (low 8 bits), for example, the Modbus address corresponding to P12-1 (servo address) is 0x0C01.
312 312  
313 313  **Servo monitor volume representation: Uxx-yy.**
314 314  
315 -xx: represents the monitoring volume group number,
333 +* xx: represents the monitoring volume group number,
334 +* yy: represents the bias within the monitoring volume group;
316 316  
317 -yy: represents the bias within the monitoring volume group;
318 -
319 319  During Modbus communication, the starting address of the monitoring volume is 0x1E01, and the conversion relationship of the address is similar to the representation way of the function code.
320 320  
321 321  For example, U0-01 (servo status) corresponds to the Modbus address is 0x1E01.
... ... @@ -340,18 +340,20 @@
340 340  
341 341  When writing function codes with signed numbers, you need to convert the pre-written data into hexadecimal complements. The conversion rules are as follows:
342 342  
343 -~1. The data is positive or 0: complement code = original code
360 +1. The data is positive or 0: complement code = original code
361 +1. The data is negative: complement code = 0xFFFF-absolute value of data + 0x0001
344 344  
345 -2. The data is negative: complement code = 0xFFFF-absolute value of data + 0x0001
363 +For example:
346 346  
347 -For example,The 16-bit signed positive number +100, the original code is 0x0064, and the complement is: 0x0064. The 16-bit signed positive number -100, its hexadecimal complement is: 0xFFFF-0x0064 + 0x0001 = 0xFF9C.
365 +* The 16-bit signed positive number +100, the original code is 0x0064, and the complement is: 0x0064.
366 +* The 16-bit signed positive number -100, its hexadecimal complement is: 0xFFFF-0x0064 + 0x0001 = 0xFF9C.
367 +* If it is an unsigned number, just pass it directly according to its original code. For example, if the decimal number is 32768, write 0x8000 directly.
348 348  
349 -If it is an unsigned number, just pass it directly according to its original code. For example, if the decimal number is 32768, write 0x8000 directly.
350 -
351 351  == **Numerical unit description** ==
352 352  
353 353  Some values have units and decimals, such as 0.1%, 0.1Hz, 0.01ms, and the corresponding value conversion is required when reading and writing. The methods are as follows:
354 354  
355 -~1. When the unit is 0.1%: 1 represents 0.1%, 10 represents 1.0%, 1000 represents 100.0%. Therefore, writing 1000 means setting to 100.0%; on the contrary, if it is reading 1000, it means that the value is 100.0%;
373 +1. When the unit is 0.1%: 1 represents 0.1%, 10 represents 1.0%, 1000 represents 100.0%. Therefore, writing 1000 means setting to 100.0%; on the contrary, if it is reading 1000, it means that the value is 100.0%;
374 +1. When the unit is 0.01ms: 1 means 0.01ms, 50 means 0.5ms, 10000 means 100ms. Therefore, writing 1000 means setting to 10.00ms; on the contrary, if 1000 is read, it means 10.00ms;
356 356  
357 -2. When the unit is 0.01ms: 1 means 0.01ms, 50 means 0.5ms, 10000 means 100ms. Therefore, writing 1000 means setting to 10.00ms; on the contrary, if 1000 is read, it means 10.00ms; The other units can be deduced by this, and integer remains unchanged.
376 +The other units can be deduced by this, and integer remains unchanged.