# Reading Bits from Int16 question

**URL:** <https://forum.inductiveautomation.com/t/reading-bits-from-int16-question/4392>\
**Category:** General Discussion\
**Created:** [May 1, 2012, 8:29pm UTC](https://forum.inductiveautomation.com/t/reading-bits-from-int16-question/4392 "2012-05-01T20:29:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cire3621](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@cire3621](https://forum.inductiveautomation.com/u/cire3621)\
**Post date:** [May 1, 2012, 8:29pm UTC](https://forum.inductiveautomation.com/t/reading-bits-from-int16-question/4392/1 "2012-05-01T20:29:10Z")

</div>

Rather simple question Im sure…but we always store our alarms in bits within data registers. So we are using 3 data registers which is 1200,1201,1202 in our PLC which modbus addressing is 1201,1202,1203 but I configured the offset in ignition so they would be the same…my question is, If bits 0-14 are each an alarm in register 1200, and bit 5 in register 1201, and bit 0 in register 1202 how exactly do I read them? I mean I know how to read a bit in a register, but does that mean I have to have register 1201 listed in my OPC tags 14 times since we are using the first 15 bits (0-14) in that register for an alarm and then go in and manually tell the path which bit to read in that register or is their a way to just put in if bit 0 on = this alarm, bit 1 is on = this alarm…etc…but since their is gaps where we are not using all the bits within a register for alarms sometimes only one bit in a register may be used before it skips to another register was not sure of best way of going about the bit reading…

---

<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:** [May 1, 2012, 8:41pm UTC](https://forum.inductiveautomation.com/t/reading-bits-from-int16-question/4392/2 "2012-05-01T20:41:50Z")

</div>

You’ll need a SQLTag for each bit, there’s no shortcuts. Hopefully this kind of thing will get better in a future update when we focus on revamping alerting.
