Trap Routines
Ercan
✭
in RobotStudio
Hello everyone,
I have some questions for you. I want to learn somethng about trap routines. For exaple Why I must use trap routiens? or How can I use that? I need basic samples about this. I found a module aboot Trap routines. But I didnt understand well. I hope you cam help me. Thanks for all
MODULE Warning
VAR intnum nTimeInt_1;
VAR intnum nTimeInt_2;
PERS bool sim_test:=FALSE;
PERS bool OpStart:=TRUE;
PROC main()
!===============================================================
!TIME TRAP 1 CONNECTION
!===============================================================
IDelete nTimeInt_1;
CONNECT nTimeInt_1 WITH TimeTrap1;
ITimer 1,nTimeInt_1;
!===============================================================
!TIME TRAP 2 CONNECTION
!===============================================================
IDelete nTimeInt_2;
CONNECT nTimeInt_2 WITH TimeTrap2;
ITimer 0.5,nTimeInt_2;
WHILE TRUE DO
CheckErrorStatus;
SystemStatus;
IF OpStart=FALSE THEN
IF DOutput(bFlash_1)=1 THEN
Set doStReadyLamp;
ELSE
Reset doStReadyLamp;
ENDIF
ELSE
Set doStReadyLamp;
ENDIF
WaitTime 0.3;
ENDWHILE
ENDPROC
0
Comments
-
The manual RAPID Overview that is available in RobotStudio provides a good starting point.
TRAP routines are convenient when you want to interrupt the program flow to act on some external event.
/Henrik
Henrik Berlin
ABB1 -
Thanks Henrik for your informations0
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)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings