1.12 Ülesanne: Kolme lambi juhtimine kolme nupuga
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 juhib juhtpaneeli indikaatorlampe.
- Indikaatorlamp Q1 lülitatakse sisse kui STOP nuppu hoitakse all.
- Reset nupu indikaatorlamp lülitatakse sisse kui hoitakse RESET ja mitte STOP nuppu all.
- Start nupu indikaatorlamp lülitatakse sisse kui hoitakse all ainult RESET ja STOP nuppu koos või ainult START nuppu.
Kui vastavate indikaatorlampide tingimused ei ole täidetud ei tohi vastav indikaatorlamp põleda.
Soovitatav lugemismaterjal
Ülesande lahendamiseks tutvuda järgmiste peatükkidega.
1.12 Exercise: Switching on three lights with three buttons
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 controls the control panel lights.
- Light Q1 is switched on when the STOP button is held down.
- The Reset button light is switched on when the RESET button is held down and at the same time the STOP button is not held down
- The Start button light is switched on when only the RESET and STOP buttons or only the START button is held down.
If the necessary condition for a light is not met, then the corresponding light is switched off.