PLC Ladder diagram Programming exercise
Traffic light Control
In a scenario like this, when the SW1 switch is turned on, the traffic light controller starts to work and the controller stops working when the SW1 is turned off.
SW2 for control mode selector switch:
When the SW2 is turned off, the green, yellow, and red lights turn on, the specific timing is: green light 100 seconds, flash 5 seconds (every second light off once), yellow light 5 seconds, red light on 100 seconds.
When the SW2 is turned on, the intersection becomes night mode, and the red light is always on, and when a pedestrian presses the PB1 button, it turns green after 10 seconds, and the green light continues after 30 seconds.
Design Ladder diagram as follows
In the design of the implementation of the daytime traffic lights SW2 off function, on this basis to increase the night to open the function of SW1, in the ladder diagram during the conversion process encountered a ladder diagram over 24 lines can not be converted, so the ladder of the corresponding merger and streamlining, and finally get the ladder diagram, test can achieve the requirements of the function
Conveyor belt Control
Conveyor belt scenes such as:
After opening the SW1 switch, a new workpiece is started and the workpiece is placed on the conveyor belt, moving to the middle point (detected by the X12 sensor), pausing for 5 seconds, then running to the far right of the belt (X11), pausing for 5 seconds, and then moving to the left until the workpiece is removed from the conveyor belt (X10), When the workpiece leaves the conveyor belt, the Y10 Supply command is automatically started to supply the next workpiece with the same motion timing.
The design ladder diagram is as follows:
Ladder diagram design uses the rising edge of the sensor and the falling edge signal as the signal of the starting relay, guaranteeing the immediacy, because the next workpiece in the program debugging must wait for the previous workpiece to drop, it is necessary to add time relay extension and control Y10 power-on time, inspection can achieve the requirements of the function
PLC Ladder diagram Programming exercise