Set workobject and tool in jogging window using RAPID.

Is there a command that sets the workobject and tool using RAPID?

the problem I am having is; I have a routine that contains all my robtargets in a list of MoveL commands, I use this routine to teach the robtargets. There ia a variety of tools and workobjects used, meaning if I ModPos one position with toolA I cant mod pos another position with toolB, untill I switch to the jogging window, change the tool and switch back.

I dont want to do all this switching back and forth on the teach pendant. I kind of want my code to look like this.

!### Set tool as t1 ###
!### and Work object as wA ###
!### by using RAPID here ###
MoveL pA10,v100,z1,t1\WObj:=wA;
MoveL pA20,v100,z1,t1\WObj:=wA;

!### Set tool as t1 ###
!### and Work object as wB ###
!### by using RAPID here ###
MoveL pB10,v100,z1,t1\WObj:=wB;
MoveL pB20,v100,z1,t1\WObj:=wB;

!### Set tool as t2 ###
!### by using RAPID here ###
MoveL p10,v100,z1,t2;

!### Set tool as t3 ###
!### by using RAPID here ###
MoveL p20,v100,z1,t3;

I hope i’m understanding what you need… why dont you create “Temp data” eg. TempTool, TempObj, etc, and you can set the temp data equal to whatever you need at the beginning of the routine using registers or inputs, whatever you need..

Eg.

IF reg1=1 THEN

tempTool:=Tool1

TempObj:=Obj1

ELSEIF reg1=2 THEN

tempTool:=Tool2

TempObj:=Obj2

ENDIF

MoveL pA10,v100,z1,tempTool\TempObj;

MoveLpB10,v100,z1,tempTool\TempObj;

etc. etc.

Actually Liam I think i understand what you need better after looking at my code. You need to change work objects and tools during program execution correct?

you should be able to accomplish the same thing without the IF, THEN statement if you know what tools/objects are going to be used ahead of time.., if you don’t have a set series of objects you could base an IF,THEN statement off of some inputs to the controller.

!Set tool as t1

!and Work object as wA

TempTool:=t1;

TempObj:=wA;

MoveL pA10,v100,z1,TempTool\WObj:=TempObj;

MoveL pA20,v100,z1,TempTool\WObj:=TempObj;

!Set tool as t1 and Work object as wB by using RAPID here

TempTool:=t1;

TempObj:=wB;

MoveL pB10,v100,z1,TempTool\WObj:=TempObj;

MoveL pB20,v100,z1,TempTool\WObj:=TempObj;

! Set tool as t2 by using RAPID here

TempTool:=t2;

MoveL p10,v100,z1,TempTool\WObj:=TempObj;

! Set tool as t3 by using RAPID here

TempTool:=t3;

MoveL p20,v100,z1,TempTool\WObj:=TempObj;

Hopefully this gets you where you need to go! Good luck

-Matt

You can use the instruction “SetSysData” to modify the current selected wobj and tool. Like this:

SetSysData t1;

SetSysData wa;

You can use the instruction “SetSysData” to modify the current selected wobj and tool. Like this:

SetSysData t1;

SetSysData wa;

another option for this is:
pCurrentPosition:=CRobT(\Tool:=tToolYouWantActive\WObj:=wobjYouWantActive);
MoveL pCurrentPosition,v200,fine,tToolYouWantActive\Wobj:=wobjYouWantActive;

by making the move to the current position of the robot it sets the Tool and Work object active in the Jog Window.

You can then jog the robot to the new position and teach it.

MoveL pPositionYouWantToChange,v200,fine,tToolYouWantActive\Wobj:=wobjYouWantActive;