TRAP routine start is delayed
egor
✭
Hi, I want the TRAP routine to start right after TriggL instruction. But I don't want to change z50 to fine or use Waittime instruction.
Is it possible to do something?
...
Is it possible to do something?
...
TriggCheckIO Trig_Vac1_Check,0,di_Vac1_1,EQ,1\StopMove,VacInterrupt;
TriggL pAboveConv,v300,Trig_Vac1_Check,z50,VacuumGrip;
!TRAP routine must start here!
IF bricks_in_frame=1 OR THEN
DropWObj wobj_cnv1;
TPWrite "Rob1 dropped wobj";
ENDIF
IF Rob1_Pick_Int=FALSE THEN
!TRAP routine starting here in fact!
WaitSyncTask\InPos,Rob1_Ready,task_list;
TPWrite "ROB1 WaitSyncTask";
ENDIF
0
Comments
-
IF bricks_in_frame=1 OR THENDropWObj wobj_cnv1;TPWrite "Rob1 dropped wobj";ENDIF
OR what? This seems incomplete.Lee Justice0 -
Check out ISignalDO in the RAPID instruction manual.
...CONNECT sig1int WITH iroutine1;ISignalDO do_ForceTrap, 1, sig1int;IF Rob1_Pick_Int=FALSE THEN
!TRAP routine starting here in fact!Set do_ForceTrapWaitSyncTask\InPos,Rob1_Ready,task_list;TPWrite "ROB1 WaitSyncTask";ENDIF0 -
So the reason why I asked is this: put a WaitUntil condition 1 OR condition 2 OR condition 3 first.Lee Justice0
-
I need to review MORE closely (especially cutting and pasting) before posting and heading away.
Trying again.
PROC InitTrap()
IDelete sig1int;
CONNECT sig1int WITH iroutine1;
ISignalDO do_ForceTrap, 1, sig1int;
ENDPROC...
+++++++++++++++++++++++++++++++++++++++++
InitTrap;
...!TRAP routine must start here!
Set do_ForceTrap;IF bricks_in_frame=1 OR THENDropWObj wobj_cnv1;TPWrite "Rob1 dropped wobj";ENDIFIF Rob1_Pick_Int=FALSE THEN!TRAP routine starting here in fact!WaitSyncTask\InPos,Rob1_Ready,task_list;TPWrite "ROB1 WaitSyncTask";ENDIF1 -
SomeTekk, thanks for you advice! I found my own way, using second trigger <Trig_Pos_Reached>, which is checked position. If position has not been reached, the program pointer doesn't move further:IDelete VacInt;CONNECT VacInt WITH TrapPick;...!Turning on vacuum before pick positionTriggIO Trig_Vac_ON,0\Start\DOp:=do_Valve_Rob1_1_on,1;TriggL RelTool(RelTool(Offs(pPick,x_brick+26,y_brick,z_brick),0,0,0\Rz:=rot_z_brick+flip_rot_R1),0,0,0\Rx:=tilt_x_brick\Ry:=tilt_y_brick),
v100,Trig_Vac_ON,z0\Inpos:=fllwtime0_5,VacuumGrip\WObj:=wobj_cnv1;!Pick positionMoveL RelTool(RelTool(Offs(pPick,x_brick+26,y_brick,z_brick+50),0,0,0\Rz:=rot_z_brick+flip_rot_R1),0,0,0\Rx:=tilt_x_brick\Ry:=tilt_y_brick),
v150,z10,VacuumGrip\WObj:=wobj_cnv1;!Check vacuumTriggCheckIO Trig_Vac_Check,0,di_Vac1_1,EQ,1\StopMove,VacInt;!The signal <do_PosReached> is set to 1 when point "pAboveConv" is reachedTriggIO Trig_Pos_Reached,0\DOp:=do_PosReached,1;TriggL pAboveConv,v300,Trig_Vac_Check\T2:=Trig_Pos_Reached,z50,VacuumGrip;!If do_PosReached = 0 it is mean that TRAP routine will run.WaitDO do_PosReached,1;SetDO do_PosReached,0;!TRAP routine is running hereIF Rob1_PickInt=FALSE THENIF bricks_in_frame=1 THENDropWObj wobj_cnv1;TPWrite "Rob1 dropped wobj";ENDIFWaitSyncTask\InPos,Rob1_Ready,task_list;TPWrite "ROB1 WaitSyncTask";ENDIF1
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
- 314 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 794 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings