Let us Assign the Ips and Outputs with the addresses as follows..
- I/P-1(Pump 1 Start) => %IX0.1
- I/P-2(Pump 1 Stop) => %IX0.2
- I/P-3(Pump 2 Start) => %IX0.3
- I/P-3(Pump 2 Stop) => %IX0.4
- O/P-1(Green Lamp) => %QX0.1
- O/P-2(Red Lamp) =>%QX0.2
- O/P-3(Pump 1) =>%QX0.3
- O/P-4(Pump 2) =>%QX0.4
Now Let us look at the problem,i.e find out the conditions
Pressing Start Pump-1 Push button, starts Pump 1.
Pressing Start Pump-2 Push Button, starts Pump 2.
Pressing Stop Pump-1 Push Button stops Pump-1 and similarly pressing Pump-2 Stop Push Button stops Pump-2.
When any one of the Pumps is running, then the Red Lamp turns on(as a warning maybe), but when both pumps are on the the green Lamp turns On.
Now let us try to find out the solution,
Step 1: Pressing Start Pump-1 Push button Starts the Pump, and even after releasing the force from the push button the Pump-1 remains ON, i.e. the output(which, in this case is our Pump-1) has to be latched with itself as shown in the ladder below.
Step 2: Please Note that, in above diagram, the Pump remains ON, even after releasing the Push Button-1, so , in order to turn off the motor, we have to break the latch i.e the path by adding a 2nd Push button i.e the Stop Pump-1 Push Button, as shown in the ladder below.
Step 3: Similarly let us add another rung to the ladder for starting and stopping of Pump-2, as shown below.
Step 4: Now, let us develop the rungs for the Lamp-2, i.e The Red Lamp.When any one of the Pumps are running, the Red lamp is supposed to glow, i.e it is an OR Operation between the States of the two Pumps, which will determine the status of the Red Lamp.It is done in the rung as shown below.
Step 5: For the Lamp-1, to be turned on ,both the Pumps have to be running.This can be achieved by an AND operation of the status of the two Pumps.This is shown in the rung below.
Step 6: Now, there is one more thing to take into consideration, which is if both the motors are running, then Lamp-1 should be On, But Lamp-2 (The Red Lamp) has to be Turned Off.This can be achieved by breaking the path to the Red Lamp by the green Lamp, so that when the green lamp is ON, it will make the Red Lamp Off.It is shown Below.
The Final Step: Now since we have developed the rungs for every condition, let us finally add them all together to get the final diagram, which is given below.
If you still have any doubts any where in the program, the just add a comment below.