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.

  • AD
  • There is no flag set in PDL2 after timeout.


    You can simply implement function waituntil with normal wait and then checking condition signal again if it is false you can set timeout flag.

  • 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now