# Tag Arrays

**URL:** <https://forum.inductiveautomation.com/t/tag-arrays/11078>\
**Category:** Ignition\
**Created:** [January 20, 2016, 9:26pm UTC](https://forum.inductiveautomation.com/t/tag-arrays/11078 "2016-01-20T21:26:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![r\_beall](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@r\_beall](https://forum.inductiveautomation.com/u/r_beall)\
**Post date:** [January 20, 2016, 9:26pm UTC](https://forum.inductiveautomation.com/t/tag-arrays/11078/1 "2016-01-20T21:26:10Z")

</div>

I’m trying to get a specific index value from a tag array.

From reading, this would be done by saying ‘OPCPATH[0].[INDEX HERE]’ However, this isn’t working in this case. I’ve tried it with and without brackets around the index.

I can pull back the array of ‘OPCPATH[0]’ and I can see all 32 indices and their values (in the values drill down), but I can’t create a tag from that full path.

Can’t figure out what I’m doing wrong.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [January 20, 2016, 9:51pm UTC](https://forum.inductiveautomation.com/t/tag-arrays/11078/2 "2016-01-20T21:51:17Z")

</div>

not sure what PLC you use but, what happens if you drag one from the OPC browser to the Tag tree?  
Check the path of one that you drag and drop.

---

<div class="post-metadata">

**Author:** ![r\_beall](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@r\_beall](https://forum.inductiveautomation.com/u/r_beall)\
**Post date:** [January 20, 2016, 9:59pm UTC](https://forum.inductiveautomation.com/t/tag-arrays/11078/3 "2016-01-20T21:59:47Z")

</div>

When I pull it over, it thinks the main array is a string (and I can’t see those values). I actually have to change the data type to String Array.

One thing I noticed is that if I leave it a string, when one of the values changes inside the array, it seems display that value.

In one specific case it showed the value of 128, this was in the 7th place of the 4th array (there’s tons of arrays of data). Does that mean anything to anyone?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [January 20, 2016, 10:23pm UTC](https://forum.inductiveautomation.com/t/tag-arrays/11078/4 "2016-01-20T22:23:07Z")

</div>

So they are arrays of arrays?  
If so you will have to have both arrays in the path  
for example, we have an array called ShiftRpt with each one having an array inside it called TTL  
So for us to create a tag for a point in TTL the path looks like this  
Where [WM1] is the PLC connection.

ns=1;s=[WM1]ShiftRpt[0].TTL[0]  
ns=1;s=[WM1]ShiftRpt[0].TTL[1]  
ns=1;s=[WM1]ShiftRpt[0].TTL[2]

ns=1;s=[WM1]ShiftRpt[1].TTL[0]  
ns=1;s=[WM1]ShiftRpt[1].TTL[1]  
ns=1;s=[WM1]ShiftRpt[1].TTL[2]

etc.

---

<div class="post-metadata">

**Author:** ![r\_beall](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@r\_beall](https://forum.inductiveautomation.com/u/r_beall)\
**Post date:** [January 20, 2016, 10:57pm UTC](https://forum.inductiveautomation.com/t/tag-arrays/11078/5 "2016-01-20T22:57:41Z")

</div>

[quote=“MMaynardUSG”]So they are arrays of arrays?  
If so you will have to have both arrays in the path  
for example, we have an array called ShiftRpt with each one having an array inside it called TTL  
So for us to create a tag for a point in TTL the path looks like this  
Where [WM1] is the PLC connection.

ns=1;s=[WM1]ShiftRpt[0].TTL[0]  
ns=1;s=[WM1]ShiftRpt[0].TTL[1]  
ns=1;s=[WM1]ShiftRpt[0].TTL[2]

ns=1;s=[WM1]ShiftRpt[1].TTL[0]  
ns=1;s=[WM1]ShiftRpt[1].TTL[1]  
ns=1;s=[WM1]ShiftRpt[1].TTL[2]

etc.[/quote]

From my understanding they are essentially Arrays of Arrays but it doesn’t make any sense, because the main array has 177 slots, with 8 sub arrays (that I can see in the PLC) with 32 slots each. When I tried the full path like you showed, it still didn’t work.

I’m using a beckhoff PLC and I’m not familiar with these at all. The programmer of the PLC is in Sweden so communication is not easy.

He sent me a list of downtime reasons and their PLC addresses e.g. ‘arrAlarmBreaker[2].1’ == “Some Downtime Reason”. When I look in the PLC I see a structure like so.

arrAlarmBreaker \<-- Main Array  
–\>arrAlarmBreaker[1] \<–Array inside main array  
–\>arrAlarmBreaker[2] \<–Array inside main array  
etc.

When I pull in the first arrAlarmBreaker I see an array of 177 slots. I can drill down into and it gives me 8 more arrays, they each have 32 slots.

Confusing, I know.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [January 21, 2016, 1:14pm UTC](https://forum.inductiveautomation.com/t/tag-arrays/11078/6 "2016-01-21T13:14:54Z")

</div>

I’m not at all familiar with that PLC sorry.  
From looking online at some notes it seems you have to configure each tag you want to use with OPC in the system itself?

Hopefully someone else here has some ideas though.

---

<div class="post-metadata">

**Author:** ![r\_beall](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@r\_beall](https://forum.inductiveautomation.com/u/r_beall)\
**Post date:** [January 21, 2016, 3:38pm UTC](https://forum.inductiveautomation.com/t/tag-arrays/11078/7 "2016-01-21T15:38:29Z")

</div>

No worries, I appreciate it, it’s my first time dealing with this type too.

It’s a weird PLC structure, I had to supply my own OPC UA on the PLC side just to get it talking.

For anyone else, the Manufacturer said that each one is an ARRAY OF WORD and that array[1].0 represents the first bit in the array. Not quite sure what that means…

FYI, I’m not a PLC guy, so I’m not quite sure what I’m supposed to do to handle the bit manipulation.
