3.3 Ülesanne: Ühe nupuga kahe lambi lülitamine 2
Süsteemi „Nuppud ja lambid” kirjeldus
Süsteemus on 3 nuppu (S1 - Start, S2 - Stop, S3 - Reset) ja 3 indikaatorlampi (H1 - roheline, H2 - kollane, H3 - punane).
Ülesande püstitus
Koostada programm, mis juhib valgustorni indikaatorlampe H1 ja H2. Esimesele RESET nupu vajutusel lülitatakse indikaatorlambi H1 sisse. Teisel vajutusel lülitatakse indikaatorlamp H1 välja ja indikaatorlamp H2 lülitatakse sisse. Kolmandal vajutusel lülitatakse indikaatorlambid H1 ja H2 välja.
Lülitamine peab olema korratav ja nupu all hoidmisel ei tohi esineda vilkumist lampide töös.
Soovitatav lugemismaterjal
Ülesande lahendamiseks tutvuda järgmiste peatükkidega.
CoDeSys animatsioon
Alla laetav animatsioon virtuaalsele PLC-le "CODESYS Control WIN V3". See võimaldab testida PLC programmi arvutis ilma reaalse riistvarata.
3.3 Exercise: Switching two lights with one button 2
Description of the buttons and lights
The MFS stand has three buttons (S1 – Start button, S2 – Stop button, S4 – Reset button) and 3 indicator lights (lamps) (H1 – Green light, H2 – Yellow light, H3 – Red light).
Description of the exercise
Write a program that switches the indicator lights H1 and H2. The light H1 is switched on when pressing the RESET button first time. By second pressing, the light H1 is switched off and the light H2 is switched on. By third pressing, the lights H1 and H2 are switched off. ETC.
The switching must be repeatable. There should be no flashing of the light when holding a button.
CoDeSys animation
Animation for virtual PLC "CODESYS Control WIN V3". Download it and solve the exercise on the PC without the real equipment.