H. ZANDER GmbH & Co. KG • Am Gut Wolf 15 • 52070 Aachen • Germany • Tel +49 241 9105010
Fax +49 241 91050138 • info@zander-aachen.de • www.zander-aachen.de
70
Operating manual ZX09/20/21-Series
timerDoor1;
timerDoor2;
END_VAR;
(*************************LOGIC-PART*******************)
(*Debouncing of the input signals of the light barriers*)
Light1.TDB:=200ms;
Light2.TDB:=200ms;
(*If 1. the light barrier 2 is activated and 2. the component is detected as too high, Fail1 is set*)
IF Light1=1 AND timerHigh=1 THEN
Fail1:=1;
ELSE
Fail1:=0;
END_IF;
(*If 1. the light barrier 2 is activated and 2. the component had the wrong colour, Fail2 is set*)
IF Light2=1 AND timerColor=1 THEN
Fail2:=1;
ELSE
Fail2:=0;
END_IF;
Door1Open:=timerDoor1;
Door2Open:=timerDoor2;
(*************************TIMERS*******************)
(*As soon as Fail1 is active, "timerDoor1" is restarted and delivers a high signal for 1200 ms*)
timerDoor1.ENABLE:=1;
timerDoor1.RESET:=Fail1;
timerDoor1.POL:=HIGH;
timerDoor1.MODE:=SINGLE_SHOT;
timerDoor1:=1200ms;
(*As soon as Fail2 is active, "timerDoor2" is restarted and delivers a high signal for 1200 ms*)
timerDoor2.ENABLE:=1;
timerDoor2.RESET:=Fail2;
timerDoor2.POL:=HIGH;
timerDoor2.MODE:=SINGLE_SHOT;
timerDoor2:= 1200ms;
(*If the component is detected as too high, "timerHigh" is started and holds the value until the light
barrier 1* is reached)
timerHigh.ENABLE:=1;