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

5.5 Ülesanne: Kolme lambi lülitamine kahe nupuga 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 lülitab valgustornis oleva valitud indikaatorlambi sisse, kui hoida START nuppu all. START nupu vabastamisel lülitatakse valitud indikaatorlamp välja.

Sisselülitatavat indikaatorlampi valitakse RESET nupu abil. Esimene sisselülitatav lamp on indikaatorlamp H3. Teine on indikaatorlamp H2 ja kolmas indikaatorlamp H1. Kui valitud on indikaatorlamp H1 ja vajutatakse RESET nuppu, siis tuleb alustada lülitatavate lampide juhtimist otsast peale. Ehk järgmiseks lülitavaks lambiks on indikaatorlamp H3.

Korraga tohib põleda vaid üks indikaatorlamp. Lülitamine peab olema korratav. START nupu allhoidmisel 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.

5.5 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 a selected indicator light on the light column, when the START button is held down. When the START button is released, then the selected light is switched off.

The RESET button is used to select the light, which is controlled by the START button. The first controllable light is the light H3. The second is light H2, and the third is light H1. If the indicator light H1 is active (controlled by START button) and RESET button is pressed, then the light H3 is selected as active light for switching it on and off.

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 START button.


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 .