9/13/2017 8:33 PM | |
Posts: 18 Rating: (0) |
Hi evrey one, I have to program an FB in STL, this one have an OUTPUT tag declared like below: My_array: ARRAY [0..4] OF WORD How can i use a tag instead of numerical value for indexing my array ? it's a kind of indirect indexing like in SCL: indice:=3; IF My_array [indice]>2 THEN ..... I read somewhere that in STL, index of array's can only be a constant tag i try lot of combination but nothing, if someone can help me on this point The fact is that i try to program a loop to reset all value in this array and i can't program like that on Step 7, it's not serious and not flexible, my array size can change: L 0 // Load 0 in ACCU1 T My_array [0] // Transfer 0 in the 1st line of My_array T My_array [1] // Transfer 0 in the 2nd line of My_array T My_array [2] // ................... T My_array [3] // ................... T My_array [4] // ................... Thanks in advance ------------------------------------------------------------------------------------------ |
Last edited by: Malcolm01 at: 9/14/2017 7:07:49 AMLast edited by: Jen_Moderator at: 9/14/2017 8:38:28 AMNew subject after splitting |
|
9/14/2017 9:50 AM | |
Posts: 18 Rating: (0) |
Hi Jacek, I think i get it. i will now play with pointer to move within my array with a dynamic indirect adressing Thanks for your help |
Follow us on