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

6.5 Ülesanne: Seadistatav ühe lambi vilkumine 2

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 vilgutab juhtpaneeli indikaatorlampi Q1 ettemääratud arv kordi ja määratud sagedusega. Seda ainult siis, kui rakendus ei ole seadistusrežiimis.

Kui STOP nupp on hoitud 3 s all, siis lülitub rakendus seadistusrežiimi. Seadistusrežiimist annab märku vilkuv indikaatorlamp Q2 (sagedusega 0,5 Hz). Indikaatorlamp Q1 peab hiljem (töörežiimis START nupu vajutusel) nii mitu korda vilkuma kui mitu korda vajutatakse seadistusrežiimis START nuppu.

Samuti saab seadistusrežiimis muuta vilkumissagedust RESET nupu abil. Iga RESET nupu vajutus suurendab vilkumissagedust 0,5 Hz võrra. Kui seadistusrežiimis ei vajutata RESET nuppu, siis peab lamp Q1 vilkuma sagedusega 1 Hz.

Rakenduse seadistusrežiimist lahkutakse, kui vajutada korraks STOP nuppu.

Algselt ei tohi ükski indikaatorlamp sees olla. Korraga tohib töötada ainult üks indikaatorlampidest. Lülitamine peab olema korratav. Nuppude allhoidmisel ei tohi esineda vilkumist ega mitmekordset loendamist.


Soovitatav lugemismaterjal

Ülesande lahendamiseks tutvuda järgmiste peatükkidega.

6.5 Exercise: Adjustable one light flashing 2

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 that flashes the control panel light Q1 with predetermined frequency and with predetermined number of times when pressing the START button. The light Q1 is flashing only when the application run mode is active.

The application set-up mode is activated when the STOP button has been hold down for 3 sec. Flashing light Q2 (frequency 0.5 Hz) shows that the set-up mode is active. The light Q1 has to flash (pressing the START button in run mode) as many times as the START button has been pressed in the set-up mode.

In set-up mode the flashing frequency can be changed with the RESET button. The RESET button increases the flashing frequency by 0.5 Hz. The light Q1 is flashing in run mode with the frequency 1 Hz when the RESET button is not used in the set-up mode.

The run mode is activated when the STOP button is pressed briefly.

Initially, none of the lights are 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 .