[Home]Basic Ladder Logic

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

This page describes how ladder logic works.

Don't look at the ladder logic program like an electrical circuit ... it is NOT an electrical circuit ... instead the ladder logic program is a set of “instructions” (commands) to a computer (the PLC processor) ...

the best way to actually “SEE” the order of what is happening is to display the rung in the ASCII (“text”) mode ... in RSLogix, this is usually quite easy ... we simply edit the rung - and then double-click the rung number ... the text listed in the little popup window shows the EXACT ORDER in which the PLC processor executes the instructions on that rung ...


note that BST stands for “Branch Start” ... NXB stands for “Next Branch” ... BND stands for “Branch End” ... XIC stands for "Examine if Closed ... OTE stands for "Output"

point of the story: notice that by the time the processor gets to the OTE at the end of the rung, then it HAS ALREADY PASSED the XIC located in the “seal-in” branch ... secret handshake: while on that same scan, the PLC processor can NOT “go back upstream” and recognize the XIC as “true” ... and so the XIC will be evaluated as “true” on the SECOND pass through the logic, but NOT on the first pass ...

The next important thing to remember about PLC's is how they work.

 First they update the inputs
 Second they solve the logic
 Third they update the outputs
 Fourth they do a little housekeeping

Last One Wins!

 If you program the same output twice the last one will always control the state of that output no matter what the first one does.
 -[1]- - - - - -(1)
 -[2]- - - - - -(1)
 No matter what the state of input 1 output 1 will be what input 2 tells it to do...

Seal in Circit

 -[I1]- - - - - -(O1)
 -[O1]- | 

More as I get time

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited April 8, 2008 6:48 pm by BigJohnT (diff)
Published under a Creative Commons License