RSLogix 500 MOV question

RBergmann

Member
Join Date
Jun 2002
Location
California
Posts
258
I've done a few AB projects, but have not seen either of the following in a MOV instruction (I can't figure how to take a "snippet" and insert). I can make a guess but maybe there's more to this.

MOV
Source N22:[N7:8]
<25
Dest N22:118
<0

C:\Users\rbergmann\Desktop\Capture1.GIF
capture1.jpg
or
C:\Users\rbergmann\Desktop\Capture2.GIF

MOV
Source N24:118
0
Dest N24:[N7:9]
<0

With bracketed addresses. The samples are not concurrent, I just grabbed random examples.
 
Those are indirect addresses. So in the first example, the source of the move will be from the TABLE N22, and the word from that table will be determined by the value of N7:8.

So if N7:8's value is = 1 when that rung is scanned, it will use the source N22:1 and move the value to N22:118. As the value of N7:8 changes, so will the source address in the N22 table.

Same for the destination in the second example.
 
A word of caution that I have not seen mentioned in this or the referenced thread.

When using indirect addressing make absolutely sure the data location is valid or you will likely fault the processor when the logic executes, the real problem is the fault will lie dormant until the logic is executed, most likely in the middle of the night. For example, if the indirect address is reading or directing data from/to N7:100 make sure N7:100 exists. In other words make sure you are not attempting to read or write beyond the File, Word or Bit boundaries.

Indirect addressing used for basic data array manipulation such as recipe management will use copy or file moves making it easy to write beyond the end of the created file.

This caution would apply to RSL5000 as well.
 
Thanks all ...

At least this will give me something to think about. Heard about indirect addressing. Now see examples (including Ron B's hyperlink). But am still a ways from understanding the value of using this method.

Yes, this MOV instruction is used in a recipe configuration. If I kinda understand, each recipe will have its own data register for a specific step in a recipe. But the execution of any particular recipe moves this word data into the process data register by use of indirect addressing? Should I restate my question?
 
The value of using this method is to save using "brute force" to do something. Sounds like you have a recipe system, so let's use that for an example.

Let's say one parameter of this recipe is "oven temperature". You have 50 recipes, and the oven temperature for each of those 50 recipes is stored in N7:0 through N7:49.

Your recipes are numbered 0-49 - not that the operator, will know that, the operator will just see a list of recipe names, but when they select a recipe, the HMI just sends the PLC a command to "load recipe 26".

Now, you have to find out what the oven temperature should be for recipe 26, and load it into your PID block that controls your oven temperature.

What's easier here?

You could have 50 EQU...MOV instructions, where you effectively go

"If RecipeNumber = 0 then MOV N7:0 into PID"
"If RecipeNumber = 1 then MOV N7:1 into PID"
"If RecipeNumber = 2 then MOV N7:2 into PID"
...
"If RecipeNumber = 49 then MOV N7:49 into PID"


Or, you could have one MOV instruction that says

"MOV N7:[RecipeNumber] into PID"

There are other places that indirect addressing is massively valuable, but hopefully that example gives you the idea.
 
Or, you could have one MOV instruction that says

"MOV N7:[RecipeNumber] into PID"

There are other places that indirect addressing is massively valuable, but hopefully that example gives you the idea.

So with this, you're using a tag as part of the address? Or would it be like:

"MOV RecipeNumber into N8:0"
"MOV N7:[N8:0] into PID"

I didn't think SLC (which I'm assuming based on the addressing scheme) could use tags to indirect address. If it can then that's pretty awesome and I wish I had learned it sooner!
 
Yes, it's using the tag as part of the address to give the address a variable. N7: is the constant, and [N8:0] is the variable.
 
So with this, you're using a tag as part of the address? Or would it be like:

"MOV RecipeNumber into N8:0"
"MOV N7:[N8:0] into PID"

I didn't think SLC (which I'm assuming based on the addressing scheme) could use tags to indirect address. If it can then that's pretty awesome and I wish I had learned it sooner!

No, RSLogix 500 can't use tag-based addressing. I was just using a tag-style descriptor for clarity.

So yes, if your recipe temperature values are stored in N7:0 through N7:49, the selected recipe number is stored in N8:0, and the live temperature setpoint is stored in N9:0, your command would be:

MOV N7:[N8:0] N9:0

It's just easier to understand what you're doing if I write it down as "MOV N7:[RecipeNumber] to TemperatureSetpoint" and then work out what register those values come from afterward.

Which I guess is why we developed tag-based addressing to start with 🍺
 
Ok, thanks. I may be going back to my previous plant and they have a few old SLC processors still, so it would have been a handy tidbit (y)
 

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
75
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
155
Back
Top Bottom