Indirect Addressing using a string for the tagname is possible!

JaxGTO

Member
Join Date
Apr 2009
Location
Kalieefornia
Posts
1,071
I remember a while back somebody asking about how to Indirect address a Logix tag using a string. It is possible. I just stumbled across this tech note:
https://rockwellautomation.custhelp.com/app/answers/detail/a_id/54960/page/1

Basically you do a MSG read of your own tag into a tag of the same type. I even tried it with a tag of a user defined type and it works. Even works in emulator (after an hour of getting emulator to run again). Just remember the path is "1,#". Where # is the slot your PLC is in.

Using this you could loop through tags like "M1" to "M75". Just build a string and punch it into the MSG block and read or write from/to the tags.
 

Similar Topics

So I have a problem that I am trying to overcome. I have X amount of motors (I'm trying to make the program scaleable). Let's say that a system...
Replies
5
Views
2,010
Hi, Im new to SCL, but decided to start learning it - if only to be able to do some simple jobs such as indirect addressing. got some simple...
Replies
3
Views
6,901
I've got a rung that uses the first pass bit to initiate a For argument. In the Routine named 'Alarm' I have something like this...
Replies
15
Views
9,980
Good day all. I think I've got it but please put me right if not. (More than likely). If I set up an integer (call it "array") with a non-zero...
Replies
15
Views
6,499
So far all the code i've written for PLC's has been simple ladder logic and I'm sure this will be simple once i know how. I have an s7-300 setup...
Replies
9
Views
13,849
Back
Top Bottom