# Combining bits from DINTs to create Status Integers in Ignition

**URL:** <https://forum.inductiveautomation.com/t/combining-bits-from-dints-to-create-status-integers-in-ignition/86142>\
**Category:** Ignition\
**Created:** [February 21, 2024, 10:24pm UTC](https://forum.inductiveautomation.com/t/combining-bits-from-dints-to-create-status-integers-in-ignition/86142 "2024-02-21T22:24:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brians.laptop](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brians.laptop/32/27906_2.png) [@brians.laptop](https://forum.inductiveautomation.com/u/brians.laptop)\
**Post date:** [February 21, 2024, 10:24pm UTC](https://forum.inductiveautomation.com/t/combining-bits-from-dints-to-create-status-integers-in-ignition/86142/1 "2024-02-21T22:24:19Z")

</div>

I have an idea how to do something, but I don't know which path to explore to figure out how to accomplish it. Here is the idea:

I have 2 DINTs that have 32 Running, and Failed bits, from 32 devices. I'd like to combine the two in Ignition to use in a "Multi-State Indicator" (and avoid adding 32 Dints from the PLC with the combined value). Three states would be displayed: Failed, Running, Off.

I believe if a DINT is labeled "Running", I can access the individual bits by adding a period... i.e. Running.0. Is that correct?

Then I would create an integer in Ignition that had something like an "If" function...

If Failed.0, then Status = 2, elseif Running.0, then Status = 1, else Status = 0. (No idea of the syntax, or where to even enter it.)

I have no idea how to even look this up to figure it out. There may be an easier way to accomplish this, but I just don't have enough experience with Ignition to see it. I just don't want to add 32 DINTs from the PLC to make this happen. Can you at least point me in the right direction?

---

<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:** [February 21, 2024, 10:26pm UTC](https://forum.inductiveautomation.com/t/combining-bits-from-dints-to-create-status-integers-in-ignition/86142/2 "2024-02-21T22:26:21Z")

</div>

Supply each pair of bits to the [binEnc()](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/logic/binEnc) expression function. Yields 0, 1, 2, 3 for two booleans.

---

<div class="post-metadata">

**Author:** ![brians.laptop](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brians.laptop/32/27906_2.png) [@brians.laptop](https://forum.inductiveautomation.com/u/brians.laptop)\
**Post date:** [February 23, 2024, 4:35pm UTC](https://forum.inductiveautomation.com/t/combining-bits-from-dints-to-create-status-integers-in-ignition/86142/3 "2024-02-23T16:35:22Z")

</div>

I'm back at the customer's today, and I can't wait to try that out. That's going to be useful. Thank you so much.
