# Ignition and B&R automation

**URL:** <https://forum.inductiveautomation.com/t/ignition-and-b-r-automation/4611>\
**Category:** Ignition\
**Created:** [June 11, 2012, 2:27pm UTC](https://forum.inductiveautomation.com/t/ignition-and-b-r-automation/4611 "2012-06-11T14:27:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dylan](https://forum.inductiveautomation.com/u/dylan)\
**Post date:** [June 11, 2012, 2:27pm UTC](https://forum.inductiveautomation.com/t/ignition-and-b-r-automation/4611/1 "2012-06-11T14:27:32Z")

</div>

Hello,

I have to connect ignition to a B&R automation PLC (see [br-automation.com/](http://www.br-automation.com/)) with OPC DA. When I add array tag for example array of bool in B&R automation software, Ignition convert my array in a string tag. The string tag is like this : “{255, 0, 0, 255}” where 255 is true value and 0 false value.  
I can’t assign item of array to an object because ignition don’t accept an expression like {OPC/IO/array}[0]

Do you have a solution, or an explication ?

Thanks

P.S. : i’m french

---

<div class="post-metadata">

**Author:** ![Greg.Buehler](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Greg.Buehler](https://forum.inductiveautomation.com/u/Greg.Buehler)\
**Post date:** [June 12, 2012, 4:03pm UTC](https://forum.inductiveautomation.com/t/ignition-and-b-r-automation/4611/2 "2012-06-12T16:03:43Z")

</div>

Could you get the value as an integer and use the `getBit` expression function to either consume the integer directly or break it out into separate database expression tags?

> [@](#):
>
> // gets index 0  
> getBit({OPC/IO/array}, 0)
> 
> // gets index 1  
> getBit({OPC/IO/array}, 1)
> 
> // gets index 5  
> getBit({OPC/IO/array}, 5)

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [June 12, 2012, 5:16pm UTC](https://forum.inductiveautomation.com/t/ignition-and-b-r-automation/4611/3 "2012-06-12T17:16:10Z")

</div>

My solution for a similar problem was creating additional expression tags for the array elements. The expression used is:

```auto
split(
{[default]OPCArrayTag},"\\[|,|\\]"
)[1,0]
```

Split separates the single array elements, and the DataSet acces [x,0] then return the values.  
The array string in Ignition is surounded with brackets, which are also returned by split, so [0,0] will be the opening bracket and [1,0] is the first element, [2,0] the second element…  
I 'm not sure if Ignition evaluates 255 as true, so maybe you have to add a replace(xxx,“255”,“true”).

---

<div class="post-metadata">

**Author:** ![dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dylan](https://forum.inductiveautomation.com/u/dylan)\
**Post date:** [June 13, 2012, 7:30am UTC](https://forum.inductiveautomation.com/t/ignition-and-b-r-automation/4611/4 "2012-06-13T07:30:56Z")

</div>

I tested Chi’s solution and it’s working. So if you want to display an item of array as boolean,  
create a boolean expression tag with expression (example for item 5) :

```auto
replace(split({tagPath},"\\[|,|\\]")[6,0], "255", "true")
```

Thank you to you
