Hi all! it's possible to assign the single array position using in stand of array[1] the array[x]?
ex:
var1 array [0..15] of bool
SET
S var1[x] (in stand of var1[1]
what kind of variable should be "x"?
I tried but it seems no one kind of variable is accepted
Thanks
how to assign array[x] ? in Step 7 5.5
-
- Posts: 33
- Joined: Tue Jun 28, 2011 9:46 am
- Location: Padova (IT)
-
- Posts: 33
- Joined: Tue Jun 28, 2011 9:46 am
- Location: Padova (IT)
Re: how to assign array[x] ? in Step 7 5.5
I take a look for..no way, just with SCL is possible var1 where i=INT
-
- Posts: 17
- Joined: Fri Sep 24, 2010 10:03 pm
Re: how to assign array[x] ? in Step 7 5.5
Hi relay,
It is possible. Try something like this:
where VAR1 is an Array [0..15] Of Bool in the TEMP data section at Address 0.0 (I used an FC to test it).
It's just a short example written in a minute. Do you need more information?
Greet
Lepes9
It is possible. Try something like this:
Code: Select all
L W#16#0
T LW 0
LAR1 P##VAR1
L #VAR_X
+AR1
SET
= L [AR1,P#0.0]
It's just a short example written in a minute. Do you need more information?
Greet
Lepes9
-
- Posts: 33
- Joined: Tue Jun 28, 2011 9:46 am
- Location: Padova (IT)
Re: how to assign array[x] ? in Step 7 5.5
Tnx lepes9!