2.4 Ülesanne: Kolme nupuga mitme lambi lülitamine 2
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 START ja RESET nupu samaaegsel vajutamisel lülitab sisse juhtpaneelil Start nupu indikaatori, Reset nupu indikaatori, indikaatorlambi Q1 ning lülitab indikaatorlambi Q2 välja. Neist ainult ühe vajutamine ei tohi protsessi mõjutada.
Pärast STOP nupu vajutust peavad olema Start nupu indikaator, Reset nupu indikaator ja indikaatorlamp Q1 välja lülitatud ning indikaatorlamp Q2 sisse lülitatud.
Lülitamine peab olema korratav.
Soovitatav lugemismaterjal
Ülesande lahendamiseks tutvuda järgmiste peatükkidega.
2.4 Exercise: Switching several lights with three buttons 2
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 START button light, RESET button light, and light Q1 and switches off the light Q2 when pressing START and RESET buttons simultaneously. The process is not affected when one of the buttons is pressed.
After the STOP button has been pressed, the START button light, RESET button light, and light Q1 are switched off and light Q2 is switched on.
The switching must be repeatable.