Question Time Again

just_lionel

Member
Join Date
Nov 2004
Location
Edenton, NC
Posts
323
Hello All,

Once again I have another question (surprise surprise). I've read quite a bit on these boards, posted a few times etc but I am wondering about indirect addressing. What are the advantages of it? Whats an good example of it?

I am trying to broaden my knowledge, so I guessed this would be a good thing to learn since it seems that it is used by various people on these boards.

Thanks,

Lionel
 
A good example is using an integer to offset another integer.


Lets say you need to store information by the hour. So many counts per hour, and keep each hour seperate. Create a file with at least 24 integers. We'll say N15:0-23 Then use the hour marker (S:40) to move data to the correct hour between N15:0 and N15:23 this is done by N15:[S:40] Brackets indicate an indirect address. The result is that the value of S:40 will offset the integer that the data is moved to.

Each hour S:40 incresses and it starts at 0 for the hour between Midnight and 1:00 am. So for the first hour you will move X counts into N15:0. S:40 is 1 for the hour between 1:00am and 2:00am, so for that hour you would move the counts into N15:1, and so on. It starts over at midnight. So remember that the information will overwrite the preceeding day. Different problem, different day.

These are AB addresses. They may or may not be what you are use to seeing.

Hope this helps.
 
One caution on indirect addressing - it can be difficult to follow the logic. Make sure you take extra pains in commenting so that it is clear exactly what is going on.
 
I think that is what has caused the most confusion for me. I have been reviewing some ControlLogix Programs that heavily uses InDirect addressing and I can't really figure out what it is doing. Very little comments in it.

I've been sticking with the other programs that has good clear comments that I can learn from.
 

Similar Topics

Hi again guys Can anyone one please help me with setting up the Micro810 for the following: Doing the actual ladder logic is no problem the rest...
Replies
1
Views
2,672
HI EVERYONE I have a machine slc 5/05 connected to panelview plus 1000 . I use rslinx and ethernet to go on line which I have some problem with...
Replies
7
Views
2,022
Hi all. I searched and was unable to find what I was looking for. We are discussing and speccing a large retrofit, and talking about PV+ screen...
Replies
1
Views
1,387
Had replaced one of the my2j eletromechanical relay on my equipment's circuit board earlier. The function of this relay is to give a signal to...
Replies
13
Views
6,295
Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
167
Back
Top Bottom