Modbus Peripheral Autodiscovery

From embeddedTS Manuals

The autoconfiguration works by using the optional mode pin on the RJ45 connector as designated in the MODBUS-2W standard. Technologic Systems uses this to indicate if it is a TS device. If it is asserted (low) to a TS device, then it will allow access to the #Holding Registers at address 0xf7.

This will identify the TS Modbus device model, set the first device in the chain to the user specified slave address (default is 0x10), and assert the mode line to the next port to enumerate the next device. The next device address is incremented by 1, and the process is repeated until no slave responds to a read query (timeout)indicats that no additional devices are connected to the bus chain. At this point the last device in the chain is configured to enable bus termination on the RS485 link, and all devices have their bit rates set to the user selected bit rate (default is 9600).