You are here: Core Reference > Coding > Logic > How Ladder Diagrams Work

How Ladder Diagrams Work

In ClearSCADA, each Ladder Diagram represents a circuit consisting of 2 rails. Between the 2 rails are a 'rung' of contacts and coils that represent the inputs and outputs. Each 'rung' represents an AND Logic function. By adding branches to a rung, you can create OR Logic functions.

Power for the circuit starts at the left rail and passes through the contacts and coils to the right rail. The power can only pass through the contacts if they are in a 'true' state. When power reaches a coil and passes to the right rail, an output is written.

For example, a simple Ladder Diagram can be used to set a pump to start when both a flow is detected and power is detected in the pump. The inputs from the flow detection and pump power sensors are represented by direct contacts and the command to start the pump is represented by a coil.

In the Ladder Diagram shown above, the StartPump coil is only put into effect when the FlowPresent and PumpPower contacts are 'true'. As the FlowPresent contact is 'false', the power from the left rail cannot pass the FlowPresent contact and so the StartPump coil is not activated.

If both the FlowPresent and PumpPower contacts were 'true', the power from the left rail would pass through the contacts to the StartPump coil and on to the right rail. This means that the circuit is complete and the StartPump coil is put into effect.

By default, each rail on the Ladder Diagram is 'true'. In ClearSCADA, you can set the state of a rail to be dependent on another value. This allows you to associate Ladder Diagrams with other Ladder Diagrams or other Logic programs. For example, you can set the left rail of a Ladder Diagram to be 'false' except when a Function Block Diagram has an output of 'true'. This means that the Ladder Diagram only runs when the Function Block Diagram has been executed and returned a 'true' value—the output of the Function Block Diagram program is written to the state of the left rail.


ClearSCADA 2015 R2