4.4 Ülesanne: Ühe nupuga ühe lambi sisse lülitamine määratud ajaks
Juhtpaneeli kirjeldus
Juhtpaneelil on 3 nuppu (S1 - Start, S2 - Stop, S4 - Reset), üks võtmega lüliti (S3 - Auto/Man) ja 4 indikaatortuld (H1, H2, H3, H4).
Ülesande püstitus
Koostada programm, mis pärast START nupu vajutust lülitab indikaatorlambi Q1 sisse 5 sekundiks olenemata sellest, kas START nupp jääb vajutatuks või ei.
Lülitamine peab olema korratav ja nupu kasutamisel ei tohi esineda vilkumist lambi töös.
Soovitatav lugemismaterjal
Ülesande lahendamiseks tutvuda järgmiste peatükkidega.
4.4 Exercise: Using a button to switch on light for specified time
Description of the control panel
The control panel has three buttons (S1 – Start button, S2 – Stop button, S4 – Reset button), one key switch (S3 – Auto/Man (in normal state, it is on Auto)) and 4 indicator lights (lamps) (H1 – Start light, H2 – Reset light, H3 – Light Q1, H4 – Light Q2).
Description of the exercise
Write a program that switches on the control panel light Q1 only for five seconds after the START button was pressed, regardless of whether the START button is held down or not.
The switching must be repeatable. There should be no flashing of the light when using the button.