Array index within RSLogix 5000

Hi guys,
I have a question related same topic. But a little bit different.
I have 2 arrays. One of them is VALUES_TABLE [32,100] and real type. Another is COUNTER[32] and DINT type. Now, i want to use as VALUES_TABLE[0,COUNTER[0]]. But i'm getting verification error. Can someone explain how i can use an array element as index for another array?

You're right, it doesn't like it. The value of COUNTER[0] has to be copied to tag of DINT type and then used in the subscript.

MOV COUNTER[0] myDINT

MOV VALUES_TABLE[0, myDINT] myREAL

Capture.JPG
 

Similar Topics

I am using a function block that has a in/out parameter that is a structure. The structure has an array as one of the elements. I can index the...
Replies
1
Views
739
Sorry for the word salad title, I'm having trouble putting my problem into words. Basically I have two arrays of DINTs, both the same size...
Replies
29
Views
7,981
Hi, Unity has the option to index its arrays between any two numbers; e.g. "ARRAY[13..27] OF INT". I am writing a DFB which needs to take in a...
Replies
3
Views
2,387
I have a variable IDX that varies from 0-10, can I use the following: CONCAT ArrayStr[IDX] ArrayStr[5] Destination To write to a string...
Replies
1
Views
1,479
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
9,992
Back
Top Bottom