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

6.1 Ülesanne: Kahe nupuga kolme lambi juhtimine

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 esimesel START nupu vajutusel valgustorni indikaatorlambi H1 sisse, teisel vajutusel indikaatorlambi H2 sisse, kolmandal vajutusel indikaatorlambi H3 sisse ja neljandal vajutusel kõik lambid välja. Korraga tohib töötada ainult üks indikaatorlamp.

Kui STOP nuppu hoitakse all, siis START nupu vajutus ei tohi mõjutada lampide tööd.

Korraga tohib põleda vaid üks indikaatorlamp. Lülitamine peab olema korratav. Nuppude all hoidmisel ei tohi esineda vilkumist.


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.

Selles animatsioonis töötab STOP nupp kui fikseeruv surunupp.

6.1 Exercise: Switching three lights with two buttons 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 on the indicator light H1 when pressing the START button first time. By second pressing, the light H2 is switched on, by third pressing, the light H3 is switched on, and by fourth pressing all lights are switched off.

If the STOP button is held down, then the START button must not affect the operation of the lights.

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 flashing 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.

In this animation, the STOP button works as a lockable push button.

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