RobotStudio event

Error handling, not defined faults

Options
SBENO
SBENO
edited January 25 in Robot Controller
Hello, 

I am relatively new to robot programming (6months) and have a problem.

is there any way to handle unpredictable errors with an overhead error handler?

As it is right now, the robot stays in the program without the possibility of using "PP to main", it is "greyed out".
I use orders from the plc to control the robot, my idea is to use timeouts for each order, if the robot stays in an order for too long, it should go to home position.
I use world zones to make sure the way home is safe.

Is there a neat way to do this?

Thanks in advance
Post edited by SBENO on

Best Answer

  • lemster68
    lemster68 ✭✭✭
    Answer ✓
    Options
    A While loop does not have an ELSE.  You could use an interrupt based upon that signal to make it stop what it is doing and go to home.
    Lee Justice

Answers

  • lemster68
    lemster68 ✭✭✭
    Options
    If PPtoMain is greyed out, that tells me that the program is executing and not errored out.  Can you post the lines of code where it gets hung up?  Otherwise, the PLC needs to issue a stop system input and then it can give PPtoMain system input.  That system input will be rejected if the program is executing.
    Lee Justice
  • SBENO
    Options
    lemster68 said:
    If PPtoMain is greyed out, that tells me that the program is executing and not errored out.  Can you post the lines of code where it gets hung up?  Otherwise, the PLC needs to issue a stop system input and then it can give PPtoMain system input.  That system input will be rejected if the program is executing.
    It's sometimes getting hung up in the handshakes with the PLC, for example if I get "socket error" at the same moment as the handshake then its getting hung up and the "To home" command on the HMI is not working correctly.
    Atleast that's what i have noticed.
    I would like to bypass this with both a timeout (incase operators do not notice) and probably a stop system input too now that you mentioned it.
    Since the only thing the "To home" button on the HMI does is send "PP to main" I guess we need to send a stop system input aswell with that button.

    What do you think about having the main module depending on a signal for timeout from the PLC?

    Something like:
     " While "timoutInput" false 
    do 
    *
    Orders*
    else 
    *
    To Home*
    endwhile

    So as soon as the timeout gets true, it should go home and reset.

    I do not have access to the code right now, so unfortualy i cannot share it.

  • The WaitDI instruction support this by default using the \MaxTime and \TimeFlag arguments.