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
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 intMotSupTrigThen 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
ENDTRAPHope this will give you a hint how to use trap routines
Per Svensson
Robotics and Vision Specialist
Consat Engineering1 -
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
Ken0 -
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:16Russell Drown1
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings