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

5.5 Ülesanne: Nelja lambi lülitamine kahe nupuga 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 lülitab juhtpaneelil 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 Q2. Teine on indikaatorlamp Q1, kolmas Reset nupu indikaatorlamp ja neljas Start nupu indikaatorlamp. Kui valitud on Start nupu indikaatorlamp ja vajutatakse RESET nuppu, siis tuleb alustada lülitatavate lampide juhtimist otsast peale. Ehk järgmiseks lülitavaks lambiks on indikaatorlamp Q2.

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.

5.5 Exercise: Switching four lights with two buttons 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 switches a selected light on the control panel, 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 Q2. The second is light Q1, the third is RESET button light, and the fourth is START button light. If START button light is active (controlled by START button) and RESET button is pressed, then the light Q2 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.

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