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

7.6 Ülesanne: Seadistatav nelja lambi vilgutamine

Juhtpaneeli kirjeldus

Juhtpaneelil on 3 nuppu (S1 - Start, S2 - Stop, S4 - Reset), üks võtmega lüliti (S3 - Auto/Man) ja 4 indikaatorlampi (H1, H2, H3, H4).

Ülesande püstitus

Koostada programm, mis START nupu vajutusel (üks kord) vilgutab indikaatorlampisid (järjekord: Start, Reset, Q1, Q2) ettemääratud arv kordi. Seda ainult siis, kui lüliti S3 on lülitamata (AUTO) asendis ehk rakendus on töörežiimis.

Kui lüliti S3 on lülitatud (MAN) asendis, siis on rakendus seadistusrežiimis. Indikaatorlambid peavad hiljem (töörežiimis START nupu vajutusel) nii mitu korda vilkuma kui mitu korda vajutatakse seadistusrežiimis START nuppu. Lampisid saab seadistusrežiimis valida RESET nupu vajutusega. Seadistusrežiimi sisenedes peab juba indikaatorlamp H1 valitud olema. Hetkel seadistatav lamp peab seadistusrežiimis põlema.

Algselt ei tohi põleda ükski indikaatortuli. Korraga tohib põleda vaid üks indikaatorlamp. Lülitamine peab olema korratav. Nuppude allhoidmisel ei tohi esineda vilkumist ega mitmekordset loendamist.


Soovitatav lugemismaterjal

Ülesande lahendamiseks tutvuda järgmiste peatükkidega.

7.6 Exercise: Adjustable four light flashing

Description of the control panel

The control panel has three buttons (S1 – Start button, S2 – Stop button, S4 – Reset button), one key switch (S3 – Auto/Man (in normal state, it is on Auto)) and 4 indicator lights (lamps) (H1 – Start light, H2 – Reset light, H3 – Light Q1, H4 – Light Q2).

Description of the exercise

Write a program where after pressing the START button once the control panel lights (in queue: START, RESET, Q1, and Q2) are flashed for a predetermined number of times. The lights are flashing only when the application run mode has been selected (the key switch S3 is in the position AUTO).

When the key switch is in the position MAN, then the application set-up mode is active. 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. The light H1 has to be active when the set-up mode is activated. Only the currently configurable light must be on when the set-up mode is active.

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.

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