Indirect Addressing an Array with another Array Element in Studio 5000

After looking into this for a while I couldn't find much information about this so I am curious if this is possible or not.

I am trying to use indirect addressing to scan a single dim. array with another array element. So array and pointer[X].Num with Pointer[X].Num being a dint data type. Written together would be array[Pointer[0].Num]. This works with the Pointer not being an array element so array[Pointer.Num] but when it is I get an Invalid array subscript specifier error.

Not sure if this is a syntax issue on my part or just not possible in studio 5000. Any information would be helpful,

Thanks
 
You can also do it with an Alias if I recall
MyAlias for array[2]
then OtherArray[MyAlias]
works from memory but it's been a while since I've needed to do it.
 

Similar Topics

I'm creating an FB with a variable input and I would like to copy all of the bits to an array (declared as temp) I've declared the array in TEMP...
8
Replies
4,393
Views
Hi Guys, I have an int array of 500 elements and would like to display them on a panel view plus 6. Now I can't make 500 numerical displays, so I...
2
Replies
3,512
Views
I've got a rung that uses the first pass bit to initiate a For argument. In the Routine named 'Alarm' I have something like this...
15
Replies
14,294
Views
Hi guys, Is it possible to decalre a variable then use it on Arry such as: In DB100, I decalred an array as Array1 is Array[1..100] of UDT1...
3
Replies
7,305
Views
how is the example indirect address done in RSLOGIX5000 for Contrologix ver 20 B90[N32:13] Thanks for any input
39
Replies
1,525
Views
Top