RobotStudio event

Event routines

Hi,

I am trying to make an event routine for my ABB robot.

I want it to capture the MotSupTrig signal when a motion supervision occurs so it can run a routine and recover from a crash.

I don't have any experience using event routines.

Can someone please give me an example on how I would do this.

 

Thanks in advance

Ken

Ken

Comments

  • Hi
    Here is an example how you could do it.
    I assume you have defined a do signal for the system output MotSupTrig.

    First declare a intnum
    VAR intnum intMotSupTrig

    Then you need to hook up the trigg with the trap routine (something like this).

    IDelete intMotSupTrig;
    Connect intMotSupTrig WITH MotionError;
    ISignalDO doTriggSignal,1,intMotSupTrig;

    I use the IDelete to delete the interrupt before I create it because if it allready exist you will get an error. The doTriggSignal is the signal that triggs the interrupt and it will trigg when the signal goes to "1".

    The you add a trap routine where you have your recovery code

    TRAP MotionError
    ! Do your stuff here
    ENDTRAP

    Hope this will give you a hint how to use trap routines

    Per Svensson
    Robotics and Vision Specialist
    Consat Engineering
  • Thanks for your help.

    Is there any way you can use an event routine instead of a trap routine or is using a trap routine the preffered way to capture it?

    Thanks again

    Ken

    Ken
  • The event routine concept allows one to configure the system to execute user-defined code when specific system events, i.e. PowerOn, Startup, etc. occur. The events themselves cannot be defined.

    Interrupts and trap routines allow the user to handle data/value change events from user-level IO or data, rather than system-level events.

    RussD2007-2-27 3:35:16
    Russell Drown