Programming PLC in Ladder Diagram
Ladder (LAD) diagram is another way to program a
PLC. In LAD, there are no logical blocks such as AND, OR and NOT as in FBD
programming. Contact type and their arrangement signify their operation. The
most common contacts are normally open (NO) contact and normally close (NC)
contact. NO contact is also known as make contact because it closes ( makes
connection) when the input at the PLC (I1,I2..) is at logic 1. On the other hand, NC contact is known
as break contact because it opens up (breaks connection) when the input is at
logic 1.
Logic operation in LAD
AND
Worked example in LAD
On-statement and logic expression
Stage 1: Main switch S1 is closedWorked example in LAD
Task: Customer orders are assembled on pallets and when ready for dispatch, they are transported on a conveyor system to the truck. A master switch,S1 will turn on the system. A green lamp turns on when the system is switched on. Two push buttons, S2 and S3, permits transportation of the pallets. The pallets are only transported further if at least one of the push buttons is kept pressed. The pallets are transported to the end position where it activates a limit switch,B4. A yellow lamp turns on when B4 is activated and the conveyor stops. This will prevent the pallet from falling down.
I/O table
Some on statements and Boolean expression needs clarification In the first on statement, either S2 or S3 need to be on, thus OR logic is required. There is no overline on I4 because it should not be activated for the motor to run. When B4 is not activated the logic is 1 because is a NC type and in normal state it is connected to the supply voltage. The Boolean expression for yellow lamp has an overline because in the on statement, it is stated that B4 has to be activated for yellow lamp to turn on. When B4 is activated, it is disconnected from the supply, thus the logic will be 0.
The ladder diagram above is in the initial stage of simulation. The type of input we used can also be simulated. The I4 contact which is normally open type is shown in red because it is ON ( closed) in the beginning because it is connected to B4 limit switch which is NC type. The limit switch is connected to the supply voltage and this causes the NO contact (I4) to ON (close). Contrary to this, I4 contact in the last rung is a NC type and it opens when I4 port. receives supply voltage. Hence the yellow light is OFF in the beginning and turns on when the limit switch, B4 is activated. All the logic state of the contacts is stated in the diagram above.
Simulation is done stage by stage to see how the contacts changes with change is input condition as below.
- Master switch S1 is closed
- Either S2 or S3 is pressed
- Limit switch B4 is activated
When the main switch is closed, only the green lamp will turn on because output coil, Q2 will be energized through contact I1. The rest of the output coil will be off because there is no continuous path from the power rail for them.
I2 and I3 are in parallel formation which basically produce an OR logic gate function. Hence when either S2 or S3 is pressed, there will be connection between the preceding contact, I1 and succeeding contact, I4. Since I1 is closed and I4 is also closed, there will be continuity from the power rail up to coil Q1 and this will turn on the conveyor motor.
When the limit switch is activated, port I4 will receive OV because the NC limit switch is diconnected from the supply. The NO contact I4 in the first rung will open and the NC contact in the last rung will close.The contacts have returned to their original states which are NO and NC respectively. The end result is the motor will be off and the yellow lamp will be on.
No comments:
Post a Comment