Addressing Bits
In order to address individual bits in Ignition, you must create a separate OPC tag pointing directly to the specific bit in the PLC.
When the integer values that come from the OPC tags are a series of binary bits, it is then possible to address each bit. For example, an integer value can have a 16-bit binary representation as shown here:
Integer |
Bit level representation |
How it works |
4096 |
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0 |
212 = 4096 |
1025 |
1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0 |
20 + 210 = 1025 |
To address an individual bit
Suppose a MicroLogix PLC is connected to a Gateway.
-
From the Tag Editor window, create an OPC tag to have:
Data Type: Integer with a value of 1025
OPC Item Path: [MLX]B3:0 -
Then create a new OPC tag with a Boolean value to the first bit of this tag as follows:
Data Type: Boolean with a value of 1 or True
OPC Item Path: [MLX]B3:0/0 (for Micrologic, you can specify the bit as: 0/0 or 0.0. That is, with a slash/ or a period.) [MLX]B3:0/0 has a value of 1 or a Boolean value of True
Next ...
-
add link here