NET.MBLINK supports the following MODBUS function codes.
|
MODBUS FUNCTION |
DESCRIPTION |
|
01 - 0x01 |
Reads ON/OFF Status of discrete outputs (0X references, coils) in the slave device. Broadcast is not supported |
|
02 - 0x02 |
Reads ON/OFF Status of discrete intputs (1X references, coils) in the slave device. Broadcast is not supported |
|
03 - 0x03 |
Reads contents of status of holding registers (4X references, coils) in the slave device. Broadcast is not supported. |
|
04 - 0x04 |
Reads contents of status of input registers (1X references, coils) in the slave device. Broadcast is not supported. |
|
05 - 0x05 |
Writes ON/OFF state to (0X reference) in the slave device. When broadcast, the function sets the same 0X reference in all attached slaves. |
|
06 - 0x06 |
Write contents to (4X reference) in the slave device. When broadcast, the function sets the same 4X reference in all attached slaves. |
|
15 - 0x0F |
Writes ON/OFF states to a consecutive sequence of (0X references). When broadcast, the function sets the same 0X reference in all attached slaves. |
|
16 - 0x10 |
Writes 16-bit contents to a consecutive sequence of (4X references). When broadcast, the function sets the same 4X reference in all attached slaves. |
|
22 - 0x16 |
Writes ON/OFF state of an individual bit within a (4X reference). When broadcast, the function sets the same 4X reference in all attached slaves. |
NET.MBLINK automatically executes the appropriate MODBUS function code based on:
Reference Address (See Tag.Name )
Read / Write operation (See Controller.ReadTag | Controller.WriteTag | Controller.GroupRead | Controller.GroupWrite )
Data Type ( See Tag.DataType | Tag.NetType )
Number of Data Items (See Tag.Length | TagGroup.Count )
NOTES:
Data values are set and retrieved in the Tag.Value property
MODBUS Exception Codes are reported in the Controller.ErrorCode | Controller.ErrorString properties
By default MODBUS devices use Little Endian to store 32-bit values. However, if the 32-bit value you are reading or writing does not seem to be correct, you can change the endianess to Big Endian by setting the Controller.SwapWords property.
NET.MBLINK will self-optimize communcations.
Broadcasting to serial devices occurs by setting Controller.Path = "0"