Tag Arrays

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.

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.

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?

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=“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.

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.

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.