Micrologix Addressing Question

Join Date
Feb 2012
Location
São Paulo
Posts
53
Good Evening Sirs,

Maybe it's a simple question, but... there it is. I have a customer project from an old packing machine and there is a program line that I'm not getting how it works.

There is a NO contact and a ONS, after them there is a MOV instruction with the source addres "N12:[C5:10.ACC]" and the destination "C5:5.PRE", and another MOV, in parallel, with source "N13:[C5:10.ACC]" and destination "C5:6.PRE".

What does the "[C5:10.ACC]" means? I know the N12 is a integer, but I usually use it as "N7:0" or "N7:0/12", something like this, but never saw that kind of addressing.

I'd appreciate any help, thx in advance.
 
It's been a while but if I remember correctly C5 refers to a counter and .ACC would be an accumulating bit.
 
You probably know there can be an added file of integers N12.
A reference to a particular interger would be like N12:10.
The braces '[]' enclose a memory location whose CONTENTS are used in place of the '10'.

So, in the first one the contents of C5:10.ACC are used. Let's say that counter had counted up to 23. So now the expression effectively N12:23. The contents of that location are then sent to C5:5.PRE.

This is called Indirect Addressing. Not all CPUs allow this but many do. Given a normal address any number can be replaced by an indirect reference. This is where care must be taken. The resultant addrress must already exists or there will be a fault. Also, because of the extra memory access, these instructions take longer to execute.

But they are very useful for implementing a table of values.
 
"N12:[C5:10.ACC]" means the 'C5:10.acc'th word in the file N12.

So, if C5:10.acc is 2 then you are referencing N12:2. If the accumulator is up to 200, you will reference N12:200.

It called indirect addressing and in the a/b world, is identified by the use of square brackets. Indirect addressing can be used for bits, words or files:

B3:00/[N7:10]
B3:[N7:1]/00
B[N7:2]:0/15
N[N7:0]:[N7:1]
N7:[B3:6]

The above are all legal addresses, so long as the values inside the square brackets evaluate to legitimate values, otherwise you may get a major error halt.
 
Last edited:

Similar Topics

Using Rslogix 5000 Data Access manual as a reference I keep getting 'Service Not Supported' response when using symbol instance addressing to...
Replies
2
Views
1,585
Hi Every one, I have been using weintek HMI with multiple PLCs, but it is quite confusing for me to define addresses for rockwell plc in easy...
Replies
2
Views
1,930
I am confused. I am using indirect addressing to copy from one point to another based on an integer file but I got one Copy instruction that...
Replies
4
Views
2,202
I can't believe I would need assistance on this issue, didn't think this would be a problem. Anyways, I just bought a Micrologix 1500 LRP plc in...
Replies
8
Views
7,200
Hello guys. I am begining an upgrade project. My employers bought a Micrologix 1400 and several 8 point Micrologix add on I/O modules. For example...
Replies
37
Views
10,690
Back
Top Bottom