Modbus RTU
This driver supports serial communication with Modbus RTU, Modbus ASCII, Jbus RTU and Jbus ASCII field devices.
In all exchanges, PcVue is the master and the field device is the slave.
Supported functions
|
Decimal |
Hex |
Function |
|
1 |
0x01 |
Read coil status |
|
2 |
0x02 |
Read input status |
|
3 |
0x03 |
Read holding registers |
|
4 |
0x04 |
Read input registers |
|
5 |
0x05 |
Force single coil |
|
6 |
0x06 |
Force single register |
|
15 |
0x0F |
Force multiple coils |
|
16 |
0x10 |
Force multiple registers |
Network properties
This topic only includes a reference of objects' properties.
See the topic How to configure networks devices and frames for more information about how to configure communication objects.
When configuring the network, select the driver that fits your needs:
-
Modbus RTU
-
Modbus ASCII
-
JBUS RTU
-
JBUS ASCII
The rest of the configuration is exactly the same.
| General properties | |
| Name | The name of the network |
| Description | The description of the network (optional) |
| Serial port | The COM port associated to the network |
| Activate at start-up | If enabled, the network will start upon Equipment communication start-up |
|
Advanced properties |
|
|
Timeout |
Use default value |
|
Networking |
|
|
Servers |
The list of PcVue stations where the network will be active |
|
Serial port parameters |
|
| Baud rate | The baud rate on the serial line |
| Data bits | The number of data bits on the serial line |
| Parity | The parity set on the serial line |
| Stop bit(s) | The number of stop bits on the serial line |
| Modem handshaking | If enabled, modem handshaking is performed for flow control on the serial line |
Device properties
| General properties | |
| Name | The name of the device |
| Description | The description of the device (optional) |
| Equipment type | Select the type of equipment that best suits the field device you want communicate with. The list of frame types and address ranges depend on the equipment type. |
| With the Modbus and Jbus drivers, the property Equipment type allows you to select between Modbus and Jbus addressing, decimal and hexadecimal encoding of memory addresses. Modbus frame addresses start at 1, Jbus frame addresses start at 0. |
| Slave address | The slave address of the field device |
| Activate at start-up | If enabled, the device will start upon network start-up |
|
Advanced properties |
|
|
Connection |
|
|
Timeout |
Maximum waiting time between a request and the reply from the equipment |
|
Timestamping |
|
|
Enable |
Tick to enable field device timestamping mode |
| Error address | If timestamping is enabled, the address used to indicate a full stack. Must be set to a positive value (greater than 0). |
| Timestamp UTC | Specify if the field device transmits timestamps as UTC or as local time |
| Delta TS |
Used to set-up direct archiving. If the difference between the timestamp coded in a received timestamped block and the current time is greater than the Delta TS value, the data is sent directly for archiving but is not considered fresh enough to be used as instantaneous value. As a consequence, the value of the corresponding variable is not updated. |
| Modbus addressing | If enabled, addresses found in timestamp blocks are interpreted as Modbus addresses (as opposed to Jbus addresses) |
|
Miscellaneous |
|
|
Virtual |
Reserved. Do not select. |
| Message delay | Reserved. Leave default value 0. |
|
Interoperability issues - Single write disable |
If enabled, the code function for Single write will not be used. Function code 0x15 and 0x16 will be used instead. |
Frame addressing
Depending on the equipment type you have selected when configuring the device, you have access to the following type of frames.
The Starting address and Quantity properties define the memory address range for each frame, how it is read from and written to, and how it is interpreted in PcVue.
Equipment type - JBUS_HEX, JBUS_DEC, MODBUS_DEC and MODBUS_HEX
| Data type | Access | Max quantity | Starting address |
|
Bit |
|||
|
Input bits |
Read |
2048 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
|
WordBit Input registers LMsb |
|||
|
Coils |
Read/Write |
2048 | |
|
WordBit Holding registers LMsb |
|||
|
Word |
|||
|
Input registers |
Read |
128 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
|
Holding registers |
Read/Write |
128 | |
| TimeStamped CEI |
Read/Write |
15 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
| TimeStamped 12b |
Read/Write |
20 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
| TimeStamped 24b |
Read/Write |
17 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
|
Text |
|||
|
Input registers LMsb |
Read |
256 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
|
Holding registers LMsb |
Read/Write |
256 | |
| Swab Input registers LMsb |
Read |
256 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
| Swab Holding registers LMsb |
Read/Write |
256 | |
|
Real |
|||
|
Input registers LMsb |
Read |
64 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
|
Input registers MLsb |
|||
|
Holding registers LMsb |
Read/Write |
64 | |
|
Holding registers MLsb |
|||
|
Double word |
|||
|
Input registers LMsb |
Read |
64 |
0..65535 (JBUS_DEC) 0X0..0xFFFF (JBUS_HEX) 1..65535 (MODBUS_DEC) 0x1..0xFFFF (MODBUS_HEX) |
|
Input registers MLsb |
|||
|
Holding registers LMsb |
Read/Write |
64 | |
|
Holding registers MLsb |
|||
Equipment type - JBUS_BROADCAST and MODBUS_BROADCAST
| Data type | Access | Max quantity | Starting address |
|
Bit |
|||
|
Coils |
- | 2048 |
0..65535 (JBUS_BROADCAST) 1..65535 (MODBUS_BROADCAST) |
|
WordBit Holding registers LMsb |
|||
|
Word |
|||
|
Holding registers |
- |
128 |
0..65535 (JBUS_BROADCAST) 1..65535 (MODBUS_BROADCAST) |
|
Text |
|||
|
Holding registers LMsb |
- |
256 |
0..65535 (JBUS_BROADCAST) 1..65535 (MODBUS_BROADCAST) |
| Swab Holding registers LMsb | - | 256 |
0..65535 (JBUS_BROADCAST) 1..65535 (MODBUS_BROADCAST) |
|
Real |
|||
|
Holding registers LMsb |
- |
64 |
0..65535 (JBUS_BROADCAST) 1..65535 (MODBUS_BROADCAST) |
|
Holding registers MLsb |
|||
|
Double word |
|||
|
Holding registers LMsb |
- | 64 |
0..65535 (JBUS_BROADCAST) 1..65535 (MODBUS_BROADCAST) |
|
Holding registers MLsb |
|||
Driver status
The driver status provides driver-specific information to supplement the frame general status. For more information on status in general, refer to the topic General communication status.
|
Driver status |
Description |
|
0001 |
Illegal function (error reported by equipment) |
|
0002 |
Illegal data address in equipment |
|
0003 |
Illegal data value, wrong size |
|
0004 |
Slave device failure - The slave cannot reply |
|
0005 |
Acknowledged - The slave has accepted the request and is processing it, but it will take a long time |
|
0006 |
Slave device is busy - The slave is performing a long lasting execution (program command) |
|
0007 |
Negative acknowledgment |
|
0008 |
Memory parity error |
SCADA Basic scripting
You can control communication with this driver in SCADA Basic scripts with the CIMWAY instruction.