The Xentara Modbus Driver v1.2
User Manual
|
RTU busses are a type of Xentara I/O components. Each RTU bus represent a physical or virtual serial port with one or more attached Modbus servers.
An RTU bus will typically be have a structure similar to this:
Sometimes, the individual devices will have separate polls so that different polling intervals can be used for different devices:
Some serial devices can become available and unavailable during the operation of Xentara. A Modbus device that is connected using USB, for example, will become unavailable when unplugged, and available again when pluggen back in. If such a device is unplugged and plugged back in, the serial port must be reopened before communication can resume. The Xentara Modbus driver does not automatically attempt to reopen the connection, because this may have undesirable effects for some types of devices.
If you are communicating with devices on an RTU bus that may need to be reopened, you must schedule the reopening attempts explicitly. Modbus RTU busses have a task named reconnect that can be inserted into a Xentara execution pipeline in order to schedule the reopening attempts. If you do not schedule this task, then the RTU bus will not be reopened if it ever fails. Note that built-in serial ports, as well as serial ports on serial expansion cards and the like, can never become unavailable unexpectedly, so you do not need to schedule a reconnect task for such busses. Only schedule this task for serial lines that can be connected and disconnected on the fly, like USB to serial bridges.
Modbus RTU busses have the following members:
key | The bus’s primary key. |
name | The bus’s name. The name is the last component of the primary key. |
UUID | The unique UUID of the bus. |
type | The bus’s element type. For Modbus RTU busses, this is always “Modbus RTU bus”. |
category | The bus’s category. For Modbus RTU busses, this is always “device”. |
device | The serial port device. |
baudRate | The baud rate, in bits per second. |
reconnect | Attempts to reopen the serial port if it is closed. |