Need help with array indexing maybe? Not sure of the name.

ekztal

Member
Join Date
Feb 2017
Location
Minnesota
Posts
4
Hello!

The equipment I'm working on uses a lot of indexed tags I guess you'd call them. I thought it was indirect addresses maybe but all the videos I've watched usually has a move statement to move data into the routine to set the values.

A lot of my routines just use indexed values and I have no idea how to troubleshoot them or follow the logic since viewing the data live doesn't actually show any values since the tags don't point to actual tags.

There's no MOV statements or anything in the routines. All the rungs look just like this:

tEjd1PP.png


I'm having trouble because I changed the logic so that the To_Product_Chute[13].Full_100 evaluations as true.


Sorter.Divert[13].Full isn't showing true but all the logic is indexed... I don't see anywhere where data is entered.
 
Last edited:
What PLC is this, a pointer in [] is indirect and index if you like, if this is passed via a function perhaps into a temp add above the rung you want to monitor insert a line of code that copies index to a dummy variable that way you should see what the value is, It does sometimes depend on the PLC & programming IDE as to wether you can monitor the pointer.
 
What PLC is this, a pointer in [] is indirect and index if you like, if this is passed via a function perhaps into a temp add above the rung you want to monitor insert a line of code that copies index to a dummy variable that way you should see what the value is, It does sometimes depend on the PLC & programming IDE as to wether you can monitor the pointer.




Sorry, I'm using Studio 5000 and it's a GuardLogix 5580.
 
It's referenced 14 times and I'm only in that subroutine. I'm unable to share the ACD.

I take that back. There is one FOR reference in the MAIN routine.
 
In the cross-reference list, look for a "Y" in the "Destructive" column. That's (usually) where the PLC is doing something to change the value of the tag.


If there aren't any destructive uses of the tag, then it's being written elsewhere. Maybe via MSG instruction from another PLC or from an HMI.
 
A FOR refference usually means that it is doing a loop similar the a basic instruction i.e.
For index := 0 to xx

Next
So it is probably indexing the index pointer from something to something.
However, if this is doing it in one scan you will not see all itterations of the values
 
I'm having trouble because I changed the logic so that the To_Product_Chute[13].Full_100 evaluations as true.


Sorter.Divert[13].Full isn't showing true but all the logic is indexed... I don't see anywhere where data is entered.

Note that the indirect reference in Sorter.Divert[Chute_Index].Full is Chute_Index, not Index.

Changing To_Product_Chute[13].Full_100 to be true will make Sorter.Divert[13].State.3 and Sorter.Divert[13].State.11 true when the logic runs, but the .Full bit will be set for whatever index Chute_Index is at the time, (probably) not 13.
 
As it does appear to be indexed in a loop (not sure as you have not posted even a bit of the code if a loop exists in one scan then you will probably only see the index value of the last one as in the code below

Index.png
 
I copied the 5 rungs with the [index] and changed them all to a chute number [13].


I was able to see the rung worked as intended. There must be more data that gets transferred from the other PLC that makes the chute show as full because I just shorted the rung with the Full photoeye that sends the data.


Tta5Q3u.png



And then my reconstructed rung works.
KZfqmgg.png



But it only shows in the system as full, stopping packages and flashing the full light, when the SS_CH[1].STS.FULL_100 bit is true also. So I'm going to look for other references for that in the messaging.


Also the default names were Chute_Index so they all would use [13]




EDIT:

I found another rung elsewhere controlled by SS_CH[1].STS.FULL_100 that controls the the rest of the functions. The other system was getting all the data it needed with the TO_SDX_CHUTE.


Thanks for talking it out with me guys.
 
Last edited:

Similar Topics

Hi all, One question - why doesn't this work? SIZE Storage[0] 0 StorageSize COP Zeros[0] Storage[0] StorageSize Storage and Zeros arrays...
Replies
9
Views
3,059
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
342
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
169
Good day all! Can someone help me with the procedure to update Beijers E700 firmware? The Panel I am working on is firmware 2.04v and I would...
Replies
1
Views
71
Back
Top Bottom