sinee — 9.6Examples

9.5.4 CRC check The transmitter first calculates the CRC value, which is included in the sent message. Upon receiving the message, the receiver will recalculate the CRC value and compare the calculated value with the received CRC value. If the two values are not equal, it means that there is an error in the sending process. Calculation process of CRC check: 1) Define a CRC register and assign an initial value, FFFFH. 2) Perform the XOR calculation with the first byte of the transmitted message and the value of the CRC register, and store the result in the CRC register. Starting from the address code, the start bit and stop bit are not involved in calculation.

3) Extract and check the LSB (the least significant bit of the CRC register). 4) All bits of the CRC register are shifted to the right by one bit, and the most significant bit is filled by 0. 5) If the LSB is 1, perform the XOR calculation of the CRC register value and A001H, and store the result in the CRC register. 6) Repeat the steps 3, 4, and 5 until 8 shifts are completed. 7) Repeat the steps 2, 3, 4, 5 and 6 to process next byte of the transmitted message, until all bytes of the transmitted message are processed. Repeat the above procedures until all bytes of information are processed and transmitted. 8) After the calculation, the content of the CRC register is the value of CRC check.

9) Upon transmission, low bytes of the CRC check value will be sent before high bytes. 9.5.5 Line diagnosis and 0x08 setting description 9.5.6 Exception response When the host sends incorrect data or the servo receives incorrect data due to external interference, an exception response message will be sent back. Data structure of exception response: Exception code table: Note: If the function code is incorrect, the exception code is 0x01 9.6 Examples Write No. 1 servo driver as position control, i.e. P1-00 = 1, and save it.

(P7-04 and P7-05 are default settings) 189 Technical Manual for EA190 Series Servo Driver V100 Function Parameter MODBUS communication address P7-04 P7-05 0000H~3FxxH (0000H~3FxxH)+8000H 0 1 Write to EEPROM, and save Write to RAM, without saving 0 0 Write to RAM, without saving Write to EEPROM, and save 1 1 Write to RAM, without saving Write to RAM, without saving 1 0 Write to RAM, without saving Write to RAM, without saving Sub-function code Request data Ack data Sub-function meaning 0000H #data16 Same with the request data Line diagnosis Details of the ADU part Number of bytes Description Address code 1 Slave address Function code 1 Equal to the sent function code + 0x80 Exception code 1 See the exception code table CRC check (L) 2 CRC16 CRC check (H) CRC16 Data Meaning 1 Function code incorrect 2 Address incorrect 3 Data length or CRC check incorrect 5 Write a parameter in excess of the range 6 The current parameter cannot be written Transmission order 0 1 2 3 4 5 6 7 8 9 Transmission content 01H 06H 01H 00H 00H 01H 49H F6H Receiving order 0 1 2 3 4 5 6 7 8 9 Receiving content 01H 06H 01H 00H 00H 01H 49H F6H