Indirect addressing in Step 7

Colin158

Guest
C
Does anyone know how I can indirectly address data in a datablock in step 7?
EG. I have a DB containing multiple 'records'. I would like to write a function that would take an integer as an input, I would then like to use this input as an index to the dataword. I don't know the exact syntax but the pseudocode is:

L DBW[#index]
T MW300

I plan to do this in ladder but illustrating a move in STL is easier

Thanks
 
Colin158 said:
Does
I plan to do this in ladder but illustrating a move in STL is easier

Thanks

This is sad, but I feel the same way. I have and example program on my website S7 STL, Profibus demo with lots of indirect address.

I am sure there are places where a data block gets passed to a function and the open data block instruction is used to access the datablock.
 

Similar Topics

Need the explaination of the code given below... Wgy not adding more than 8 real values.... L P##Measuring_values //Address of...
Replies
3
Views
2,091
I get a weekly email from Siemens Tech Support. It has Tech notes updates etc. This week they have the following example of indirect addressing...
Replies
0
Views
2,454
I am trying to modify an assembly machine that is capable of making several part types. I am adding an lvdt and want to be able to store different...
Replies
28
Views
15,829
Howdy folks, I am an Allen Bradley guy currently living in an Emerson world. Working with Rx3i on PacSystems Machine Edition v. 9.6? i think...
Replies
3
Views
625
Hello, I'm very new to programming with absolutely zero schooling in this field and pretty hands off training in my new role, it's been fun...
Replies
4
Views
670
Back
Top Bottom