# Accessing individual bits in controllogix

**URL:** <https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628>\
**Category:** Ignition\
**Created:** [September 11, 2018, 7:02pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628 "2018-09-11T19:02:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vince](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@Vince](https://forum.inductiveautomation.com/u/Vince)\
**Post date:** [September 11, 2018, 7:02pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628/1 "2018-09-11T19:02:45Z")

</div>

This thread is pretty old…

We are trying to use the notation “[Device,bit=1]Variable” in control logix. At first it seems to work but all thoses tags:  
“[Device,bit=0]Variable”  
“[Device,bit=1]Variable”  
“[Device,bit=2]Variable”

They all seems to adress the same bit (bit 0).

Any idea?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 11, 2018, 7:09pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628/2 "2018-09-11T19:09:24Z")

</div>

> [@How do I access individual Bits of a DINT?](https://forum.inductiveautomation.com/t/how-do-i-access-individual-bits-of-a-dint/1644/33):
>
> We are trying to use the notation "[Device,bit=1]Variable" in control logix.

I have never seen this syntax. Where did you find it? The OPC item address for a logix bit of a DINT is dot-bit number as a suffix. Like `[Device]Variable.0` or [`Device]Variable.31`.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 11, 2018, 7:35pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628/3 "2018-09-11T19:35:14Z")

</div>

> [@pturmel](#):
>
> I have never seen this syntax. Where did you find it?

Never mind. Top of the old topic. Never had to do that. /-:

---

<div class="post-metadata">

**Author:** ![elmer.pannell](https://avatars.discourse-cdn.com/v4/letter/e/a88e57/32.png) [@elmer.pannell](https://forum.inductiveautomation.com/u/elmer.pannell)\
**Post date:** [June 26, 2019, 1:37pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628/4 "2019-06-26T13:37:17Z")

</div>

I’m confused. Where did we land on this? Can we access individual bits of a DINT in controllogix for read and write?

I haven’t been able to get it to work.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 26, 2019, 1:40pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628/5 "2019-06-26T13:40:38Z")

</div>

Use the dot-number suffix syntax. Works for me.

---

<div class="post-metadata">

**Author:** ![elmer.pannell](https://avatars.discourse-cdn.com/v4/letter/e/a88e57/32.png) [@elmer.pannell](https://forum.inductiveautomation.com/u/elmer.pannell)\
**Post date:** [June 26, 2019, 2:14pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628/6 "2019-06-26T14:14:55Z")

</div>

I have a button script with:  
system.tag.writeSynchronous(“CLX064/IGN\_Bit\_Test.2”, 1, 5000)

I get this error:  
Tag property ‘2’ is not a valid property

What should the syntax be in this example?

---

<div class="post-metadata">

**Author:** ![elmer.pannell](https://avatars.discourse-cdn.com/v4/letter/e/a88e57/32.png) [@elmer.pannell](https://forum.inductiveautomation.com/u/elmer.pannell)\
**Post date:** [June 26, 2019, 2:23pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628/7 "2019-06-26T14:23:37Z")

</div>

Never mind. I figured it out. I had to set it up in the Tag Browser with the .2 as a boolean.

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 26, 2019, 3:40pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628/8 "2019-06-26T15:40:31Z")

</div>

You could have also used `system.opc.writeValue` (and the appropriate OPC Item Path), which will work even if you don’t have a tag set up for it in the Tag Browser.

---

<div class="post-metadata">

**Author:** ![elmer.pannell](https://avatars.discourse-cdn.com/v4/letter/e/a88e57/32.png) [@elmer.pannell](https://forum.inductiveautomation.com/u/elmer.pannell)\
**Post date:** [June 26, 2019, 3:43pm UTC](https://forum.inductiveautomation.com/t/accessing-individual-bits-in-controllogix/19628/9 "2019-06-26T15:43:40Z")

</div>

Thanks!  
I didn’t realize I could do that. That will help a lot.
