CIP 16bit Integer Array what is each bit value

Rusty

Member
Join Date
Oct 2023
Location
Tulsa, OK
Posts
2
The analog array has 16 individual bits and each bit is an alarm.
SCADA is having issues getting the BIT bool value.

However they can get the analog value.
Is there a way to calculate which bits are on based on the integer array value?

If bits 1, 3, and 14 are on you would get a value that is different than if bits 2,9 and 11 were on.

How could they figure out what alarms are on based on the value?

I wish they could get the bit values. The Alarm array tag bits just won't respond as Alarms_Plant[0].0, if you have any ideas folks please let me know.
Thank You ALL
 
Welcome to the forum!

What SCADA platform are you using? Most likely you'll have to use some kind of script to extract the individual bits, and the specifics of that will be application-dependent.
 
That's the PLC, we need to know what the SCADA platform is.

(also, "L34" doesn't really match up with any type of Control Logix, but that isn't really the issue here - the SCADA is where you'd be looking to extract the bits)
 
If the scada cannot look at individual bits e.g. sixteenbits.0, perhaps it has a scripting language that has a bitwise AND operator. So for bit 0 you would so something like
sixteenbit0 = sixteenbits AND 1 ;;; or AND 0x0001
for bit 10 you would do
sixteenbitA = sixteenbits AND 1024 ;;; or AND 0x0400
for bit 15 you would do
sixteenbitF = sixteenbits AND -32768 ;;; or AND 0x8000
After that, you would check the value of the result e.g. if sixteenbitA is 0, then bit 10 of word sixteenbits is 0; if sixteenbitA is non-zero, then bit 10 of word sixteenbits is 1.
 
If the Scada is Ignition, it doesn't natively read bits of words, but you can create them using UDTs in ignition.

Most other popular Scadas like Wonderware, iFix, FactoryTalk, etc can access bit of words using the correct delimiter and syntax. So as has been mentioned, what Scada are you using?
 
Trying to put it simply, each bit of a word is usually known as the base of 2
As already posted, bit 0 is decimal 1, bit 1 is decimal 2 bit 3 is decimal 4 so in effect the higher the bit the higher the number value so from bit 0 to 15 it goes
1,2,4,8,16,32,64,128,256,1024,2048,4096,8192,16384,32767, 65535
So if bits 1 & 3 are on that is 1+4 = 5
To extract there are many ways, in-built functions that convert the 16 bit number into individual boolean bits, you can build your own with a script or PLC ladder, it's just a matter of creating a loop, AND the word with 1 transfer that to a boolean bit, shift right the word by 1, loop back & do it again, do this a total of 15 times (16 but the first is no shift).
so your question does the decimal value change depending on which bits are on is yes the one thing you have to remember is that a 16 bit word can be represented as a signed word -32767 to +32767, an unsigned word is 0 to 65535 as the word is representing 16 boolean bits then it can be considered a unsigned word.
 

Similar Topics

Hi, First time poster, long time reader. I've got a mass flow controller device for controlling the flow of gas. It has a flowmeter and an...
Replies
4
Views
276
Hi Folks! Could I use the Studio 5000 to read/monitoring Stratix 5700 parameters? Like switch temperature for example
Replies
11
Views
375
Hola chicos. Tengo un problema con el driver de comucicacion dasabcip 5, y un plc controllogix v34, ya realice la comunicacion pero en ciertos...
Replies
2
Views
158
Wizards, It has been a few, but you all have always done me well. I have acquired a 1769-L33ER and want to use it as my collection PLC to...
Replies
5
Views
520
Hello All, is there any way to fetch remote controllers Mode Run/Remote Prog/Faulted etc. ( AB L8 Series) using CIP message, if yes please share...
Replies
5
Views
823
Back
Top Bottom