# Accessing word tag bit

**URL:** <https://forum.inductiveautomation.com/t/accessing-word-tag-bit/89598>\
**Category:** Ignition\
**Created:** [April 28, 2024, 7:24pm UTC](https://forum.inductiveautomation.com/t/accessing-word-tag-bit/89598 "2024-04-28T19:24:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Etienne\_Delage](https://avatars.discourse-cdn.com/v4/letter/e/43a26b/32.png) [@Etienne\_Delage](https://forum.inductiveautomation.com/u/Etienne_Delage)\
**Post date:** [April 28, 2024, 7:24pm UTC](https://forum.inductiveautomation.com/t/accessing-word-tag-bit/89598/1 "2024-04-28T19:24:15Z")

</div>

PLEASE PLEASE, give us a easy way to acces a bit from a word. Right now its very very cancerous having to go through getbit and other function. Why cant we just use tag.'bit number' WHY?????

by the way we cannot either address bit via OPC UA the way we use to. blablabla.tag.`bit number'. the blablabla.tag still work but as soon we add the .'bit number' it fail.  
([https://www.se.com/ca/en/faqs/FAQ000235288/](https://www.se.com/ca/en/faqs/FAQ000235288/))

PLEASE FIX this is ridiculous!

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 28, 2024, 8:26pm UTC](https://forum.inductiveautomation.com/t/accessing-word-tag-bit/89598/2 "2024-04-28T20:26:52Z")

</div>

What makes you think this is an Ignition problem?

---

<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:** [April 28, 2024, 8:40pm UTC](https://forum.inductiveautomation.com/t/accessing-word-tag-bit/89598/3 "2024-04-28T20:40:52Z")

</div>

Discussed a little bit starting here: [How to use individual bit of a word tag - #8 by Etienne\_Delage](https://forum.inductiveautomation.com/t/how-to-use-individual-bit-of-a-word-tag/10081/8)

---

<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:** [April 28, 2024, 8:45pm UTC](https://forum.inductiveautomation.com/t/accessing-word-tag-bit/89598/4 "2024-04-28T20:45:48Z")

</div>

It would be a little easier if Ignition supported a Tag Path syntax that allowed you to append `.Bit` to the end of an otherwise valid path, because then if e.g. you wanted a bit tag derived from an integer tag you would just need a reference tag and not a derived tag with getBit/setBit expressions.

The problem is `.Whatever` is already reserved syntax in a Tag Path for accessing tag properties. I do wonder if we could make it work by treating the bits as if they were dynamic properties or something... not really sure how messy it would get.

---

<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:** [April 28, 2024, 9:15pm UTC](https://forum.inductiveautomation.com/t/accessing-word-tag-bit/89598/5 "2024-04-28T21:15:38Z")

</div>

> [@Kevin.Herron](#):
>
> how messy it would get.

I made the jython wrappers for CIP integer/word types accept `._n` where `n` is the bit number. The underscore to have an attribute name that didn't start with a digit--a requirement for jython. Possibly an approach you could use.

{Doesn't fix races when writing, though, unless a driver supports it.}

---

<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:** [April 28, 2024, 9:22pm UTC](https://forum.inductiveautomation.com/t/accessing-word-tag-bit/89598/6 "2024-04-28T21:22:27Z")

</div>

Bit syntax in Tag Paths would not only hide the race condition but also the race condition would always be possible even if the underlying server of the underlying OPC tag supported it. Not ideal.
