# Not able to set/reset individual bits of an Integer tag

**URL:** <https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633>\
**Category:** Ignition\
**Tags:** ignition78\
**Created:** [November 4, 2019, 7:18am UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633 "2019-11-04T07:18:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [November 4, 2019, 7:18am UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633/1 "2019-11-04T07:18:31Z")

</div>

How to set Individual bits of an Integer tag in Ignition?  
Integer tag is defined in s7-1500 PLC, which we can browse through OPC sever.

---

<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:** [November 4, 2019, 4:11pm UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633/2 "2019-11-04T16:11:23Z")

</div>

> [@Rameshwar.kuthale](#):
>
> which we can browse through OPC sever.

Does this mean you're connected directly to the OPC UA server built in to the S7-1500 and not using Ignition's Siemens driver?

---

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [November 5, 2019, 5:36am UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633/3 "2019-11-05T05:36:29Z")

</div>

@Kevin.Herron  
In Ignition OPC-UA server,  
we added new device  
s7-1500, and assigned host ip address.

In Ignition OPC Connections ,  
Created new OPC Server Connections.

We are able browse OPC server in ingnition.  
All tags we can see in ignition Project, which are defined in plc.

for example I have one integer tag which is defined in plc, which we can browse in ignition too,  
I have 31 buttons on screen,  
I want to use single bits of integer tag to to make these 31 buttons on/off.  
My problem is iam unable to set or reset individual bits of integer tag for 31 buttons.

.

---

<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:** [November 5, 2019, 11:42am UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633/4 "2019-11-05T11:42:52Z")

</div>

Since this tag is coming from an OPC server whether or not you can address its individual bits and what that syntax is depends entirely on the server. Ideally, the server would expose a boolean Node for each bit.

Some servers let you append syntax such as `.0` or `.1` to the end of the NodeId (OPC Item Path in Ignition) to address bit 0 or bit 1. I don’t think the server in the S7-1500 supports this but it’s verifying.

---

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [November 12, 2019, 8:42am UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633/6 "2019-11-12T08:42:57Z")

</div>

@Kevin.Herron  
Thank you.  
Regardless of tags if they are coming from OPC server or not, we can address individual bits and what that syntax is depends entirely on the server,its absolutely true.  
my concern is, suppose I have one tag DB1.DBD0,which is defined in S7-1500 ,and this tag we can browse in ignition through OPC,if I want to point 31th bit of that tag how can I do it in ignition, I want to set/reset 31th bit of that tag, Can you send me syntax for this.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 12, 2019, 11:46am UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633/7 "2019-11-12T11:46:25Z")

</div>

Have you tried the .0 or .1 example that Kevin posted?

```nohighlight
DB1.DBD0.0
DB1.DBD0.1
DB1.DBD0.31

```

---

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [November 13, 2019, 6:18am UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633/8 "2019-11-13T06:18:49Z")

</div>

Thanks for information. _ **I have one question, to set individual bits of integer tag, is it necessary to define OPC Item Path in ignition** ,_ after we are able to browse that integer tag which is defined in plc(S7-1500) in ignition through OPC server??

---

<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:** [November 13, 2019, 2:06pm UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633/9 "2019-11-13T14:06:18Z")

</div>

Yes, you will need separate item paths for each bit. Changing individual bits in a word requires a read-modify-write operation, which can only be done race-free by the target device itself. Some devices don’t support this at all, unfortunately (usually old modbus stuff).

---

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [November 22, 2019, 9:04am UTC](https://forum.inductiveautomation.com/t/not-able-to-set-reset-individual-bits-of-an-integer-tag/29633/10 "2019-11-22T09:04:18Z")

</div>

@pturmel  
Thank you.
