CoDeSys
Siemens S7-1200 viide Siemens LOGO! viide Automatiseerimise viide Mehhatroonikaseadmete viide Pneumoautomaatika viide
Joonis
Joonis

7.6 Ülesanne: Seadistatav Kolme lambi vilgutamine

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 START nupu vajutusel vilguvad valgustorni indikaatorlambid (järjekord: H1, H2, H3) ettemääratud arv kordi. Seda ainult siis, kui rakendus on töörežiimis.

Kui STOP nupp on hoitud all 3 s, siis lülitub rakendus seadistusrežiimi. Indikaatorlambid peavad hiljem (töörežiimis START nupu vajutusel) nii mitu korda vilkuma kui mitu korda vajutatakse seadistusrežiimis START nuppu vastava lambi juures. Lampisid saab seadistusrežiimis valida RESET nupu vajutusega. Seadistusrežiimi sisenedes peab juba indikaatorlamp H1 valitud olema. Hetkel seadistatav indikaatorlamp peab seadistusrežiimis olema sisse lülitatud.

Rakenduse seadistusrežiimist lahkutakse, kui vajutada korraks STOP nuppu. Seadistusrežiimis viimati seadistamata jäänud lambid peavad jääma kustunuks (need ei tohi vilkuda).

Algselt ei tohi ükski indikaatorlamp sees olla. Korraga tohib töötada ainult üks indikaatorlampidest. Lülitamine peab olema korratav. Nuppude allhoidmisel ei tohi esineda vilkumist ega mitmekordset loendamist.


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.

7.6 Exercise: Adjustable three light flashing

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 flashes the indicator lights (in queue: H1, H2, and H3) for a predetermined number of times when pressing the START button. The lights are flashing only when the application run mode is active.

The application set-up mode is activated when the STOP button has been hold down for 3 sec. The lights have to flash later in run mode so many times as the START button has been pressed in the set-up mode. The configurable light can be selected in the set-up mode by pressing the RESET button. Only the currently configurable light must be on when the set-up mode is active.

The run mode is activated when the STOP button is pressed briefly in set-up mode. Lights that have not been set up in the set-up mode must remain off (they must not flash).

Initially, none of the lights are switched on. At any time, only one light may be on (should be switched on). The switching must be repeatable. There should be no flashing of the lights or double counting when holding the buttons.


CoDeSys animation

Animation for virtual PLC "CODESYS Control WIN V3". Download it and solve the exercise on the PC without the real equipment.

Creative Commons Licence
"CoDeSys" is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License .