First experience with Logix5000

DairyBoy

Member
Join Date
Jun 2007
Location
UK
Posts
393
Good day all. When looking in the help files for indirect addressing I read the following:

"N7:[N7:1] (translates as)* N7[N7_1] This actually references N7[2]; the integer 25."


* my brackets. I started with square ones but given the subject it looked really confusing.

So, is this a typo or is there a built-in +1 offset in the 5000 format?

Thanks.
 
This is a good reason not to use PLC-5/500 addressing with contrologix. (I assume that's what you're doing?) Your variables can mean anything, they aren't necessarily consecutive unless they're programmed that way. I would check the variable values as Jeff suggested.
 
N7:[N7:1] will depend the value of N7:1.

If the value of N7:1 is 2 then N7:[N7:1] = N7:2.

OR

N7[N7_1] is equal to N7_2 if the value of N7_1 is 2

Sounds like this could be a reference to Logix500 rather than Logix5000?
 
Tom, I'm quite willing to follow whatever structure that 5000 requires although I am aware that one can "cheat" at one's peril by hanging on to the legacy of 500 and calling them all B3, N7 etc., but if it's a new system I'll have a go. Sorry Jeff, not enough information given. I've just tried to find the relevant help file to clarify, but without success. Blamb, yes, when I did the search for indirect addressing it showed a page relating to "translation" which is why the data referred to is of the 500 type. I'll keep digging.
 
Last edited:
Open up the tag monitor in 5000 and look at the values for N7_1& N7_2. What are they?
 
Unfortunately, the help you found for indirect addressing was more confusing than it need to be.

It's really pretty simple. Some of the reasons you would use indirect addressing in a PLC5 or SLC, are based on the limitations of that addressing scheme and don't really apply to ControlLogix. However, the most common use is to simply select a value from an array. In ControlLogix it's simply ArrayName[IndexName] Where ArrayName is a tag of any type(Real, Dint, Udt...) that you declare as an array. IndexName is usually a Dint.

If you explain what you are trying to accomplish with indirect addressing, you may get a more helpful response of how to do that in ControlLogix. A direct instruction for instruction translation may not be the best approach.
 
Last edited:
Tom, I'm quite willing to follow whatever structure that 5000 requires although I am aware that one can "cheat" at one's peril by hanging on to the legacy of 500 and calling them all B3, N7 etc., but if it's a new system I'll have a go.

The whole point of the Logix5000 tag database is that you don't have to "follow whatever structure that 5000 requires" - It doesn't "require" any form or structure at all, and you can create and name tags to suit the application, not the control system.

The help files you have read are almost certainly explaining what happens when you convert a SLC or PLC5 program, and as such will retain the unhelpful legacy of data-tables.

Tom, I'm quite willing to follow whatever structure that 5000 requires although I am aware that one can "cheat" at one's peril by hanging on to the legacy of 500 and calling them all B3, N7 etc., but if it's a new system I'll have a go.

If that's the case, then completely forget how it used to be done, and start to think how you'd like it done.....then go ahead and do it the second way. No doubt you would like your data "organised" into convenient blocks, or "structures", so start to think about using UDTs (User-Defined Types), you are not limited to the data-types offered by the system.

As for "indirect" addressing - the concept is simple - the processor just evaluates the "expression" inside the square brackets, and uses the value of the expression as the index into the array. This "expression" can be a single tag, or it can, if needed, be a mathematical formula that evaluates to a value.

eg. MyArray[Index+Offset]

The processor in the example would first go and look at the tag-value of Index,then add the tag-value of Offset, and then use the result to address an array location in MyArray.
 
daba, mellis, I'm ok with the principle of indirect addressing and use it all the time in rsl500 and GXdev. and yes, it was a translation help file that came up, although I won't be using that facility as it's a new program (so no current values in plc - no plc yet). I spent as long as it took to go through the rockwell site's pdfs last night but couldn't find any "getting started" stuff. For what it's worth, I was looking to replicate my tried and trusted rsl500 method of controlling sequential events. At the risk of inviting a torrent of critique, the basic idea is attached. Having started controlling things in the '70s, I used ttl & cmos, so the DEC instruction was music to my grey cells for small sequencers (and long ones if they're cascaded, but it gets a bit top heavy).
 
DairyBoy - ".... but it gets a bit top heavy."

It certainly would for longer sequences - i can envisage that timer rung becoming unmanageable !!

Have you considered using a numeric sequencer ?

Benefits:-

You can code it with "spare" steps (either use "no-condition" steps, or "step-jump"), to allow for future modifications.
You can always see what step you are on.
No need to maintain a bit-file of "step-indications" for your HMI, just use the step-number.
Number of steps not limited by size of bit array - limited by value range of step-number (2,147,483,647 !).
Step-timer is just reset at each "step-on" or "step-jump".
No danger of being on two steps at once if you toggle a wrong bit.
Current step is retentive through power-cycle or run-prog-run change.
Very widely used in industry, in various forms.

...these are just a few I have thought of quickly.
 
I have not done it what about you UDTs. Time lenght, next step, etc.
I don't know your process so keep that in mind. Is time steps better than events? I have done both. I like to use an event to trigger a time loop.
 
I have created simpler sequencers with UDT's, the only draw back it making sure you leave enough elements to add steps to the sequencer in the future. The ones have creted were a copllection of UDT's forming the basis and another UDT using the created UDT's as the data type. For example, if I create a UDT SequencerBits with an array length of 32, then an array SequencerNextStep with an array length of 32, then another SequencerCounter with an array length of 2, and another SequencerTimers with an array of 4, then create a UDT Sequencer with 2 SequencerBits, 2 SequencerCounters, 2 SequencerNextSteps and 1 SequencerTimer I now have 64 bits, 4 Counters, 64 Next Step bits and 4 timers under one tag for the Sequencer. I do not have to use all of these; however, they are available to fit different requirements.
This grouping of UDT's is a great tool as you can create a motor UDT, a pump UDT, and a valve UDT with all the necessary elements and group them all together in another UDT called TankFilling; thus TankFilling.Motor.Aux is the Auxiliary contact used on the motor powering the pump used to fill the tank.
The great advantage to this is that you do not have to create all the times every time this scenerio is used, just create one tag using the TankFilling data type and all the tags are present and are the same everytime.
 
Last edited:

Similar Topics

@ All: what is your best guess on a potential range in increase in efficiency in % (i.e. saved programming hours, greater output, etc.) when...
Replies
5
Views
350
Hey guys, has anyone worked with any type of Keyence PLC and could share their experience with it? Vendor showed me camera footage reply of a work...
Replies
7
Views
1,177
Hi, I have a customer inquiring about an automation product called uSwitch. I can read all the literature but working experience is always...
Replies
3
Views
606
Hi to all, does anyone have experience with using Codesys software for PLC programming? (https://www.codesys.us/) What I can find out is that...
Replies
4
Views
1,117
Hi all, I am experienced with Rockwell by have recently encountered a Bosch PLC. It’s an IndraControls XM21 V14. I installed the software and...
Replies
2
Views
774
Back
Top Bottom