An RTU transmits a higher density than the ASCII. Parameter format: Start bit +8bits data bit + check digit + stop bit.
1.1 Check default is parity, recommended for no verification, test to more than one stop bit (that is, stop bit is 2 bits)
1.2 Send order from left to right LSB->MSB
1.3 must be satisfied when the communication rate is less than or equal to 19200: the interval between frames is not less than 3.5 character time and the interval between each character is not greater than 1.5 character time; T3.5=1750ms,t1.5=750us is required when the rate is greater than 19200
1.4CRC16: Send high bytes to low byte first, CRC content does not include start bit, check bit and stop bit.
Two-interface requirements and drive capability: Theoretically 1~247 from the device, address 0 is the broadcast address. The child node address must be unique.
RS485 2-wire + common ground (single point): 32 without relay, 4 less than offset when no polarity bias is added. Polarity bias: the upper and lower resistor is 450~650 ohm, pull up to 5V, pull down to the ground, at this time using 1nf/10v and 120 ohm/0.25w resistor series matching to eliminate the reflection; the non-polarity bias matching resistor is 150 ohm/0.5w.
RS232: No more than 20m away.
Three error codes and exception codes:
Error code: When error will function code the highest position 1 that is: Error code = function Code +0X80
Exception code: In the P42 page of the data, there are mainly 01~04 (function error, address error, illegal value, unable to respond)
Four Perfect aspects:
1 Device Identification code:
2 Timeout Management: Response time + conversion time.
3 Error and Performance management: function code + counter number
Five: NOTE:
5.1 Function Code 0x10 (write multiple registers): The number range of registers is 1~120
Modbus-rtu Learning