Set workobject and tool in jogging window using RAPID.
<P>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.</P>
<P> </P>
<P>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. </P>
<P> </P>
<P><BR><FONT face="Courier New">!### Set tool as t1 ###<BR>!### and Work object as wA ###<BR>!### by using RAPID here ###<BR> MoveL pA10,v100,z1,t1\WObj:=wA;<BR> MoveL pA20,v100,z1,t1\WObj:=wA;<BR> <BR>!### Set tool as t1 ###<BR>!### and Work object as wB ###<BR>!### by using RAPID here ###<BR> MoveL pB10,v100,z1,t1\WObj:=wB;<BR> MoveL pB20,v100,z1,t1\WObj:=wB;<BR> <BR>!### Set tool as t2 ###<BR>!### by using RAPID here ###<BR> MoveL p10,v100,z1,t2;<BR> <BR>!### Set tool as t3 ###<BR>!### by using RAPID here ###<BR> MoveL p20,v100,z1,t3;</FONT></P>
<P> </P>
Comments
-
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.
0 -
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
0 -
You can use the instruction "SetSysData" to modify the current selected wobj and tool. Like this:
SetSysData t1;
SetSysData wa;0 -
You can use the instruction "SetSysData" to modify the current selected wobj and tool. Like this:
SetSysData t1;
SetSysData wa;0 -
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;
�0
Categories
- All Categories
- 5.5K RobotStudio
- 396 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