WAIT FOR

  • http://www.robot-forum.com/rob…s/robotforum/shield11.gif


    Hi everybody,


    The RAPID language for ABB have a optional parameter for a "WATIUNTIL", this optional is the "TimeFlag". When this is actived, the program wait the condition just for a time.


    Example: WaitUntil IN_Injet_Start = 1\MaxTime:=8\TimeFlag:=Aux_Timeout;
    ** The program will wait the condition "IN_Injet_Start" just for 8 second



    I need any thing like this optional but for a PDL2 language for COMAU. Please, help me.

  • Thanks krzych,


    I found de answer in the comaus manual.


    PROGRAM input_check
    ROUTINE time_out: BOOLEAN
    -- checks to see if input is received within time limit
    CONST
    time_limit= 3000
    VAR
    time_slice : INTEGER
    BEGIN
    $TIMER[1] := 0
    REPEAT
    time_slice:= $TIMER[1]
    UNTIL ($DIN[1] = ON) OR (time_slice > time_limit)
    IF time_slice> time_limitTHEN
    RETURN (TRUE)
    ELSE
    RETURN (FALSE)
    ENDIF
    END time_out
    BEGIN -- main program
    . . .
    IF time_out THEN
    WRITE (Timeout Occurred)
    ENDIF
    . . .
    END input_check


    With this program i can wait an input just for a time

Advertising from our partners