Trap routine is not called
cerminek
✭
in RobotStudio
Hi all,
we need to make an update to control sensors during one movement. The controler has RobotWare ver.5 and it has no multitasking. So we used Trap routine to detect if the sensor switches on during movent.
Here is the definition of trap:
CONNECT trpInsertionCheck WITH CheckInsSensorTrap;
ISignalDI IN_InsertionVirtualCheck,1,trpInsertionCheck;
the input IN_InsertionVirualCheck is virtual cross connected signal. It was tested and it works OK.
The trap routine itself is:
TRAP CheckInsSensorTrap
IF ( bCheckInsertSens=TRUE ) AND
( DI1= high OR DI1= high )
THEN
PulseDO \Plength:=0.5, Out_100;
ENDIF
RETURN;
ENDTRAP
Also here is the movement where the detection is needed:
IWatch trpInsertionCheck;
bCheckInsertSens:=TRUE;
MoveL RelTool(................................;
bCheckInsertSens := FALSE;
ISleep trpInsertionCheck;
Also there is no data in variable Trapdata in Program data/Used types. Trapdata is not shown in used variables...
So my question is: how can we detect the sensor during movement without TRAP or how can we setup the trap?
Thanks to all.
we need to make an update to control sensors during one movement. The controler has RobotWare ver.5 and it has no multitasking. So we used Trap routine to detect if the sensor switches on during movent.
Here is the definition of trap:
CONNECT trpInsertionCheck WITH CheckInsSensorTrap;
ISignalDI IN_InsertionVirtualCheck,1,trpInsertionCheck;
the input IN_InsertionVirualCheck is virtual cross connected signal. It was tested and it works OK.
The trap routine itself is:
TRAP CheckInsSensorTrap
IF ( bCheckInsertSens=TRUE ) AND
( DI1= high OR DI1= high )
THEN
PulseDO \Plength:=0.5, Out_100;
ENDIF
RETURN;
ENDTRAP
Also here is the movement where the detection is needed:
IWatch trpInsertionCheck;
bCheckInsertSens:=TRUE;
MoveL RelTool(................................;
bCheckInsertSens := FALSE;
ISleep trpInsertionCheck;
Also there is no data in variable Trapdata in Program data/Used types. Trapdata is not shown in used variables...
So my question is: how can we detect the sensor during movement without TRAP or how can we setup the trap?
Thanks to all.
0
Comments
-
You should be doing a search.Lee Justice0
-
Why ( DI1= high OR DI1= high ) in trap rutine ?Regards
Knud Erik Lindberg
Jorgensen Engineering0 -
Probably the reason why the trap isn't executed is that the program pointer is ahead of the motion so the ISleep and bCheckInsertSens:=FALSE are already executed even if the robot is still moving , so one way is to synchronize the motion and program pointer and one way to do that is to have a fine point in the move instruction.Per Svensson
Robotics and Vision Specialist
Consat Engineering0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings