Do a PLC traffic light flashing control exercise

Publisher:jingwenLatest update time:2024-07-25 Source: elecfansKeywords:PLC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Make a traffic light control

1. Controlled by a button, press once to activate, press again to close the cycle.

2.3 lights are on in a cycle,

3. Lights up for 5 seconds, then flashes for 5 seconds.

7bca14d8-23e1-11ee-962d-dac502259ad0.png

Push button start and stop control.

7c22a332-23e1-11ee-962d-dac502259ad0.png

Flashing for 5 seconds after control

7c597ede-23e1-11ee-962d-dac502259ad0.png

Control green light

7cc21e6c-23e1-11ee-962d-dac502259ad0.png

Control yellow light

7d1104d2-23e1-11ee-962d-dac502259ad0.png

Red light control.

7d47dfe8-23e1-11ee-962d-dac502259ad0.png

The next cycle is triggered by the red light signal .

The following is an introduction to the on-delay time S_ODT:

7dc0c6f6-23e1-11ee-962d-dac502259ad0.png

S_ODT (On-delay S5 timer ) starts the specified timer if there is a positive edge at the start (S) input . A signal change is always necessary to enable the timer. As long as the signal state at input S is positive, the timer runs for the time interval specified at input TV. When the timer reaches the specified time without error and the signal state at input S is still "1", the signal state at output Q is "1". If the signal state at input S changes from "1" to "0" while the timer is running, the timer stops. In this case, the signal state at output Q is "0".

If the reset (R) input changes from "0" to "1" while the timer is running, the timer is reset. The current time and the time base are set to zero. The signal state at output Q then changes to "0". The timer is also reset if there is a logic "1" at the R input while the timer is not running and the RLO at input S is "1".

The current time value can be scanned from the outputs BI and BCD. The time value is binary coded at BI and BCD coded at BCD. The current time value is the initial TV value minus the time elapsed since the timer was started.

7e0846e8-23e1-11ee-962d-dac502259ad0.png

7e499184-23e1-11ee-962d-dac502259ad0.png

If the signal state of I0.0 changes from "0" to "1" (rising edge in RLO), timer T5 starts. If the specified two-second time has expired and the signal state of input I0.0 is still "1", output Q4.0 will be "1". If the signal state of I0.0 changes from "1" to "0", the timer is stopped and Q4.0 will be "0" (if the signal state of I0.1 changes from "0" to "1", the time is reset regardless of whether the timer is running or not).


Keywords:PLC Reference address:Do a PLC traffic light flashing control exercise

Previous article:The most powerful popular science collection version of brushless DC motor BLDC
Next article:Introduction to Flux Vector Control and Direct Torque Control

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号