# Combining Tag information together

**URL:** <https://forum.inductiveautomation.com/t/combining-tag-information-together/87136>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 11, 2024, 3:25pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136 "2024-03-11T15:25:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack\_Wheatley](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Jack\_Wheatley](https://forum.inductiveautomation.com/u/Jack_Wheatley)\
**Post date:** [March 11, 2024, 3:25pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/1 "2024-03-11T15:25:06Z")

</div>

I have the condition of a pump represented using different tags. Some are boolean alarms, others are registers where the number indicates what the alarm is (G001\_State). I want all these tags to be represented in one tag (G001\_Total\_Status) by a number like it is with (G001\_State) . How do I do this?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/3/233f8ec5027f1ab76b30c6d87a3cbc7f3cca7ab3.png)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 11, 2024, 3:27pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/2 "2024-03-11T15:27:26Z")

</div>

Have a look at using an expression tag using `binEnc()`

> **[binEnc | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/logic/binEnc)**
>
> Takes a list of booleans and treats them like the bits in a binary number.

---

<div class="post-metadata">

**Author:** ![Jack\_Wheatley](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Jack\_Wheatley](https://forum.inductiveautomation.com/u/Jack_Wheatley)\
**Post date:** [March 11, 2024, 3:28pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/3 "2024-03-11T15:28:50Z")

</div>

Thanks I will take a look

---

<div class="post-metadata">

**Author:** ![Jack\_Wheatley](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Jack\_Wheatley](https://forum.inductiveautomation.com/u/Jack_Wheatley)\
**Post date:** [March 11, 2024, 3:51pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/4 "2024-03-11T15:51:58Z")

</div>

I have used the binEnc() expression on my boolean tags which has worked to get them as numbers. But I still have two different tags that have numbers representing alarms that i would like to group together. How would i do this?

E.g  
Tag1:  
0 - Motor running  
1 - Abnormal  
2 - Fault  
Tag2:  
0- Motor overheat  
1- Pressure alarm  
2- Vac Alarm

How do I get them combined in Tag 3 as the following:  
0 - Motor running  
1 - Abnormal  
2 - Fault  
3- Motor overheat  
4- Pressure alarm  
5- Vac Alarm

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 11, 2024, 4:03pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/5 "2024-03-11T16:03:06Z")

</div>

If they are all separate states:  
`Tag1 + (Tag2 + 3)`

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 11, 2024, 4:03pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/6 "2024-03-11T16:03:37Z")

</div>

_Why_ are you trying to combine these two things? You're **positive** that these states are mutually exclusive?

---

<div class="post-metadata">

**Author:** ![Jack\_Wheatley](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Jack\_Wheatley](https://forum.inductiveautomation.com/u/Jack_Wheatley)\
**Post date:** [March 11, 2024, 5:40pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/7 "2024-03-11T17:40:26Z")

</div>

I want to have a label that says the condition of the motor, and the only way I know of doing it is to have all the states under one tag. Unless its possible to have multiple bindings on one label?

I think a way around this may be to convert the other tag into separate Boolean tags for each alarm, and then use binEnc to add them together?

---

<div class="post-metadata">

**Author:** ![Cory.grube](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cory.grube/32/20476_2.png) [@Cory.grube](https://forum.inductiveautomation.com/u/Cory.grube)\
**Post date:** [March 11, 2024, 5:52pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/8 "2024-03-11T17:52:42Z")

</div>

Consider nesting your logic on the label binding, possibly through case/if statements. Since you're in perspective, binding transforms might help you as well. I think you'll find it to be much easier to work with (and troubleshoot/change later).

It'll be much easier to keep individual tags as booleans with their own alarms and reference them as needed in your view.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 11, 2024, 5:53pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/9 "2024-03-11T17:53:36Z")

</div>

> [@Jack\_Wheatley](#):
>
> Unless its possible to have multiple bindings on one label?

Use an Expression Structure. Then bind the label to the whole structure, you can use a transform to format it as needed.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 11, 2024, 7:01pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/10 "2024-03-11T19:01:21Z")

</div>

For what it's worth, I suggest NOT using 0 as a running state or as a fault status. eg:

```plaintext
0 - Off
1 - Running
2 - Abnormal
3 - Fault

```

or

```plaintext
0 - No fault
1 - Motor Overheat
2 - Pressure Alarm
3 - Vac Alarm

```

---

<div class="post-metadata">

**Author:** ![Jack\_Wheatley](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Jack\_Wheatley](https://forum.inductiveautomation.com/u/Jack_Wheatley)\
**Post date:** [March 11, 2024, 7:56pm UTC](https://forum.inductiveautomation.com/t/combining-tag-information-together/87136/11 "2024-03-11T19:56:32Z")

</div>

Thanks, I will do this if its not good practice
