SLC translation of indirect addressing

junkerjorg

Member
Join Date
Nov 2007
Location
Wisconsin
Posts
56
I recently did a conversion from an SLC to a CompactLogix and I am having trouble with a specific piece of code where the SLC used indirect addressing at the word level. Trying to translate it the same way didn't work. I also tried creating a 2 dimensional array, but that's faulting the processor on execution. How would you guys translate the code in the attached image?

SLCsnip.png
 
Last edited:
If you run into any issue, feel free to ask for help. Before I saw your second post, I started to make an example program for you in RSLogix5000 as a demonstration.
 
If you run into any issue, feel free to ask for help. Before I saw your second post, I started to make an example program for you in RSLogix5000 as a demonstration.

Thank you! I'd still be interested in seeing your method if you care to share it? Right now I have a huge multi-dimensional array [200,210] that seems to be working. But if there is a better way, I'd love to try it.
 
Thank you! I'd still be interested in seeing your method if you care to share it? Right now I have a huge multi-dimensional array [200,210] that seems to be working. But if there is a better way, I'd love to try it.


200 x 210 ? Wow, that's a big array !

Do you really need to store 42,000 instances of your data ???

Perhaps a more complete explanation of your requirements, what you are trying to achieve etc., would help to evolve the best strategy....
 
So, the 2-dimensional array (a matrix, no?) was the solution I was going to suggest, as well.

I am assuming, first of all, that this is some sort of robot/palletizing application with the option of storing 50 different patterns (or what I will call recipes).

Now, it seems that if a recipe number of less than 51 (i.e., recipes 1 through 50), the data associated with that recipe will be loaded into a working set of data for the robot to use. I wonder what would happen if recipe 51 is selected (perhaps an alarm is triggered to represent the selection is out of range). I also see that the data that is moved resides in registers 1 through 199 of each N-table. Is the 0 register (i.e., N153:0) used for anything, such as storing a pertinent recipe identifier?

If you don't need to store anything in registers 200-255 and/or if you do not need more than 50 recipes, it may be worth "trimming the fat" and reducing your array to an Int[51,200] to save on data consumption in the PLC. I am not sure if it will make processing faster (in other words, reduce your scan time), as well, since the PLC wouldn't need to navigate through such a large table when this code is called. That would depend on how the PLC navigates the table to parse the requested information.

The thing that caught my eye is that the recipe pointer value didn't match what your code should have resulted in (153 was displayed, yet the math should have resulted in 103), so I am assuming this code resides in some sort of subroutine or section of code that was not being actively called and N20:99 is used in other parts of the code, hence the unexpected value.

So, you are probably fine with what you have, but if you would like to clean it up a bit, explore reducing the size of your 2-dimensional array. If you find that you need that amount of data for reasons not conveyed to us, then you should be good to go.

This was the example I had come up for you:

Example.PNG
 
Last edited:

Similar Topics

Hello, Please see the attached rungs of some sort of indexed sampling routine that is currently in a SLC500. I am tasked with migrating to a...
Replies
2
Views
1,272
I’m attempting to send a temperature from a SLC-5/02 to an EZiMarquee display. The vendor said to use a MSG instruction to send the data to the...
Replies
1
Views
47
Hello all. I have a few SLCs in my plant and of late we've seen a weird issue: The system will be running normally and then randomly the outputs...
Replies
2
Views
65
I am working on setting up a Prosoft Datalogger model PLX51-DLplus-232. This unit will be collecting data from a SLC 5/05 on the DB9 port set to...
Replies
3
Views
93
I have a redundant ControlLogix being set up. This program reads a value from a remote site which happens to be SLC PLC. Rockwell mentions SLC...
Replies
2
Views
91
Back
Top Bottom