# Rockwell Logix5000 Booleans Reading as Array

**URL:** <https://forum.inductiveautomation.com/t/rockwell-logix5000-booleans-reading-as-array/114317>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [March 4, 2026, 3:44pm UTC](https://forum.inductiveautomation.com/t/rockwell-logix5000-booleans-reading-as-array/114317 "2026-03-04T15:44:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![automator591](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@automator591](https://forum.inductiveautomation.com/u/automator591)\
**Post date:** [March 4, 2026, 3:44pm UTC](https://forum.inductiveautomation.com/t/rockwell-logix5000-booleans-reading-as-array/114317/1 "2026-03-04T15:44:39Z")

</div>

I am interfacing with existing Logix5000 programs and am trying to toggle a Boolean value with a button in perspective. The tag is built into the script, as it will differ depending on other factors, but that is working. I read in the tag and, at first, did a “not”, which did not work. I then did an if for 0 and 1, but that did not work. For testing, I displayed the value in a label, which turns the text property from a value to an array.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/d/dd9d14c103d1de0f83ce2189b573860e7aad0321.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/a/0af73a740b07485a25c818d7aaa4615a82008fb2.png)

---

<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:** [March 4, 2026, 3:52pm UTC](https://forum.inductiveautomation.com/t/rockwell-logix5000-booleans-reading-as-array/114317/2 "2026-03-04T15:52:34Z")

</div>

Boolean arrays are represented internally in the controller as DINT (DWORD?) arrays, 32 booleans per element, and unfortunately this is how the driver represents them as well.

There isn't actually any metadata available that tells us whether it's supposed to be a DINT array or a bool array, and for whatever historical reason we ended up just passing it on as DINT array and now we're a little stuck with it.

---

<div class="post-metadata">

**Author:** ![automator591](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@automator591](https://forum.inductiveautomation.com/u/automator591)\
**Post date:** [March 4, 2026, 4:57pm UTC](https://forum.inductiveautomation.com/t/rockwell-logix5000-booleans-reading-as-array/114317/3 "2026-03-04T16:57:55Z")

</div>

How do I handle this? Also, it isn’t a Boolean array, just a Boolean tag.

---

<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:** [March 4, 2026, 5:00pm UTC](https://forum.inductiveautomation.com/t/rockwell-logix5000-booleans-reading-as-array/114317/4 "2026-03-04T17:00:10Z")

</div>

oh I totally misread this.

You're just not handling the fact that `system.tag.readBlocking` accepts and returns an _array_ of values; you need to dereference the element you want, e.g.

```python
tagState = system.tag.readBlocking(tagToChange)[0]

```

though you may actually want

```python
tagState = system.tag.readBlocking(tagToChange)[0].value

```

because the `readBlocking` gives you `QualifiedValue` objects.

---

<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:** [March 4, 2026, 5:04pm UTC](https://forum.inductiveautomation.com/t/rockwell-logix5000-booleans-reading-as-array/114317/5 "2026-03-04T17:04:53Z")

</div>

> [@Kevin.Herron](#):
>
> returns an _array_ of values

All of the non-deprecated tag read/write system calls expect arrays of tag paths, arrays of values (for writes) and deliver arrays of results (QVs for reads, quality codes for writes).

Some functions will accept non-arrays arguments for ease of conversions. (But are not documented to do so, and you should follow the docs as much as practical.)

---

<div class="post-metadata">

**Author:** ![automator591](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@automator591](https://forum.inductiveautomation.com/u/automator591)\
**Post date:** [March 4, 2026, 5:06pm UTC](https://forum.inductiveautomation.com/t/rockwell-logix5000-booleans-reading-as-array/114317/6 "2026-03-04T17:06:47Z")

</div>

That worked! Thank you
