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

5.4 Ülesanne: Kahe nupuga ühe 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 lülitab valgustorni indikaatorlambi H1 sisse, kui hoida START nuppu 3 sekundit all. START nupu vabastamisel lülitatakse indikaatorlamp H1 välja. Kui START nuppu on vajutatud rohkem kui 5 korda, siis ei tohi indikaatorlamp H1 sisse lülituda.

Pärast RESET nupu vajutamist peab indikaatorlamp H1 jälle töötama nii nagu kirjeldatud eespool.

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.4 Exercise: Switching a light 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 the indicator light H1 on when the START button is pressed for 3 seconds. The light H1 is switched off when the START button has been released. The light H1 is not switched on after fifth operation of the light H1.

After pressing the RESET button, the light H1 is working as described above.

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 .