PLC Practice One

Source: Internet
Author: User
Tags time 0

Practice a traffic light control

requirements : In the scenario where 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.

Because the teacher to the FX series of software can not be installed correctly, I chose Mitsubishi's another plc programming software Gx-developer, the operation is basically the same, according to the requirements of the ladder drawing the following:

The figure of the X1 represents the title of the Sw1,x2 in the topic of the status switch sw2,x3 representative of the topic of the pedestrian switch PB1, the coil y1,y2,y3 respectively represents the red, yellow, green, M1, M2 for my own set of two auxiliary relays, D5 for the selected data register, can be used to store timing data.

Press SW1,X1 to turn on, at this time no SW2 switch is off, then through the MOV instruction decimal number K1000 assigned to the data register D5, and the 100ms timer T0 set value is D5, that is, timing 100s. Green light Y2 Bright 100s, auxiliary relay M1 power, make green light off, and timer T0 power off clear, timer T1 power, After 0.5 seconds, the green light starts again, timer T2 power, time 0.5 seconds, the T2 normally closed contact disconnects, timer T1 power off after 0, the T1 of the normal open contact return to the state of disconnection, then the green light again extinguished, and T2 the normally open contact has a momentary closure and disconnection, this pulse signal is recorded by the counter C1, when counted 5 times, C1 often When the closed contact is broken, the green light goes out and is locked by the counter, unless the C1 is cleared, it will be lit again, and the timer T0 is cleared. Thus the green light is completed on the bright 100s after flashing 5s, every second light off each time. At the same time counter count 5 times, it's rising along the contact with the yellow light Y1, and the formation of self-locking, timer T3 time 5s after disconnecting the yellow light, and the red light Y0, the same form of self-lock, timer T4 time 100s, counter C1 is cleared, the green light is re-lit, forming a cycle.

Press the SW2,X2 open contact, normally closed contact closed, and then through the MOV instruction decimal number K300 assigned to the data register D5, the timer T0 can be timed 30 seconds, while the green light, yellow lights will be extinguished, only the red light remains lit, when the pedestrian switch PB1, that is, X3 connected, Auxiliary relay M2 Electric timer T5 power, 10 seconds after the time, T5 normally open contact closed, normally closed contact disconnects, the green light Y2 lit, red Y0 off, and the timer T0 power. T0 time 30s, the T0 of the normally open contact closed, normally closed contact, the green light is off at this point, and the timer T5 power off, then the T5 of the normal open contact recovery is broken, normally closed contact recovery closed, green lights remain off, red lights continue to light, unless you press the PB1 switch again.

The above analysis shows that the ladder diagram is designed to meet the needs of the problem.

PLC Practice One

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.