RobotStudio event

Error Handler

Hi, I was curious if anyone knew the Errnum Data I would use to handle a motion supervision/joint collision. I have looked through out the manual, and read all of the options, but still can not find the data for those errors.

Our main objective is to shut off our electric spindle if the robot hits something.

Dustin

Comments

  • That might be difficult to do with an error handler because you would have to have the same error handler code in every routine. Another alternative might be to use the system output MotSupTrigg (if you have collision detection option) and connect it to a trap routine that stops the motor whenever the output goes high.
    Russell Drown
  • Hello Dustin,

    There is no Errnum for Motion Supervision.

    IF you have Advanced Rapid, you can generate and interrupt via the IError instruction. See examole:


    IError MOTION_ERRErrorId:=204, TYPE_ALL, intno1;
    If you have Collision Detection option, you can generate an interrupt using the Motion Supervision System Output. This output could be used with ISignalDO instruction.
    In the trap routine you can turn off your spindle.
    BR
    Jim Proulx
  • Thanks Russ and Jim,

    I went ahead and tried to create a trap routine watching "MotSupTrigg" however it keeps giving me a Refernce Error, saying that it's unkown data. Is there something I might be missing? This is what I have in the program pertaining to this trap routine.

     VAR intnum Collidedetect := 0;

    PROC Main()  

     CONNECT Collidedetect WITH CollCheck;
       ISignalDOSingle, MotSupTrigg, 1, Collidedetect;

    ENDPROC

    TRAP CollCheck
       Reset Rout_On;
       ExitCycle;
     ENDTRAP

    Also, I do have Collision Detection on this Robot.

    dh_custompak2008-8-11 19:7:54
    Dustin
  • Did you create a dedicated output signal mapped to the system output for MotionSuperVisionTriggered? If so, did you warm-start the robot after creating the signal?

    Russell Drown
  • Dustin,

    As Russ states. You need to assign a digital output to the System Output MotSupTrigg.

    Also remember that you can only Connect once.

    PROC Main() 

     CONNECT Collidedetect WITH CollCheck;
       ISignalDOSingle, doMotSupTrigg, 1, Collidedetect;


    ENDPROC

    TRAP CollCheck
       Reset Rout_On;
       IDelete Collidedetect;
       ExitCycle;
     ENDTRAP

     

    j_proulx2008-8-12 4:12:9