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

7.1 Ülesanne: Kolme lambi lülitamine kahe nupuga 4

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 lülitab vaheldumisi valgustorni indikaatorlampisid järjekorras: indikaatorlamp H3, indikaatorlamp H2, indikaatorlamp H1, mitte ükski indikaatorlamp ei ole sees, indikaatorlamp H3, jne. Aktiivne lamp peab vilkuma sagedusega 0,5 Hz.

START nupu vajutusel lülitatakse järjekorras järgmine indikaatorlamp sisse. RESET nupu vajutusel lülitatakse järjekorras eelmine indikaatorlamp sisse.

Algselt ei tohi olla sees ükski indikaatorlamp. Korraga tohib sees olla vaid üks indikaatorlamp. Lülitamine peab olema korratav. Nuppude allhoidmine ei tohi võimaltada valida korraga mitut lampi.


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.1 Exercise: Switching three lights with two buttons 4

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 on the indicator lights in the order: light H3, light H2, light H1, no lights are on, light H3, etc. The active light has to flash with frequency of 0.5 Hz.

The next light in the order is switched on when pressing the START button. The previous light in the order is switched on when pressing the RESET button.

Initially, none of the lights are switched on. At any time, only one light can be on. The switching must be repeatable. There should be no several selection of the lights 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 .