# Bit alarms off of Boolean array-S7-1500 OPC-UA

**URL:** <https://forum.inductiveautomation.com/t/bit-alarms-off-of-boolean-array-s7-1500-opc-ua/82981>\
**Category:** Ignition\
**Created:** [December 11, 2023, 3:42pm UTC](https://forum.inductiveautomation.com/t/bit-alarms-off-of-boolean-array-s7-1500-opc-ua/82981 "2023-12-11T15:42:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregory.sachs](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@gregory.sachs](https://forum.inductiveautomation.com/u/gregory.sachs)\
**Post date:** [December 11, 2023, 3:42pm UTC](https://forum.inductiveautomation.com/t/bit-alarms-off-of-boolean-array-s7-1500-opc-ua/82981/1 "2023-12-11T15:42:52Z")

</div>

I have a S7-1500 whiich has a datablock which is 1024 booleans, and each one represents a different alarm. I can pull the entire block in as an array, but the anticipated behavior of alarm on bit x does not work. It appears one needs to layer a UDT on top of the boolean array, which is fine for a 32 bit array, but not so fine for a 1024 bit array. Looking for ideas or suggestions about how to manage this. I'm using the S7 internal OPC-UA server, and it looks like I can access either the entire array OR any bit as a tag, but not readily assemble them into shorts.

Any ideas short of making a dummy datablock with 128 bytes that I copy the bit array into?  
Edit; similar idea with 32 bits:

> [@Bit (and bool) Array Alarming](https://forum.inductiveautomation.com/t/bit-and-bool-array-alarming/66668/5):
>
> Hi, If you are unable to import the tag as an integer, there are two approaches you could take. Create a tag in the PLC that can be imported as an integer if this isn't an option Create a UDT that allows you to reference individual bits of the Boolean array tag. Attached is the json for an example that should help you get past the current issue. Please note that this is very inefficient but will hopefully help you out. Copy the below into a txt file, name it whatever you wish with the .jso…

---

<div class="post-metadata">

**Author:** ![Bryson\_Prince](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bryson_prince/32/48866_2.png) [@Bryson\_Prince](https://forum.inductiveautomation.com/u/Bryson_Prince)\
**Post date:** [December 26, 2023, 11:38pm UTC](https://forum.inductiveautomation.com/t/bit-alarms-off-of-boolean-array-s7-1500-opc-ua/82981/2 "2023-12-26T23:38:25Z")

</div>

Hi Gregory,

Could you provide examples of the alarm configurations you are currently trying to use that aren't working? It will be easier for the forum community to help give suggestions if we know what exactly you need from the alarms.

---

<div class="post-metadata">

**Author:** ![gregory.sachs](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@gregory.sachs](https://forum.inductiveautomation.com/u/gregory.sachs)\
**Post date:** [December 27, 2023, 3:21pm UTC](https://forum.inductiveautomation.com/t/bit-alarms-off-of-boolean-array-s7-1500-opc-ua/82981/3 "2023-12-27T15:21:30Z")

</div>

Hi Bryson; in general:  
I can read the tag structure of Boolean[1024] from the s7-1500 OPC-UA server, call it "Alarms"  
If I know that Alarms[7] is control power off, I would think that setting an alarm on the array structure, bit 7, would function. Instead it seems like one needs to potentually set the alarm conditon on alarms[7], vs setting it on Alarms, bit 7.  
Does that distinction make sense? It is a question of if one needs to edit each bit in the arrary, or can edit the array itself.  
I'm away from the system until Jan 8, or would give better detail.  
I'm on 8.1.20 or so.

---

<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:** [December 27, 2023, 3:29pm UTC](https://forum.inductiveautomation.com/t/bit-alarms-off-of-boolean-array-s7-1500-opc-ua/82981/4 "2023-12-27T15:29:17Z")

</div>

The bit alarm condition targets a bit in a word; you have a boolean array, it's not the same thing.

---

<div class="post-metadata">

**Author:** ![gregory.sachs](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@gregory.sachs](https://forum.inductiveautomation.com/u/gregory.sachs)\
**Post date:** [December 27, 2023, 3:36pm UTC](https://forum.inductiveautomation.com/t/bit-alarms-off-of-boolean-array-s7-1500-opc-ua/82981/5 "2023-12-27T15:36:57Z")

</div>

Yes, understood, and I was posting hoping that others had seen this particular issue and solved it. I think I may just add a set of 32 32-bit double words to be able to do the bit level alarms, and mirror the bit array.
