What I need to do is be able via code suitable for S70-315DP ( STL, LAD etc) to store a base address eg PIW 216 and then read the next 8 addresses eg PIW 216 , PIW 220, PIW224 ... PIW 232 using some sort of for next loop.
If this was written in VB/Delphi (high level language it may look like
base = 216
j = 0
for i = 0 to 7
// Build Up Read Address eg PIW 216 or PIW 218 etc.
Address = "PIW" + BASE + J
// read value from Address
Val = Read ( Address)
//Increment Counter
J = J + 4
next i
Result of this block would end up with an array filled with the valves read in from the PIW addresses.
I have tried to define a "pointer" and add p#PIW216 but it won't take this. banghead Alternately If I could store the addresses in a Datablock and read eg DB1.Firstaddress then use that to read to PIW.
I need this functionality from both PIW and PQW areas of memory.
Andy
If this was written in VB/Delphi (high level language it may look like
base = 216
j = 0
for i = 0 to 7
// Build Up Read Address eg PIW 216 or PIW 218 etc.
Address = "PIW" + BASE + J
// read value from Address
Val = Read ( Address)
//Increment Counter
J = J + 4
next i
Result of this block would end up with an array filled with the valves read in from the PIW addresses.
I have tried to define a "pointer" and add p#PIW216 but it won't take this. banghead Alternately If I could store the addresses in a Datablock and read eg DB1.Firstaddress then use that to read to PIW.
I need this functionality from both PIW and PQW areas of memory.
Andy