A Modbus Digital Input Configured to Contain Output Coil Data
This example demonstrates how you might configure a Modbus Digital point to represent Output Coil data from a Modbus PLC.
Example:
Within ClearSCADA, a 1-bit digital Input point is to contain data from the 9th bit of the third Word in the Output Coil range 00006 to 00105. (An Output Coil contains 1-bit of data.)
The configuration of the Modbus scanner with which the point is associated is detailed in an earlier example (see A Modbus Scanner Configured to Scan a Block of Output Coils). The addressing at the Modbus PLC starts at 1.
Within ClearSCADA, the Modbus Digital Input Point is configured as follows:
Number of Bits:1
Word Offset:2
(As the point is to retrieve data from the third Word in the scanned address range (the first Word being 0). Each Output Coil contains 1-bit of data, therefore a Word Offset of 2 offsets the scanned address range for this point by 32 (as one Word = 16 bits, or 16 Output Coils).)
Bit Offset:8
(The 9th bit in the above Word (the first Bit being 0). Used in conjunction with the Word Offset, this property indicates that the point is to contain data from the 41st Output Coil in the scanned data range.)
The Source attribute for the point confirms that the point is configured to contain data from the 9th bit of the third Word in the Input Register range 00006 to 00105:
MODBUS/TCP-8 502:Device 5, Output Coils - DG 0:00046
(0:00046 indicates the Modbus address 00046, which contains Output Coils in this particular PLC. As the scanner with which the point is associated scans data starting at Data Address 00006, the 46 indicates that the point is to contain data from 9th bit on the third Word of the scanned address range ((2 x 16)(Word Offset) + 8 (Bit Offset) + 1(Address Base) + 5 (scanner starting Data Address) = 46.)