# Bit address optimization on siemens drivers?

**URL:** <https://forum.inductiveautomation.com/t/bit-address-optimization-on-siemens-drivers/10272>\
**Category:** Ignition\
**Created:** [July 24, 2015, 3:37pm UTC](https://forum.inductiveautomation.com/t/bit-address-optimization-on-siemens-drivers/10272 "2015-07-24T15:37:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdibenedetto](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pdibenedetto/32/6364_2.png) [@pdibenedetto](https://forum.inductiveautomation.com/u/pdibenedetto)\
**Post date:** [July 24, 2015, 3:37pm UTC](https://forum.inductiveautomation.com/t/bit-address-optimization-on-siemens-drivers/10272/1 "2015-07-24T15:37:41Z")

</div>

Suppose you have several booleans data on PLC. Which is better in terms of driver performance, considering that the PLC is a Siemens one and using the Ignitions Siemens driver’s:

1- Make one integer opc tag and make several expressions tags using getBit function for reading the bits and writing the bits using functions to make a mask to the integer tag.

2- Make severals boolean tags using bit addressing for reading and writing

The most preffered way of doing this thing from a desing point of view is 2, but my doubt is whether the driver programming contemplates obtaining a whole word if they try to read various bits of it, instead of getting each bit separately and if not, It should do this as described in 1, if you want to favor performance.

Thanks in advance.

Regards,

---

<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:** [July 24, 2015, 3:59pm UTC](https://forum.inductiveautomation.com/t/bit-address-optimization-on-siemens-drivers/10272/2 "2015-07-24T15:59:44Z")

</div>

When reading boolean/bit tags in the siemens driver (designated by ‘X’ data type) at minimum a whole byte will be read, or more if there are more booleans.

---

<div class="post-metadata">

**Author:** ![pdibenedetto](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pdibenedetto/32/6364_2.png) [@pdibenedetto](https://forum.inductiveautomation.com/u/pdibenedetto)\
**Post date:** [July 24, 2015, 4:11pm UTC](https://forum.inductiveautomation.com/t/bit-address-optimization-on-siemens-drivers/10272/3 "2015-07-24T16:11:00Z")

</div>

Ok. Thanks for the clarification, Kevin.  
Regards,

---

<div class="post-metadata">

**Author:** ![Philcr](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@Philcr](https://forum.inductiveautomation.com/u/Philcr)\
**Post date:** [August 14, 2017, 8:45pm UTC](https://forum.inductiveautomation.com/t/bit-address-optimization-on-siemens-drivers/10272/4 "2017-08-14T20:45:05Z")

</div>

Hi, you said a minimum of a whole byte will be read, does this mean there is an optimization done by the driver if multiple booleans are consecutive, or a whole byte will be read for each boolean?
