Sign in to follow this  
Followers 0
dlorentz

Branches-Rung Order Execution

6 posts in this topic

I was wondering if somebody can help me with this small piece of logic. It was written by a company that we are getting a piece of equipment for, and I need to understand how it operates. Specifically what happens when VITAL POWER drops out. What is the execution order of the rung branches. Will both B3[62].0 and B3[50].15 latch, or will the latching of B3[50].15 stop the latching of B3[62].0? Then what happens to the middle branch B3[63}.0? does it energize. The picture doesn't show properly, but there are 2 latching coils at the end of this logic (B3[62].0 and B3[50].15) and one regular coil B3[63}.0. I thought this was badly written logic, but considering that these pieces of equipment operate all over the world, and I am a relative newbie at this, there must be more to the story. Daren logic question.bmp

Share this post


Link to post
Share on other sites
Will both B3[62].0 and B3[50].15 latch, or will the latching of B3[50].15 stop the latching of B3[62].0? 62.0 latches, 50.15 latches if either of those are latched then 63.0 will be off? I think. I can't tell what the output coil is This appears to be logic that shuts something down on loss of vital power and based on the header description it stops the first out logic. Loss of power can cause a flood of alarms to come in. This looks like a way to prevent that from happening.

Share this post


Link to post
Share on other sites
I have read that back when PLCs were older, it was bad form to use an output coil to drive an input on that same rung. it would produce a verify error if the input was executed after the coil was executed. We do it all the time on Holding Contacts and there is no problem, but here in this case, would it produce timing issues or un-repeatable results? This logic is used to trigger a Master Fuel Trip on a boiler. All main shutdowns ie Low level, Low Fuelgas pressure, run through a rung like this. It looks like they want to make sure the MFT relay energizes before the First Out, but I don't see how that happens.

Share this post


Link to post
Share on other sites
Take a deep breath, step back a little, then read and understand the following concise information. Imagine yourself as the processor evaluating a rung - look at each and every instruction in turn, left to right, then downwards and left to right again. As each instruction executes, you know only one thing, that is the current state of the "Rung Logic Continuity" - that is whether the rung is true or false. Each instruction will either be a conditional instruction, one that tests the state of a data element, or an unconditional instruction, one that sets the state of a data element or an instruction that tells the processor to do something, an example would be JSR - go and execute some other code. Start at the "Start" of the rung, all rungs start with "Rung Logic Continuity" (I'll call it RLC from now on) automatically set to TRUE. Going left to right, you meet an XIO instruction (B3[1].1), so you go and look to see if the address specified is a logic 0. If it is, leave the RLC set to TRUE, otherwise set RLC to FALSE. Forget everything you just did, except the RLC condition, and move on to the next instruction, which happens to be an instruction called BST - Branch Start. This just makes the processor remember where to continue when the top branch has finished. But the current RLC is saved for when the branch is processed. Forget everything you just did, except the RLC condition, and move on to the next instruction on the top branch, again another XIO. If the current RLC is TRUE, then the processor will look at B3[50].15, and if FALSE will maintain the RLC as TRUE, otherwise set RLC to FALSE. Forget everything you just did, except the RLC condition, and move on to the next instruction on the top branch, this is an OTL. If the current RLC is TRUE, then the processor will write a "1" to B3[62].0, otherwise it does nothing (for an OTL). The RLC state remains unchanged for unconditional instructions. Forget everything you just did, except the RLC condition, and move on to the next instruction on the top branch, which is an instruction called NXB - Next Branch. This tells the processor to skip back to where it remembered, and start processing instructions on the next branch down. The saved RLC is recovered, as a precursor to the instructions on that branch of the rung.... ...... and so on...... Hopefully, that brief (!) explanation will allow you to see that it doesn't matter what instructions you place, or where you place them, the processor only does what it does with no knowledge of what preceded where it is, except for the state of the RLC. A good analogy is to think of your house as an instruction, and your neighbour delivers you a 1 or a 0.... If you got a 1, you evaluate your instruction, which if it evaluates as true, you pass a 1 to your next neighbour, otherwise you give him a 0. If you were given a 0, you give the next neighbour a 0. You have no idea what instructions your neighbours have, they only deliver 1's and 0's to you. You play your part by changing RLC from 1 to 0 if applicable. Note that if you were delivered a 0, you cannot deliver a 1 to the next neighbour. Does that help ?
1 person likes this

Share this post


Link to post
Share on other sites
Looks like it captures the "First Out" alarm, or the alarm that caused the shutdown, while still registering other alarms that may be caused by the shutdown. On the boiler/burner systems I've worked on, it's very common for one alarm to cause a shutdown, which then triggers a number of other alarms. Without knowing which alarm happened first, it can be difficult to troubleshoot. Here's what I see: 1. Since you say there are multiple rungs like this, let's ignore the specific alarm condition for the moment. 2. Branch 1: When the alarm condition occurs, if there has not been another shutdown alarm, latch the alarm "FO" (first out) bit. This is latched so that it doesn't disappear if the alarm condition clears. 3. Branch 2: If there has been a shutdown alarm, and the FO bit is not set, turn on the normal alarm bit. This is not latched, allowing it to clear if the alarm condition clears. Since it's a symptom not a cause, this doesn't matter. 4. Branch 3: Set the shutdown alarm bit, keeping other alarms from setting their own "FO" bit. As far as the specific alarm condition, since PLCs don't work so well with no power, then there are two possibilities for what that means: 1. There are multiple power sources and/or a UPS to keep power on the PLC even if other "vital" power is lost. 2. The system is using an ABB/Jokab Vital brand safety relay.

Share this post


Link to post
Share on other sites
Thanks for all your help Guys. Daba, that was a very good explanation of rung execution. It helped me understand what was happening. Also thanks JRoss, that helps me understand what they are trying to accomplish Daren

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0