|
18 | 18 | // Exception: XX is the exception code |
19 | 19 | 00 01 00 00 00 03 01 81 XX |
20 | 20 | ``` |
21 | | - - __0x05__: Write single coil, according to Modbus protocol, specified data can only be 0xFF00 or 0x0000,for wriring 1 or 0 to the register. |
| 21 | + - __0x05__: Write single coil, according to Modbus protocol, specified data can only be 0xFF00 or 0x0000,for writing 1 or 0 to the register. |
22 | 22 | ```C++ |
23 | 23 | // sample request and response / exception |
24 | 24 | // Request: Write 1 to register address 0x0002 (0xFF00 for writing 1, 0x0000 for writing 0) |
|
44 | 44 | // sample request and response / exception |
45 | 45 | // Request: Read 16 consecutive registers from address 0x0000 |
46 | 46 | 00 01 00 00 00 06 01 02 00 00 00 10 |
47 | | - // Response:: every bit in the Received data (0xFF 0x00 here as an example) represents the corresponding register value in order |
| 47 | + // Response: every bit in the Received data (0xFF 0x00 here as an example) represents the corresponding register value in order |
48 | 48 | 00 01 00 00 00 05 01 02 02 FF 00 |
49 | 49 | // Exception: XX is the exception code |
50 | 50 | 00 01 00 00 00 03 01 82 XX |
|
55 | 55 | // sample request and response / exception |
56 | 56 | // Request: read 2 consecutive holding registers starting from address 0x0003 |
57 | 57 | 00 01 00 00 00 06 01 03 00 03 00 02 |
58 | | - // Response:: Received values of the two registers are (00 05) and (00 06) as an example here |
| 58 | + // Response: Received values of the two registers are (00 05) and (00 06) as an example here |
59 | 59 | 00 01 00 00 00 07 01 03 04 00 05 00 06 |
60 | 60 | // Exception: XX is the exception code |
61 | 61 | 00 01 00 00 00 03 01 83 XX |
|
86 | 86 | // sample request and response / exception |
87 | 87 | // Request: write to register address of 0x0000 with mask. |
88 | 88 | // "AND" operation mask is (00 0F),"OR" operation mask is (0F 00) |
89 | | - // If the value before this operation is "val", then after the mask opeation it becomes: (val & 0x000F) | (0x0F00 & ~0x000F) |
| 89 | + // If the value before this operation is "val", then after the mask operation it becomes: (val & 0x000F) | (0x0F00 & ~0x000F) |
90 | 90 | 00 04 00 00 00 08 01 16 00 00 00 0F 0F 00 |
91 | 91 | // Response: |
92 | 92 | 00 04 00 00 00 08 01 16 00 00 00 0F 0F 00 |
|
108 | 108 | - 0x04: Read multiple input registers |
109 | 109 | ```C++ |
110 | 110 | // sample request and response / exception |
111 | | - // Request: read 2 consecutive holding registers from address 0x0003 |
| 111 | + // Request: read 2 consecutive input registers from address 0x0003 |
112 | 112 | 00 01 00 00 00 06 01 04 00 03 00 02 |
113 | 113 | // Response: Received 2 values are (00 0E) and (00 13) as an example |
114 | 114 | 00 01 00 00 00 07 01 04 04 00 0E 00 13 |
|
117 | 117 | ``` |
118 | 118 |
|
119 | 119 | # Exception code explanation |
120 | | -- __0x01__: Illegal/Unsuppported function code |
| 120 | +- __0x01__: Illegal/Unsupported function code |
121 | 121 | - __0x02__: Illegal target address |
122 | 122 | - __0x03__: Exception of requested data |
123 | 123 |
|
|
171 | 171 | | 32 | 0x20 | Robot Error code | |
172 | 172 | | 33 | 0x21 | Robot Warning code | |
173 | 173 | | 34 ~ 35 | 0x22 ~ 0x23 | Counter value (0x22 stores the higher 16-bit, 0x23 stores the lower 16-bit) | |
174 | | - | 36 ~ 63 | 0x23 ~ 0x3F | Reserved | |
| 174 | + | 36 ~ 63 | 0x24 ~ 0x3F | Reserved | |
175 | 175 | | 64 ~ 72 | 0x40 ~ 0x48 | Current TCP coordinate of x/y/z/roll/pitch/yaw/rx/ry/rz values, register values are 10 times the real numbers (unit: mm, degree) | |
176 | 176 | | 73 ~ 76 | 0x49 ~ 0x4C | TCP payload mass(1000x)/center_x(10x)/center_y(10x)/center_z(10x) (unit: kg, mm) | |
177 | 177 | | 77 ~ 82 | 0x4D ~ 0x52 | TCP Offset, register values are 10 times the real numbers(unit: mm, degree) | |
178 | 178 | | 83 ~ 88 | 0x53 ~ 0x58 | User/world coordinate offset, register values are 10 times the real numbers(unit: mm, degree) | |
179 | 179 | | 89 ~ 95 | 0x59 ~ 0x5F | joint (J1-J7) angles, register values are 10 times the real numbers(unit: degree) | |
180 | | - | 86 ~ 102 | 0x60 ~ 0x66 | joint (J1-J7) temperature (unit: degree Celsius) | |
| 180 | + | 96 ~ 102 | 0x60 ~ 0x66 | joint (J1-J7) temperature (unit: degree Celsius) | |
181 | 181 | | 103 ~ 109 | 0x67 ~ 0x6D | joint (J1-J7) speed, register values are 10 times the real numbers(unit: degree/s) | |
182 | 182 | | 110 | 0x6E | Robot TCP linear speed, register values are 10 times the real numbers(unit: mm/s) | |
183 | 183 | | 111 ~ 127 | 0x6F ~ 0x7F | Reserved | |
0 commit comments