Weihai IDENCODER Electronic Technology Co.,Ltd is one of the leading crane monitoring encoder manufacturers and suppliers,Website:http://www.idencoder.net, equipped with one of the famous brands, welcome to buy our customized bulk crane encoder in stock and you are also welcomed to check the price, pricelist or the quotation with our factory.
MODBUS Protocol is a protocol used for PROFIBUS, it identifies that a device controller can recognize and use information frame, and it describes the process that how main station controller visits slave devices, also, it stipulates how slave devices makes response, inspects and reports transmission errors.
MODBUS encoder, using bundled software, can conduct auto-detect and set of Baud rate, allocate Site URL, selec the accounting direction of encoder. MODBUS protocol Adopting MODBUS RTU protocol. 8BIT data bits, no odd-even check, 1BIT stop bit.
Information frame:
Address Code
Function Code
Data Area
Error-Checking Code
8BITS
8BITS
N*8BITS
16BITS
Address Code: Primary device puts the device's address which is to contact with into the information frame's address field to selec slave device. When slave device sends a reply information, it puts its address into the reply information frame's address in order to let primary device know which slave device made that response. The range of address code is from 1 to 254.Function Code: When information is delivered from primary device to slave device, the function code would inform slave code what action should be carried out. When slave device replies, it uses function code to judge whether it's a normal reply or an objectionable reply. (Function code's top position of objectionable reply is 1). ADK series encoder only support function code03 till now.
Code
Implication
Operation
03
reading data
return to encoder's current value
Data Area: The information that primary devices send to slave devices includes some additional information that needs to be carried out by encoder. Without error, the data area sent back from slave devices include the data required by primary devices. If there's an error, objectionable code is included in this area.
Error-Checking Code: Error-Checking adopts CRC method, mainframe and encoder can use checking code to judge whether there's any wrong when accept information. When the data is transmitted, low-order of CRC value ahead, and high-order behind. The generator polynomial that CRC adopts isg(x)=X16+X12+X 5 +1。