Issue
Most of the xDriver points provide bit (binary) information in a word(integer) point in order to save register address. In order to interpret/decrypt the bit information out of the word(integer) value, PE programming is required.
Environment
Net Controller (CX99xx, CX96xx)
bCX controller (bCX4040)
ACX5740/5720
Cause
Bit information is displayed as a number in the controller when read in to. Need to have PE function to decrypt the number in to each bit information.
Resolution
Create InfinityProgram in the Controller as below;
' = = = = = = = = =
Numeric locNum1
Numeric nBit0, nBit1, nBit2, nBit3, nBit4, nBit5, nBit6, nBit7, Numeric nBit8, nBit9, nBit10, nBit11, nBit12, nBit13, nBit14, nBit15
Line ReadAndSet
locNum1 = CIAlarms ' Read the xDriver point and set to local point.
Goto AAA
Line AAA
' Decrypt each bit information from the locally mirrored point.
nBit0 = (locNum1 bitand 2 ^ 0) > 0
nBit1 = (locNum1 bitand 2 ^ 1) > 0
nBit2 = (locNum1 bitand 2 ^ 2) > 0
. . . . .
nBit15 = (locNum1 bitand 2 ^ 15) > 0
Goto BBB
Line BBB
' Do something here for each nBit0~nBit15 such as below
' If nBit0 then
' set InverterTempAlarm = On 'Set the global point to ON
' Else
' set InverterTempAlarm = Off 'Set the global point to OFF
' Endif
. . . . . .
Goto CCC
Line CCC
' Wait for 15 seconds and send to the first line to read the xDriver point again.
If TS < 15 then Goto CCC
Goto ReadAndSet
Line E
If TS < 30 then Goto E
Goto ReadAndSet
' = = = = = = = = =