Rslogix5

plcdb222

Member
Join Date
Sep 2006
Location
Pa.
Posts
3
I have a program that runs one of our machines and there are segments in the ladder logic rungs that are marked in green. I cannot fin a reasonable explaination for these highlights in any of the manuals. Anyone know what they indicate. I would appreciate any help i can get.
 
Last edited:
Just a stab in the dark here but if you are referring to the instructions themselves ( the ones that look like contacts and coils), then you are seeing instructions that are true. The other similar instructions that do not have this highlighting are false.

When an instruction is true then you have logic flow from the left to the right. Sort of like power flow in relay logic. But only sort of!

OG
 
Yes those are the ones but also annotations too. I should have stated that the program is not active. I just brought it up in the offline mode. Thanks again for any help and what you have sent is very much appreciated. Thanks.
 
what does the green mean? - part one

Greetings plcdb222,



and welcome to the forum ...



you’ve asked what many (most?) people would consider to be a “simple” question ... basically, “what does the green mean?” ... as with many other subjects, the answer is not quite as simple as we might hope ... but here are some examples that might help get the major points across ... notice that the file I’m using for the first part of this demonstration is “offline” ... specifically, the PLC processor is NOT a part of this picture ... more specifically, any “green” that you see in this part of the demonstration is a product of the RSLogix5 software - and it is NOT the result of how the PLC processor is “testing/executing/controlling” the logic ... (more about that later) ...



greenbits.JPG




the bits highlighted in yellow above are the ones that we’ll be using in our examples ... I’ve included them here just for your reference ... please note that since we’re working with an “offline” file, the “1” and “0” status of each of these bits was “frozen-in-time” at the instant that the program file was “uploaded/saved” from the PLC processor to the offline file ... and keep in mind that I will NOT be manually changing the status of any of these bits during the discussion which follows ...



green0000.JPG




at some point during the past, rung 0000 shown above was saved to the offline file ... as the PLC processor executed the logic of that rung, TRUE logic reached the OTE instruction at the end of the rung ... and so the PLC processor wrote a “1” into the output bit/box ... most beginners would have little (if any) trouble interpreting the operation of this rung ... and the green highlights on each of the three instructions would “make sense” to most people ...



green0001.JPG




at some point during the past, rung 0001 shown above was saved to the offline file ... as the PLC processor executed the logic of that rung, FALSE logic reached the OTE instruction at the end of the rung ... and so the PLC processor wrote a “0” into the output bit/box ... most beginners would have little (if any) trouble interpreting the operation of this rung ... and the fact that none of the three instructions are highlighted in green would “make sense” to most people ...



green0002.JPG




this next rung is quite a bit trickier ... at some point during the past, rung 0002 shown above was saved to the offline file ... we’ll assume for this discussion that bit/box I:000/2 had contained a “1” for quite some time before the rung was saved ... and so, as the PLC processor executed the logic of that rung, TRUE logic reached the ONS instruction ... now notice that the ONS is indeed highlighted in green ... to many people the green means “true” ... but in the case of the ONS instruction, the condition is NOT true ... instead, by the time your human eye is able to see the green highlight, the ONS is FALSE ... specifically, the green around an ONS does NOT mean “this instruction is true” ... what it actually means is that the instruction has already been “fired” - and that the bit/box B3/0 currently contains a “1” ...



nailing this down: oops! ... the old simple saying that “green means true” doesn’t always work ... especially for an ONS instruction ...



side note: the OSR instructions used in most SLC/MicroLogix systems never turn green on the screen ... since there is no incorrect "I-always-thought-green-meant-true" indication, most beginners usually have much less trouble understanding these same “one-shot” concepts when working with those smaller platforms ...



continuing on with the discussion of rung 0002 ... FALSE logic reached the OTE instruction at the end of the rung ... and so the PLC processor wrote a “0” into the output bit/box ...



now some beginners might have a little bit of trouble interpreting the operation of rung 0002 ... the fact that the XIC and ONS instructions are both highlighted in green would seem to indicate that TRUE logic should be reaching the OTE instruction ... so based on the too-simple rule that “green means true”, the operation of this particular rung would not “make sense” to some beginners ...



green0003.JPG





this next rung is also troublesome to some beginners ...



at some point during the past, rung 0003 shown above was saved to the offline file ... as the PLC processor executed the logic of that rung, FALSE logic reached the OTL instruction at the end of the rung ... and in response to that FALSE logic, the PLC processor did nothing to the output bit/box ... so how did the “1” status get written into the output bit/box? ... who knows? ... who cares? ... the simple truth is that there definitely was a “1” in the output bit/box O:001/3 at the instant that the rung was saved to the offline file ... and the presence of that “1” condition is the actual reason why the OTL is highlighted in green ... NOT because the “OTL/Latch” is “active” ... NOT because the “OTL/Latch” is “doing-its-thing” ... NOT because the “OTL/Latch” is “driving-the-output” ... instead the green highlight simply results because the output bit/box addressed to the “OTL/Latch” contains a “1” ... period ...



now some beginners have a little bit of trouble interpreting the operation of rung 0003 ... usually that’s because they wonder why the OTL is highlighted if TRUE logic is NOT “activating” it ... in short, the fact that the OTL is highlighted while the XIC is NOT, would not “make sense” to some people ...



green0004.JPG




and this next rung is also troublesome to some beginners ...



at some point during the past, rung 0004 shown above was saved to the offline file ... as the PLC processor executed the logic of that rung, FALSE logic reached the OTU instruction at the end of the rung ... and in response to that FALSE logic, the PLC processor did nothing to the output bit/box ... and notice that this rung controls the same O:001/3 address as the previous rung above ... and once again, the simple truth is that there definitely was a “1” in the output bit/box O:001/3 at the instant that the rung was saved to the offline file ... and the presence of that “1” condition is the actual reason why the OTU is highlighted in green ... NOT because the “OTU/Unlatch” is “active” ... NOT because the “OTU/Unlatch” is “doing-its-thing” ... NOT because the “OTU/Unlatch” is “driving-the-output” ... instead the green highlight simply results because the output bit/box addressed to the “OTU/Unlatch” contains a “1” ... period ...



now some beginners have a little bit of trouble interpreting the operation of this rung too ... usually that’s because they wonder why the OTU is highlighted if TRUE logic is NOT “activating” it ... in short, the fact that the OTU is highlighted while the XIC is NOT, would not “make sense” to some people ...



in closing this part of the discussion, I’ll tell you that many (most?) of the students in my week-long classes have problems with at least some of these same “what does the green mean?” issues ... and some of these people have been working on or around PLCs for quite a while ... so you are NOT alone ... but if you’ll carefully read the descriptions above each instruction on the rungs above, and then tie that information to the text in this post, then things should definitely fall into place ... and please post any questions if you need more detail ... I’ll be glad to try again ...
 
Last edited:
what does the green mean? - part two

in the previous post, we discussed the basic question “what does the green mean?” in relationship to the highlights which appear around many of the ladder logic instructions ... in this current post, we’ll go into the basics of “what does the green mean?” in relationship to the vertical “power rails” which appear at the left and right sides of the ladder logic program display ... keep in mind that in the previous post we were working with an “offline” file without using a PLC processor ... in this next post, however, we’ll be working “online” and actually communicating with a PLC-5 processor which will be kept in the “Remote Run” mode ...



greenrails.JPG




first let’s look at rung 0000 at the top of the program ... notice that the “power rails” are highlighted in green ... notice that the XIC is highlighted in green ... notice that the OTE is highlighted in green ... notice that there are NO “letters” located in the left margin of this particular rung’s screen display ... so from all of these green highlights, what can we definitely say, with 100% assurance, about rung 0000? ... specifically, is this particular rung being scanned/executed by the PLC processor? ... yes? ... or no? ... actually the answer is: “we can’t tell for sure” ...



now based on what we see before us on the screen, it certainly does LOOK like the rung is being scanned/executed by the PLC processor ... and, based on what we see here, there is nothing that would indicate that this rung is NOT being scanned/executed ... but personally, I would NOT bet the rent on this one ... in short, there are several dirty tricks that I could be playing on you here to keep this program from being scanned/executed by the PLC processor ... but I’m not ...



for the purposes of this discussion, let’s just assume (gosh I hate that word) that the sun is shining, the birds are singing, life is lovely, and the program shown in the figure above IS indeed being scanned/executed exactly the way it appears to be ... now let’s move on ...



next notice that rungs 0001 through 0004 all have letters located in the left margin of the display ... the presence of those letters indicates that those rungs have SOME type of “edit” operation associated with them ...



notice the capital letters “I” at the left of rung 0001 ... first of all, the letter “I” stands for “Insert” ... in other words, we’re interested in “inserting” this rung into the program ... and when you get right down to it, this particular rung is actually already present inside the PLC processor right now ... we can tell that from the fact that the letters “I” are CAPITAL letters ... we could talk much more about that - but not today ... for today, we’re only interested in “what does the green mean?” ... and in this case, the green “power rails” at the left and right sides of rung 0001 indicate that yes, this particular rung IS being scanned/executed by the PLC processor ...



caution! ... remember that we’re assuming in this discussion that this ladder program is indeed being scanned in its normal manner ... no “behind-the-scenes” dirty tricks are being played ... but out in the real world, we could NOT be so sure ... in other words, “green on the rails” does NOT (I repeat does NOT!) prove, beyond a shadow of a doubt, that a rung is actually being scanned/executed by the PLC processor ... but let’s move on ...



notice the capital letters “R” at the left of rung 0002 ... the letter “R” stands for “Replace” ... in other words, we’re interested in “replacing” this rung with the “insert” rung located immediately above it ... but at this point in time, this particular rung 0002 is actually still present inside the PLC processor too ... but let’s stay on course ... “what does the green mean?” ... and in this case, we notice that the “power rails” at the left and right sides of rung 0002 are NOT highlighted in green ... this definitely indicates that no, this particular rung is NOT being scanned/executed by the PLC processor ...



note that in this discussion, we are currently “testing” the edits that we have made ... more specifically, the PLC processor is “testing” the edits for us ... if we were NOT currently “testing” the edits, then the “I” rung 0001 would NOT be highlighted ... and the “R” rung 0002 WOULD be highlighted ... specifically, the PLC processor would still be scanning/executing the old “R” rung - and NOT scanning/executing the new “I” rung ...



now notice the capital letters “D” at the left of rung 0003 ... the letter “D” stands for “Delete” ... in other words, we’re interested in “deleting” this rung completely from our ladder logic program ... but at this point in time, this particular rung 0003 is actually still physically present inside the PLC processor ... but “what does the green mean?” ... again in this case, we notice that the “power rails” at the left and right sides of rung 0003 are NOT highlighted in green ... this definitely indicates that no, this particular rung is NOT being scanned/executed by the PLC processor ...



once again, note that in this discussion, we have already made some edits/changes to the program and the PLC processor is currently “testing” those edits/changes for us ... if we were NOT currently “testing” the edits, then the “D” rung 0003 WOULD be highlighted ... specifically, the PLC processor would still be actively scanning/executing this old “marked-for-deletion” rung ... but right now, rung 0003 is just “hanging-loose” and having absolutely NO effect on the operation of the system ...



we’re almost done ...



notice the lower-case (little) letters “e” at the left of rung 0004 ... the letter “e” stands for “edit” ... in other words, we’re interested in “editing” this rung and eventually adding it into our ladder logic program ... but at this point in time, this particular rung 0004 is NOT actually physically present inside the PLC processor ... in order to send this particular “little-letter” rung over the communication cable and into the processor, we’d have to “Accept” the rung ... and in this example, we still haven’t done that all-important step yet ...



but “what does the green mean?” ... and again in this case, we notice that the “power rails” at the left and right sides of rung 0004 are NOT highlighted in green ... and this definitely indicates that no, this particular rung is NOT being scanned/executed by the PLC processor ...



so keep in mind that we HAVE made some edits/changes to the program and the PLC processor is currently “testing” those edits/changes for us ... BUT! ... the edits/changes to rung 0004 are NOT (I repeat NOT!) being scanned/executed by the PLC processor ... think about it ... how could this rung possibly be scanned? ... it CAN’T be scanned because the little “e” letters tell us that this particular rung has still NOT been sent over the communication cable and into the processor ... as they say in baseball, “you can’t hit ‘em if you can’t see ‘em” ... and the PLC processor can NOT see this “unaccepted” rung ...



I hope this helps ...
 
Ron,

I'd like to thank you for your insite and the information you provided. It was a real help to me.. I have been working with PLC'S for yrs. but am new to the Allen Bradley family ( I know that may sound strange as most of industry uses A&B). Again thamk you and I am sure in the future i will have more questions for you. I should enroll in your course.
 
Ok, here's my situation. I'm not a controls guy, but I'm trying to understand some ladder code on one of our systems for my personal education. This is working production code, FYI. The software is running on an A/B 5000 system. What the code does, is every 150 seconds (Timer), the system toggles between pipe A (CleanA = true) and pipe B (CleanA = false) (logic elsewhere actuates the valves).

 
Timer.DN CleanA CleanATog
|-+-----] [------------+---+---] [----+---(U)-----+----+---|
| | | | | InhTog | | |
| | | | +---( )-----+ | |
| | | | | |
| | CleanAONS CleanA | | CleanA InhTog CleanATog | |
| +---[ONS]-----] [----+ +---]/[-----]/[------(L)----+ |
| |
| |
| |
| CleanATog CleanA |
|-------] [-------------------------------( )--------------|




At the start of this sequence, CleanA, InhTog, and CleanATog are all false. So, the first time Timer.DN goes true after 150 seconds, we'll take the bottom half of the right-hand branch and latch CleanATog on, which then turns on (and keeps on) CleanA in the next rung. I've got that, and it makes good sense.

What I'm not clear about is what's happening on the next scan. If I read the documentation right, an ONS instruction with nothing in front of it will always be true. Therefore, we go along the bottom of the left-hand path, then along the top of the right-hand path, unlatching CleanATog and turning on InhTog. The next rung turns off CleanA.

However, that's not what actually happens - CleanA stays on for 150 seconds, and turns off the next time Timer.DN goes true. That makes me think the ONS path on the first rung is basically non-functional. Am I right, or is there some esoteric bit that I'm missing out on as a non-controls guy?

[/LADDER]
 
Last edited:
plcdb222 said:

Yes those are the ones but also annotations too. I should have stated that the program is not active. I just brought it up in the offline mode. Thanks again for any help and what you have sent is very much appreciated. Thanks.



You may see "annotations" highlighted when symbols are used in the program. I believe that green is the default color. Symbols are like user variable names for specific addresses. RSLogix stores the symbols offline, won't let you use the same name for multiple addresses, and provides a means of making your code more readable (sometimes) when the descriptions are hidden. There are syntax rules which apply to them as well. They are a handy way of avoiding having to remember addresses. FOr example, you could assign the symbol "AUTO" to address B29:16/11, and then just type AUTO instead of the cryptic address when you are editing logic. Understand that symbols are NOT stored in the PLC processor, only in the offline file. To use symbols, there are preferences and options that must be properly selected first. They can be shown in addition to, or in place of actual addresses when viewing code, and the descriptions that are assigned to the addresses can be displayed or hidden independently of the symbols.

Paul
 
bdjohns1 said:
Am I right, or is there some esoteric bit that I'm missing out on as a non-controls guy?
I'd say it's more like equal parts overlooked and esoteric. Your thinking is almost correct, the ONS instruction will be true continuously given there are no conditions preceding it, and therefore, no single-scan true condition from it - EXCEPT on the first program scan.

IIRC, it was Ron Beaufort who posted a detailed reply about the pre-scan behavior of the PLC-5. Probably the CLX is similar. Briefly, before the processor starts scanning the ladder 'for real' it does an internal 'setup' sort of scan where all inputs are first set to off and a scan is done to precondition the outputs. Based on this, you would get one and only one transition out of the ONS on the first scan.

My take on the logic you posted is that it resets CleanA on startup if CleanA was set. I'm not up to speed on the CLX but that's what it looks like.

.02
 
Greetings to all ...



I’m teaching today so have no time to even read the thread completely ... but I thought I’d throw this much in during my lunch break ...



there seems to be some confusion about the action of an “unconditional” ONS when used in a ControlLogix system ...



as near as I can tell (by a quick skimming), the basic question being discussed is this:



suppose that an ONS is programmed as the first (or only) input on a rung ... will the ONS “fire” and execute the output of the rung when the processor first goes into the “RUN” mode? ... in other words, when the processor first comes on and sees the obviously “TRUE” logic reaching the ONS, will it (the processor) regard this as a “let’s make it go” situation - or not? ...



CLX_ONS_PRESCAN.JPG





the answer is “no” ... the ONS won’t fire ... as Doug-P remembered, the processor’s “prescan” comes into play in this situation ... that “startup safety step” automatically puts a preliminary “1” into the memory location of the ONS ... that “1” status of the bit keeps the ONS from firing ... and here we’re assuming (gosh I hate that word) that nothing else is manipulating the status bit of the ONS ...



if nothing else is hidden below the surface here, then the processor’s “first scan” bit is probably the solution that you’re after ... this bit WILL be on when the processor first goes into the “RUN” mode ...



note: the ONS in the PLC-5 works the same way as the ONS in the ControlLogix (as described above) ... basically it will NOT fire unless it sees a FALSE to TRUE transition/change ... but ... the (similar) OSR in the SLC-500 system is different ... an unconditional OSR rung in that system will “fire” - but ONLY ONCE UPON A TIME ... specifically, unless something else “resets/reloads” the memory bit for the OSR, then it will NOT EVER fire again when the processor goes into the RUN mode on subsequent startups ... weird? ... welcome to my world ...



sorry if I missed the whole point of the thread ... feel free to ignore this if it doesn’t add to the discussion ...
 
Last edited:
Doug and Ron,

Thanks very much for your responses. In my case, the ONS is never getting manipulated elsewhere, so aside from the first scan that unsets CleanA if it's set, the ONS never does anything. Since we don't want to enter this section of the program with CleanA true (ie, CleanA needs to be false the first time Timer.DN goes true), then this is the desired behavior.

I was interested because I need to get something similar put in to control a single valve on a separate 30-second timer, and wanted to make sure that using the same logic structure would work, without having to make time demands on one of our programmers that are tied up elsewhere on things higher up the list than educating a ChemE on the subtleties of ladder logic.

Thanks again for your help, gentlemen!

--Ben
 
Ron Beaufort said:
sorry if I missed the whole point of the thread ... feel free to ignore this if it doesn’t add to the discussion ...

Au contraire. Thanks for clearing up my misinformation and misconception!
 

Similar Topics

I could use some help figuring out the layout of a Remote I/O channel Diagnostic Files in a PLC5 using RSLogix5. I've attached a screen shot of...
Replies
14
Views
3,616
Hi all. I was wondering if anyone knew a way to renumber Ladder Numbers in RSLogix 5. I have deleted some of the old Program Files in my Project...
Replies
2
Views
1,517
Yesterday a coworker informed me of an issue with his laptop. Anytime he opens an RSlogix5 project, and tries to go online, the entire program...
Replies
1
Views
1,361
Hi Friends, 1. Please, what are the differences between RSLogix5 and RSLogix500? 2. Troubleshooting/Fault finding tools in RSLogix5? 3...
Replies
1
Views
1,113
Hi , i'm looking for copy of RSlogix5 or a laptop with that software on it. I need it to upload code ,so i can rewrite it. any help would be...
Replies
30
Views
7,804
Back
Top Bottom