You are on page 1of 2

1 TYPE "OPCIONES DE BOTONERA DE ESTACION PLC"

IF(SIG(1001)==-1) THEN
2 A=RANDOM
IF (A>=0.1) AND (A<0.7) THEN
Y=A*10
J=int(y)
type "eje "
type j
delay 1
CASE j OF
VALUE 1:
DRIVE 1,60,30
DRIVE 1,-60,30
VALUE 2:
DRIVE 2,60,30
DRIVE 2,-60,30
VALUE 3:
DRIVE 3,60,30
DRIVE 3,-60,30
VALUE 4:
DRIVE 4,60,30
DRIVE 4,-60,30
VALUE 5:
DRIVE 5,60,30
DRIVE 5,-60,30
VALUE 6:
DRIVE 6,60,30
DRIVE 6,-60,30
END
goto 1
ELSE
GOTO 2
end
ELSE
END
IF(SIG(1002)==-1) THEN
DRIVE 1,-70,50
DRIVE 2,60,50
DRIVE 3,-20,50
DELAY 1
DRIVE 3,20,50
DRIVE 2,-60,50
DRIVE 1,70,50
goto 1
ELSE
END
IF(SIG(1003)==-1) THEN
DRIVE 1,150,30
DRIVE 3,-90,30
DRIVE 6,50,30
DRIVE 6,-100,30
DRIVE 6,50,30
DELAY 1
DRIVE 3,90,30
DRIVE 1,-150,30
goto 1
ELSE
END
IF(SIG(1004)==-1) THEN
ESTADO = 0
Z=0
FOR R=0 TO 2000 STEP 10
IF (SIG(1004)==-1 AND ESTADO==0) THEN
ESTADO =1
Z=Z+1
ELSE
END
IF (SIG(1004)<>-1 AND ESTADO==1) THEN
ESTADO = 0
ELSE
END
DELAY 0.01
END
CASE Z OF
VALUE 1:
DRIVE 1,60,30
DRIVE 1,-60,30
VALUE 2:
DRIVE 2,60,30
DRIVE 2,-60,30
VALUE 3:
DRIVE 3,60,30
DRIVE 3,-60,30
VALUE 4:
DRIVE 4,60,30
DRIVE 4,-60,30
VALUE 5:
DRIVE 5,60,30
DRIVE 5,-60,30
VALUE 6:
DRIVE 6,60,30
DRIVE 6,-60,30
GOTO 1
END
ELSE
GOTO 1
END