rslogix 500 data table

syd_b

Member
Join Date
Apr 2010
Location
mex
Posts
25
hi, i want to do a data table or something like that,
i want to save data for example 10 diferent values and then call value number 8 or 5 whenever i want

its posible to do this?
 
Greetins SYD_B and welcome to the forum.

What you are asking about is called indirect addressing.

An indirect address looks like this: N10:[N7:0]

It means that what ever value is stored in N7:0 is substituted into the address. So if N7:0 has a value of 8 then N10:[N7:0] is address N10:8. If N7:0 has a value of 5 stored in it then N10:[N7:0] is the address N10:5.

Other examples of indirect address are
N[N7:0]:[N7:1]
B3:0/[N7:2]
T4:[N7:4]/DN
 
thanks for help,

i want to do something like this, then read position 0 or position etc.
position value
0 8
1 15
2 3
3 20
4 2
5 2
i can do this with iindirect addressig.

also its the same indirect addressig and indexed addressing?

Is there any example to check this, i´m using rslogix500 and the plc`s are slc500 5/04 and micrologix1000.
 
Last edited:
The Micrologix 1000 will be limited in this application because you cannot create your own data tables. But in the 5/04 while offline right click on 'Data Files' and select 'new'. In the box if you wish you can change the file number to any free number. Set the type to the type of data, you showed integer, and set 'elements' to the number of addressable pieces of data you want. You can go up to 256.

Set one of the N7 registers as your indirect pointer, the selector. Let's say you created file N10 and are using N7:0 as your pointer. In your program you can access element 5 of this new file by setting '5' into N7:0 and using the form N10:[N7:0]. This can be used either for changing a table entry or for retrieving it. Of course if you wished at some point in your program you wanted to access the same file element each time then simply address that element, e.g. N10:5.
 
In addition to the limitation Bernie mentioned of not being able to add data files, the ML1000 also does not support indirect addressing. It does do indexed addressing if you are careful about it and/or there is a trick that could be done with an SQO instruction.

If you have only a relatively small number of words, eg, 10 or less and you want to maintain some similarity between the ML1000 and SLC5/04 programs then perhaps a brute force approach will be best, eg, ten rungs with ten comparisons and ten moves.
 
thanks a lot it help me a lot

as i understand the slc example is just to read indirect addressing or i`m wrong

but now, how can i write indirect addresing?
 
Last edited:

Indirect read
----+-MOV---------------+-
| Source N10:[N7:0]|
| Dest N7:1|
+-------------------+

Indirect write
----+-MOV---------------+-
| Source N7:1|
| Dest N10:[N7:0]|
+-------------------+


Indexed Read
---+--+-MOV---------------+-
| | Source N7:0|
| | Dest S:24|
| +-------------------+
|
|
+---+-MOV---------------+-
| Source #N10:0|
| Dest N7:1|
+-------------------+

indexed write
---+--+-MOV---------------+-
| | Source N7:0|
| | Dest S:24|
| +-------------------+
|
|
+---+-MOV---------------+-
| Source N7:1|
| Dest #N10:0|
+-------------------+


 
you have solved my problem, thanks.

but i have another question can i save two different values in one indirest address or in some other way.
position-value1-value2
0 - 5 - 10
1 - 8 - 6
etc.

it´s posible to do this, to write and read something like that
 
If I have multiple values associated with one index I create multiple tables then store the relevant information in the same relative position in each one.

For indirect stored in N7:0 and 3 arguments create three tables, for example N20, N21 and N22

Argument 1 -> N20:[N7:0]
Argument 2 -> N21:[N7:0]
Argument 3 -> N22:[N7:0]
 
Last edited:
One way to save and address different values, such as for a recipe, is to use multiple files.

For example, a step time can be stored in N10, a setpoint can be stored in N11, and process flags might be in B12. In this case a counter might be used to designate what step the process is in.

N10:[C5:0.ACC]
N11:[C5:0.ACC]
B12:[C5:0.ACC]/0

Edit: Drat! Bernie beat me to it again. 🍺
 

Similar Topics

Hi. I'm doing an upgrade of an old 1400e to a new panel view plus 7 standard using ftv studio v 12,which will be communicating to a slc 5/04 via...
Replies
15
Views
2,646
I have a micrologix 1100 that I am trying to read three data points from it on my safety plc using studio 5000. Any tips or guidance is appreciated.
Replies
4
Views
858
I stumbled onto this behavior the other day, then went looking for old forum posts with the assumption that "there is nothing new under the...
Replies
0
Views
786
Hello All, I am working on converting a program written in RSLogix 500 to Connected Components Workbench. The MicroLogix to Micro800 converter...
Replies
1
Views
1,214
I'm working with a customer to copy one of the machines they designed in-house several years ago. The previous PLC programmer had a thing for...
Replies
8
Views
2,095
Back
Top Bottom