ControlLogix - Reference Bits within a Dint?

Hi all, I’m evaluating Ignition and have a question about it’s ability to directly reference bits within a DINT tag with in a PLC specifically for ControlLogix/CompactLogix systems.

For example:

PLC_DINT_Tag. So 32 possible bit references.

I use DINT tags for SCADA animations to reduce tag counts (for those SCADA products that use # of tags for licensing). So PLC_DINT_Tag may contain 32 various animations for SCADA within a single tag.

In another SCADA program, I could reference at the bit level by appending the bit reference to the tag within the SCADA program:

PLC_DINT_Tag.00 (bit 0)
PLC_DINT_Tag.01 (bit 1)
PLC_DINT_Tag.02 (bit 2)
.
.
.
PLC_DINT_Tag.031 (bit 31)

Can you achieve this same effect with Ignition? If so, what is the Syntax? I really don’t want to have to create separate tags for each bit within the DINT tag.

Thanks!

You’ve almost got it - just lose the leading zero and it should work.

Apparently I am missing the obvious…

I found a DINT tag in my PLC, browsed to it via the OPC browser, dragged it into my SQLTags folder. I now have a DINT (int4) tag called “Tagname” in my project.

When I try to bind this tag to the visibility property on a rectangle, the following works:

Expression: {Tagname} = 1

Great, I can change visibility based on an integer value.

When I try to directly reference a bit, I get an error. I choose the “tag” option to bind the visibility to “Tagname”, then change the tag to “Tagname.0” to reference bit 0 as a true/false. I get the following errors:

“Tag Property ‘0’ is not a valid property”

“You must choose a tag or tag property in the tree”.

Thinking there must be a way, I edited the “Tagname” OPC Item Path to be Tagname.0, now this works when I bind “Tagname” to the visibility property of the rectangle. However, this isn’t the desired function as “Tagname” is now just a bool as it is directly referenced to the .0 bit in “Tagname”, and can no longer access the other 31 bits unless I make specific tags for each of those bits.

What am I missing?

Ah, yeah, you’re not missing anything then.

For each bit you want to reference a tag has to exist. Not necessarily in the PLC, but definitely in SQLTags.

EDIT: Alternatively you can use the getBit() expression function if you’re trying to get the bit strictly in expressions. inductiveautomation.com/support/ … getbit.htm

it is posible to write/read bit reference directly //Control logix Tag

TestBitIgnition.0=1
TestBitIgnition.1=1
TestBitIgnition.2=1
TestBitIgnition.3=0
.
.
.
TestBitIgnition.31=0

[quote=“iakm19”]it is posible to write/read bit reference directly //Control logix Tag

TestBitIgnition.0=1
TestBitIgnition.1=1
TestBitIgnition.2=1
TestBitIgnition.3=0
.
.
.
TestBitIgnition.31=0[/quote]

In order to do this, you MUST specify a SQLTag in Ignition for each BIT you wish to reference You cannot do a bit reference like this on the Ignition SQLTag name, it as to be done at on the tag OPC path.