khewes
Member
Hey everyone, I know this isnt exactly a PLC question but this is my fav forum cuz all yall is so helpful and responsive.
I am having trouble calling a trap routine in robot studio.
In my header -->
VAR intnum trap_1:=0;
in my trap -->
TRAP Part_Missing_Trap
TPReadFK answer, "Part Not Found on Tray","Retry Grab", "Skip Part", "Go Home", "", "";
!write message, give option to skip, retry, or go home
IDELETE trap_1;
vdiInterrupt1:=0;
CONNECT trap_1 WITH Part_Missing_Trap;
ISignalDI vdiInterrupt1,1,trap_1;
rPartMissing;
ENDTRAP
in my main-->
PROC main()
!MoveJ pHome,v200,fine,tGripperA;
IDELETE trap_1;
CONNECT trap_1 WITH Part_Missing_Trap;
ISignalDI vdiInterrupt1,1,trap_1;
rGoHome;....
where i try to call my trap-->
PROC rPartCheck()
!check to see which gripper is active
IF diGripA_Open = 1 THEN
TPwrite"debug inside partcheck r";
waitTime 10.0;
vdiInterrupt1:=1; !how to call trap?
ENDIF
WaitTime 5.0;
ENDPROC
The underlined line is where my code gets stuck
"Program execution error"
Thanks for your time,
Regards, Kris
I am having trouble calling a trap routine in robot studio.
In my header -->
VAR intnum trap_1:=0;
in my trap -->
TRAP Part_Missing_Trap
TPReadFK answer, "Part Not Found on Tray","Retry Grab", "Skip Part", "Go Home", "", "";
!write message, give option to skip, retry, or go home
IDELETE trap_1;
vdiInterrupt1:=0;
CONNECT trap_1 WITH Part_Missing_Trap;
ISignalDI vdiInterrupt1,1,trap_1;
rPartMissing;
ENDTRAP
in my main-->
PROC main()
!MoveJ pHome,v200,fine,tGripperA;
IDELETE trap_1;
CONNECT trap_1 WITH Part_Missing_Trap;
ISignalDI vdiInterrupt1,1,trap_1;
rGoHome;....
where i try to call my trap-->
PROC rPartCheck()
!check to see which gripper is active
IF diGripA_Open = 1 THEN
TPwrite"debug inside partcheck r";
waitTime 10.0;
vdiInterrupt1:=1; !how to call trap?
ENDIF
WaitTime 5.0;
ENDPROC
The underlined line is where my code gets stuck
"Program execution error"
Thanks for your time,
Regards, Kris