ExRAGuyFromDetroit
Member
Hello, I am new to Siemens programming. I have been an Allen-Bradley guy for years (20+). I am struggling to understand some of the language barriers / syntax. I am looking for a way to symbolicly address a pointer.
DB1 = Array[1..100] OF Int
I want to fill the Array with Numbers. For ease lets say 1-100
Ok, DB1 is call TestDB and the Array of INTs is myValues
So I can access the first position of the Array and fill it with a value of 1 like so...
L 1
T "TestDB".myValues[1]
But I really want to be able to Index the Array Pointer...
L 1
T myCounterValue
LP01: T #Loop
L myCounterValue
T "TestDB".myValues[myCounterValue]
+MyCounterValue
L #Loop
LOOP LP01
Is there a way of doing this except for knowing the Byte Offset?
Any help is greatly appreciated.
DB1 = Array[1..100] OF Int
I want to fill the Array with Numbers. For ease lets say 1-100
Ok, DB1 is call TestDB and the Array of INTs is myValues
So I can access the first position of the Array and fill it with a value of 1 like so...
L 1
T "TestDB".myValues[1]
But I really want to be able to Index the Array Pointer...
L 1
T myCounterValue
LP01: T #Loop
L myCounterValue
T "TestDB".myValues[myCounterValue]
+MyCounterValue
L #Loop
LOOP LP01
Is there a way of doing this except for knowing the Byte Offset?
Any help is greatly appreciated.