We can simulate this same circuit with a ladder diagram:
Examples continued(Example two):
•We are controlling lubricating oil being dispensed from a tank. This is possible by using two sensors. We put one near the bottom and one near the top, as shown in the picture below •Here, we want the fill motor to pump lubricating oil into the tank until the high level sensor turns on. At that point we want to turn off the motor until the level falls below the low level sensor. Then we should turn on the fill motor and repeat the process.
Examples continued:
Inputs Low level sensor High level Sensor Output Motor Address 0000 0001 Address 0500
Internal Utility Relay 1000
Examples continued:
The Ladder Diagram
Examples continued:
Scan 1 Initially the tank is empty. Therefore, input 0000 is TRUE and input 0001 is also TRUE
Scan 2 The internal relay is turned on as the water level rises.
Scan 3 After scan 2 the oil level rises above the low level sensor and it becomes open. (i.e. FALSE)
Examples continued:
Scan 4 After scan 4 the oil level rises above the high level sensor at it also becomes open (i.e. false)
Scan 5 Since there is no more true logic path, output 500 is no longer energized (true) and therefore the motor turns off.
Scan 6 After scan 6 the oil level falls below the high level sensor and it will become true again.
Examples continued:
Ladder diagram with Latching(Example three)
Regular output coils are of course an essential part of our programs but we must remember that they are only TRUE when ALL INSTRUCTIONS before them on the rung are also TRUE. Please think back about the lunch bell example. We would've had to keep pressing the button for as long as we wanted the bell to sound. (A momentary switch) The latching instructions let us use momentary switches and program the plc so that when we push one the output turns on and when we push another the output turns off.