The Xentara Modbus Driver v1.2
User Manual
JSON Format for RTU Busses

A JSON object describing an RTU bus has the following syntax:

{
"@Skill.Modbus.Type": {
"name": "Bus 1",
"UUID": "969568d0-c12e-45bb-9fc1-3820ebc165c6",
"ACL": { ... },
"device": "/dev/ttyUSB4",
"baudRate": 19200,
"dataFormat": "8N1",
"serialMode": "RS485",
"RTS": "none",
"children": [
...
]
}
}

Object Members
nameA string value containing the name of the bus. The name is used to construct the bus’s primary key.
UUIDA string value containing the unique UUID of the bus.
ACLAn optional JSON object containing the element ACL of the bus. The format of the object is described under JSON Format for ACLs in the Xentara user manual.
deviceA string value containing the serial device of the bus. Under Linux, this must be the device path (e.g. "/dev/ttyS15"). Under Windows, this must be the serial port’s device name (e.g. "COM15").
baudRateAn integer value containing the baud rate to be used for the serial port, in bits per second, e.g. 9600, 19200, 57600, 115200, etc. The supported baud rates depend on the operating system and communications hardware used.
dataFormatA string value containing the number of data bits, parity, and number of stop bits to use for the communication. The data format must be a three-character string consisting of the number of data bits (5, 6, 7, or 8), followed by the parity (“N” for none, “E” for even, or “O” for odd), and the number of stop bits (1 or 2). To use 8 data bits, no parity, and 1 stop bit, for example, specify “8N1” as the data format. To use 7 data bits, even parity, and 2 stop bits, specify “7E2”.
serialModeAn optional string value that specifies the communication mode for UARTs that can be switched from RS232 to RS485. The valus of this option must be either “RS232”, or “RS485”. If you do not specify a serial mode, the serial mode of the UART will be determined by the operating system. This option may only be specified if both the operating system and the communications hardware support switching modes. Switching the communications mode is not supported under Windows, for example.
RTSAn optional string specifying the what RTS flow control mode should be used. The possible values are “none”, to omit any flow control, “high” to set the RTS line to high during transmit (active high), and “low” to set it to low during transmit (active low). If you do not specify this option, then no RTS flow control will be used.
children

A JSON array containing the devices on the bus, and any device independent polls for the bus.

The individual child elements are each represented by a double nested JSON object, as described in Element Blocks under Structure of the Model File in the Xentara user manual. The outer object has a single member whose name is the type of element, and whose value is another JSON object that contains the actual properties of the element.