Tool Change Support
I tried out the readymade Tool Change Support on our new robot. They use arrays for storing the different workobjects for the toolstands.
I get this error when trying to run the code:
41442: Reference ErrorDescription
Task: T_ROB1.The reference in argument \WObj is not an entire persistent variable.Program ref: /TCUSER/GoToTcHomePos/MoveAbsJ/165.
Actions
It is not possible to use record component or array element in arg. \WObj. It is only possible to use entire persistent variables for Tool, WObj or Load in any motion instruction.
Saying that wobj's cannot be arrays? Why have ABB made a toolchange routine with he toolstands as arrays?
Here is what ABB do in the routine:
! Work object data for each tool stand
PERS wobjdata TcStandWobj{TC_MAX_STANDS} := [[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]],
[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]],
[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]],
[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]];
Is this not possible?
Comments
-
No idea -- but do you think the programmer expected the array data would be copied into a "PERS wobjdata currentWobj" for use of the work object instead of using the array data directly?
0 -
soup said:No idea -- but do you think the programmer expected the array data would be copied into a "PERS wobjdata currentWobj" for use of the work object instead of using the array data directly?
No I do not hink that what you are thinking is the reason. Here is a snippet from their code, where they do a movement.! Moves robot to tool stand position, ready position
PROC GoToTcReadyPos(standno StandPos)
TcCurrentTool := TcTool{StandPos};
! Check the tooldata
TcCheckTool TcCurrentTool;
MoveL RelTool(TcLockPos{StandPos},0,0,TcLockPosOffset{StandPos}),TcMoveSpeed,z10,TcCurrentTool\WObj:=TcStandWobj{StandPos};
ENDPROC
I would think ABB meant for us to use this out of the box, as stated in the manual.
I have worked around by altering the code to copy the TcStandWobj{I} into a temporary Persistent wobj, but this feels, and according to manual are, wrong.Is it possible to use it as ABB coded it?
Any ideas?
Post edited by thv on0 -
Not sure work objects can't be stored in arrays -- I'd suggest posting just enough of the code to allow others to easily reproduce the error you're seeing.
0 -
Ive came across similar things before, For some reason Rapid wont let you use an Array WobJ on the current movement instruction. The best solution is to use a "WorkObjectCurrent".
So perhaps try this:FUNC wobjdata CurrWobj()!wTemp:=TcStandWobj{StandPos};RETURN wTemp;!ENDFUNC
and then in your main execution insert:
!ASSIGN WORK OBJECTwCurrent:=CurrWobj();
Then use wCurrent which is of type PERS as your current Wobj.
Should work if i understand what you are trying to do correctly0 -
Ive came across similar things before, For some reason Rapid wont let you use an Array WobJ on the current movement instruction. The best solution is to use a "WorkObjectCurrent".
So perhaps try this:FUNC wobjdata CurrWobj()!wTemp:=TcStandWobj{StandPos};RETURN wTemp;!ENDFUNC
and then in your main execution insert:
!ASSIGN WORK OBJECTwCurrent:=CurrWobj();
Then use wCurrent which is of type PERS as your current Wobj.
Should work if i understand what you are trying to do correctly1
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
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings