Rung Branch evaluations?

JZerb

Member
Join Date
Oct 2016
Location
Here
Posts
423
Just wanting to make sure i am writing something correctly here.

in Rung 000 if the XIC were to evaluate as TRUE then ALL of the bits on the right side of the ladder would evaluate as TRUE as well correct? Once the XIC would evaluate FALSE then the Latched bit would stay TRUE and the Unlatch bits would go back to being FALSE.

In Rung 001 if the XIC were to evaluate as TRUE then Latch and Unlatch bit on the first rung branch would evaluate as TRUE, but the last Unlatch bit would not evaluate as TRUE? or would it? if so what really is the difference in the two lines of code then?

Rung_Branches.jpg
 
the (too) simple answer that you're looking for is that both rungs would give the same operation ...

the bottom rung would use up a trifle more of the processor's memory - but not enough to amount to a hill of beans ...

also there are limitations on how many "layers" you are allowed to add to the "wedding cake" style arrangement used on the bottom rung ... (plus it looks sort of "ugly" to most people) ...
 
Last edited:
You are correct on how rung 0000 would evaluate, and both rungs 0000 and 0001 would evaluate the same. The only difference is how the branches are nested. You'll have wait for someone smarter to come along and explain the difference in the nesting.

Edit: And Ron wins the typing competition this evening.

Bubba.
 
The two rungs are equivalent and will operate logically the same. In Allen Bradley the second rung will evaluate SLIGHTLY slower. Typically not enough to worry about.

In both

if xic is True then output bits are True, False, False

If xic is false then output bits are unchanged, unchanged, unchanged.
 
Last edited:
Not sure if you question has to do with nesting or not nesting but if so:

There is no functional difference.

The nested branches are ugly and take a couple tidbits of extra memory to store the extra BST and BND pieces. The only advantage to keeping a nested branch like your rung 1 is if you were to anticipate needing to add more conditions to the branch. And even then it is easy enough to edit the rung and add the nested branch at that time.

Double click on the beginning of those rungs to see the corresponding mnemonic code:
Rung 0:
XIC ? BST OTL ? NXB OTU ? NXB OTU ? BND

Rung 1:
XIC ? BST OTL ? NXB BST OTU ? NXB OTU ? BND BND
 
the (too) simple answer that you're looking for is that both rungs would give the same operation ...

i figured as much, and i wrote the code that i needed just as you see it in RUNG 000. But after staring at it for a bit and accidentally creating RUNG 001 in the midst of trying to create RUNG 000 in RSLogix500, i just wanted to verify what i had bouncing around in my head.
 
I have come across many programs with "upside down devo hats" and cleaned them up just to make it easier to read.

You can edit the rung and click and drag the whole branch you want to "un-nest"... Click on the left end of the branch and hold the left mouse button down. Drag it away from its "home" and near the branch you want to extend and a couple of red target dots will appear above and below. As you get close to the desired target, it will turn green and you can let go of the mouse button.

You can pick whether to insert it above or below as an extended branch. Draggin branches around is faster than retyping the line or using the menu to extend the branch and pasting the instruction(s) onto it.
 
Last edited:
You can pick whether to insert it above or below as an extended branch. Draggin branches around is faster than retyping the line or using the menu to extend the branch and pasting the instruction(s) onto it.

and yet for some reason often times when i try and do that it i end up letting off the left mouse button at the wrong time and really making a mess that i need to Ctrl+Z.
 

Similar Topics

Good evening, I can't drag the rung down around my inputs and outputs for some reason in my PLC program? I can't do it for any programs. I'll...
Replies
0
Views
1,421
I just installed a new version of RSLogix 500 Professional on a new machine and there is some kind of bug in the display of the branches that has...
Replies
10
Views
6,491
First off, I'm a hobbyist-level programmer, and this program isn't controlling anything anything that could even remotely be considered "life...
Replies
18
Views
513
See picture. I want to add a rung (magenta) into the existing code. Can't figure out how to do this. I select a -||- , right? When I drag/drop...
Replies
21
Views
1,788
Back
Top Bottom