S7 Indirect Addressing of Array

douyi

Member
Join Date
Aug 2005
Location
Toronto
Posts
123
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

Then, in the FC I want to pass by an array index number and then use like

Array1[Index_Number].xxx

I tried directly and AR1, seems doesn't work. If this way doesn't work, I have to calculate start address of each element of the array and it's more complex.

Is there any better idea on that?

Thanks a lot.
 
Thanks Martin, I checked your topic.

Is that means I have to do it in SCL or I can only use numbers in array?
 

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...
Replies
8
Views
3,461
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...
Replies
2
Views
2,811
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...
Replies
15
Views
10,160
Howdy folks, I am an Allen Bradley guy currently living in an Emerson world. Working with Rx3i on PacSystems Machine Edition v. 9.6? i think...
Replies
3
Views
644
Hello, I'm very new to programming with absolutely zero schooling in this field and pretty hands off training in my new role, it's been fun...
Replies
4
Views
681
Back
Top Bottom