The Modbus serial data source is used to gather data from a local modbus network, accessible via RS232 or RS485 (requires adapter) communication. This is a polling data source.
Every data source requires a Name, which can be any description. The Update period determines how often the Modbus equipment is polled for data. Checking Quantize will cause the data source startup to be delayed so that pollings occur at a "rounded" point in time (e.g. if polling is every 10 seconds, polls will occur on the 10th second, the 20th second, etc). Otherwise, polling will begin immediately. The Timeout and Retries fields determine the system behaviour in the case of a polling failure. The data source waits the given number of timeout milliseconds for a response from the network. If it is not received the request will be retried the given number of times.
The Contiguous batches only checkbox can be used to specify that the modbus implementation should not attempt to optimize disparate value requests into a single request. Checking this field will cause the implementation to only make requests for multiple values when those value form contiguous register space.
The Create slave monitor points checkbox indicates whether slave monitor points should automatically be created by the data source. A slave monitor point is a binary point that indicates the current status of a slave. If a polling request to a slave fails due to timeout or error, the slave is considered off line. These points can then be used for control just like other points.
The Max read bit count, Max read register count, and Max write register count count fields control how large batch requests can be. The Modbus specification provides defaults for these values, but some hardware may impose different limits.
Serial communication is controlled with the Baud rate, Flow control in, Flow control out, Data bits, Stop bits, and Parity values. The Echo setting can be used with RS485 networks as appropriate.
The Encoding value determines how Modbus requests are formatted. Most production hardware uses RTU formatted messages. See the Modbus documentation for your equipment to determine how to set this field.
The Concurrency value determines how Modbus requests are synchronized. A value of Transport means that any request must complete before the next can begin. Slave means that any request to a slave must complete before another for the same slave can begin, but requests to separate slaves can occur concurrently. Function means that any request of a particular slave/function must complete before another with the same slave/function can begin. The Function value allows the highest level of concurrency possible in modbus serial, but may cause data corruption in some networks depending on duplexing.
Networks can be scanned for slave nodes using the scan utility. This feature iterates from slave id 1 to 240, sending each a ReadExceptionStatus (function code 7). If a response is received (using the given timeout and retries settings), the node is considered available. Note that not all equipment supports this function code, so false negatives are possible.