RSLogix 500 Wildcard in instruction

tismon

Member
Join Date
Mar 2011
Location
Paducah, KY
Posts
3
The initial problem here is that I do not know the correct terminology for this to be able to properly search for the answer that I'm sure is already out there.

However, the end goal is this. I would like avoid creating a set of rungs for each die that will be used in a press. To do this, I'd like to have my die come into a word, say DIE_WORD that can have 1 through 1000 in it.

Well now, I need to translate that to the corresponding model number of that part. I've got all the models in the data table MODELS that match up with the die numbers. I'd like to call these in a move block so that the DIE_WORD can dictate which model in MODELS is looked at.

Here's an example:
Die cartridge number 81 is inserted and comes up as such in DIE_WORD
Well, in MODELS:81, the model number is 219

Code:
-----MOV-----------------------
| Move                        |
| Source     MODELS: DIE_WORD |
|                         219 |
| Dest          CURRENT_MODEL |
|                         219 |
-------------------------------

Is this possible? If so, I'm at a loss at how to do this and would greatly appreciate some guidance.

Thank you
 
Last edited:
This is called "indirect addressing" or "indirect array addressing".

What would be a "data table" in a PLC-5 or SLC-500 is called an "Array Tag" in ControlLogix. The syntax is that the array element is noted in square brackets:

MODELS[x], where the tag MODELS is defined as a DINT[1000] and the value of x can be from 0 to 999.

In most instructions, including MOV and COP, RSLogix 5000 allows you to use a constant value or another tag to designate the array element.

So if DIE_WORD is 20, then MODELS[DIE_WORD] equals whatever is stored in MODELS[20].

Arrays can actually be up to three dimensions in ControlLogix, and can be fairly large; off the top of my head I think you can create arrays up to 2 KB in size.
 
your title says RSLogix500 ... if that's correct, you'll want to look into INDIRECT ADDRESSING ... (there are differences between RSLogix500 and RSLogix5000) ...

but ...

the files in RSLogix500 are going to hit a limit at 256 locations – long before you reach the 1000 locations that you mentioned ...

so ... (if you really do need over 256 locations) ...

look into INDEXED ADDRESSING instead – and specifically into INDEX ACROSS DATA FILES ... more specifically, look at bit S:2/3 and how it can be used ...

is this enough to get you going – or do you need more details than that? ... just let us know ...






 
Last edited:
Thank you very much. That should be all that I need.
Searching for that came up with plenty of examples and the proverbial "duh" moment when I realize that I tried "" {} **, but not [] which is of course what I used quite a bit when I worked with C++.

And as a note, in this case there is only about 105 models, but I exaggerated this since this will come up again in a few near future projects as well.

As usual, this forum has provided more clear and quick answers than even AB can provide. Thank you again.
 

Similar Topics

Hi Everyone, I am not proficient in RSLogix 500 so I have a question regarding the evaluation of N7:0 data as an input. So as I understand in...
Replies
1
Views
81
I have a little bit of experience with Allen-Bradley. I have a Micrologix 1500 (RSLogix 500) and a PanelView Plus 7 (FactoryTalk View Studio ME)...
Replies
3
Views
159
buen dia. tengo una falla al pasar los tags de mi plc SLC 5 0/4 a mi panel me aparece un error Problem writing value " " to item <tag name>...
Replies
1
Views
81
Will someone please convert this logic to pdf?
Replies
2
Views
127
Hello, Haven't been on in a while. I need to generate a bit level pdf of the I/O for RSLogix 500. I can generate a report but it just shows the...
Replies
1
Views
158
Back
Top Bottom