Company logo
SearchHome
 
SubIndex
The SubIndex field is used in conjunction with the declaration of DataType to select a particular bit or byte, which is used to get the runtime value. The bits are read from right to left, starting with bit 0 and finishing with bit 15 for a total of 16 bits. The following figure shows how a bit value can be extracted from a reply of two bytes, or how one particular byte can be chosen.
Choice of Custom Object Models over the Standard Object Models
Using SubIndex, it is possible to extract only a part of the register's value and represent it as a data point property. This allows an interesting possibility to handle integration of Modbus devices whose registers or data points represent a collection of states. The following example illustrates this:
In order to create a data point that can extract parts of a register value to represent its properties, you must create a custom Object Model, along with Import rules telling the Importer which byte or bit to assign to a property. The Custom Object Model to Represent a Modbus Device or Register section describes the process of creating a custom object model. In the following example, instances of a custom defined object model called FIRE_ZONE is created to represent the datapoints.