PLC program

1. Water lamp

(1) No. 1 to No. 7 lamps are turned on in sequence, then all off, all on again, and finally off again.

(2) Repeat (1), repeating the cycle.

 

2. Traffic lights

The signal lights are controlled by a start switch. When the start switch is turned on, the signal light system starts to work, and the north and south red lights are on first, and the east and west green lights are on. When the start switch is off, all signal lights are off. The north and south red lights stay on for 25 seconds. The East and West green lights stay on for 20 seconds. When it reaches 20 seconds, the east and west lights will flash green, and then turn off after flashing for 3 seconds. When the east and west green lights are off, the east and west yellow lights are on for 2 seconds. At 2 seconds, the east and west yellow lights are off, and the east and west red lights are on. At the same time, the north and south red lights are off and the green lights are on. The East and West red lights stay on for 25 seconds. The north and south green lights stay on for 20 seconds, then flash for 3 seconds and then turn off. At the same time, the north and south yellow lights are on, and then go out after 2 seconds. At this time, the north and south red lights are on, and the east and west green lights are on, and the cycle repeats.

 

 

 

3. Compile the rush-answer program.

The control requirements are: the PLC terminals corresponding to the answering buttons of the three contestants are I0.0, I0.1 and I0.2 respectively, and the corresponding signal lights are Q0.1, Q0.2 and Q0.3 respectively. The button terminal is I0.3. When the host finishes reading the test questions and presses the start button, 3 contestants can rush to answer. The signal light of the contestant who presses the rush button first will be lit, and the lights of other contestants will not be lit.

 

 

4. Design the flashing light circuit so that the load is turned on for 10s and turned off for 10s, and the frequency keeps flashing

5. Prepare washing machine cleaning control program.

Control requirements: When the PLC terminal I0.0 corresponding to the start button is pressed, the motor first rotates forward for 2s, stops for 2s, then reverses for 2s, stops for 2s, repeats this 5 times, and automatically stops cleaning. When the stop button I0.1 is pressed, cleaning is stopped.

method one:

 

Method Two:

 

 

 

6. Program the responder program.

Control requirements: The corresponding PLC terminals of the answering buttons of the three contestants are I0.0, I0.1 and I0.2, and the corresponding signal lights are Q0.1, Q0.2 and Q.3 respectively. The button terminal is I0.3. When the host finishes reading the test questions and presses the start button, 3 contestants can rush to answer. The signal light of the contestant who pressed the answer button first will be lit, and the lights of other contestants will not be lit.

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/shanhe_yuchuan/article/details/122311533