PLC's Quantum, Momentum M340 and M580, UnityPro
Communication with PLC and IO devices compatible with Modbus Open Standard protocol. It operates as a Master on TCP/IP or serial networks. The communications blocks are dynamically created according to the pooling cycle defined on the AccessType for each Device Point.
Operand | Read | Write | Data Type | Address size |
0 – %Q or %M - Coils | Yes | Yes | Bit | 1 bit |
1 – %I - Input Status | Yes | - | Bit | 1 bit |
3 – %IW - Input Registers | Yes | - | Word | 2 bytes |
4 – %MW - Holding Registers | Yes | Yes | Word | 2 bytes |
The driver uses 4 ProtocolOptions fields (all positional via DrvParams):
DrvParams[0] = MsgFormat (string): Encoding/protocol format — "RTU TCP", "RTU", or "ASC" (ASCII). Default: "RTU TCP".DrvParams[1] = SingleWrite (string): Write mode — "Use Single Write" for individual writes, anything else for block writes. Default: block write.DrvParams[2] = WriteFFonCoils (string): If "FF", writes 0xFF instead of 0x01 for coil ON state (required by some PLCs). Default: 0x01.DrvParams[3] = OffsetAddress (boolean): If true, adds +1 offset to Modbus addresses (for PLCs that use 1-based addressing). Default:Encoding: Determines how the information will be packed into the message fields and decoded. The options are:
Serial and MultiSerial channels:
Set the other fields according to your Serial or MultiSerial port configuration
TCP/IP channels:
Serial channels:
E.g.: 1
MultiSerial channels:
Where:
E.g.: com1 ; 1
TCP/IP channels:
Where :
E.g.: 192.168.1.101 ; 502 ; 1
The syntax for the UnityPro communication points is: <Operand><Address>
Where:
Operand |
|---|
0 – %Q or %M - Coils |
1 – %I - Input Status |
3 – %IW - Input Registers |
4 – %MW - Holding Registers |
For more information about the valid operands, see the Supported Operands table aforementioned.
E.g.: 400001 (Operand = 4 (%MW), Address = 1)
Modbus protocol error codes | ||
|---|---|---|
Error | Name | Description |
1 | ILLEGAL FUNCTION | The function code received in the query is not allowable. |
2 | ILLEGAL DATA ADDRESS | The data address received in the query is not allowable. |
3 | ILLEGAL DATA VALUE | A value contained in the query data field is not allowable. |
4 | SLAVE DEVICE FAILURE | Error while attempting to perform the requested action. |
5 | ACKNOWLEDGE | Request accepted, but a long duration of time will be required. |
6 | SLAVE DEVICE BUSY | The slave is engaged in a long–duration program command. |
7 | NEGATIVE ACKNOWLEDGE | Cannot perform the program function received in the query. |
8 | MEMORY PARITY ERROR | Parity error in the extended memory. |
UnityPro Revision History | |
|---|---|
Version | Notes |
1.7.0.0 | Initial release on new documentation standards. |