I have a 6640 sitting on a 5 meter track. Now I try to figure out on what track position my new robtarget will be. Since the workobject I work in can be rotated over all axis I can not assume anymore that the X-value of my robtarget will be the same as on the track. So I need a function like the one I wrote blow.
This works fine to the point where the robot can not reach the new point anymore. In this case CalcJointT will bring a “out of reach” error.
How can I solve this problem when the new target further away as the robots reach?
Thanks in advance!
PROC PosEx_updateTrackPos(INOUT robtarget newTarget)
VAR jointtarget jTarget;
VAR robtarget rTarget;
jTarget:=CalcJointT(newTarget,Endmill40mm\WObj:=wo_logholderRight);
rTarget:=CalcRobT(jTarget,Endmill40mm\WObj:=wo_track);
newTarget.extax.eax_a:=rTarget.trans.x;
ENDPROC
Have you tried using an error handler in your Routine?
PROC PosEx_updateTrackPos(INOUT robtarget newTarget)
VAR jointtarget jTarget;
VAR robtarget rTarget;
jTarget:=CalcJointT(newTarget,Endmill40mm\WObj:=wo_logholderRight);
rTarget:=CalcRobT(jTarget,Endmill40mm\WObj:=wo_track);
newTarget.extax.eax_a:=rTarget.trans.x;
ERROR
IF ERRNO = ERR_OUTSIDE_REACH THEN
! Code to handle positions out of reach goes here.
ENDIF
ENDPROC
I do have both cases. And yes, it is an abb track.
I have up to16’ long parts I have to work on both ends and also over the length. I have a few workarounds but not happy with.
Question is: my userobject is moved and rotated over all three axis. So is my workobject. Now the x axis in my user object is not necessarily paralell to the track. So i need to figure out where thr robtarget is in perspective of my track.
No, the work piece is stationary. It is a robot on a 5 meter track.
Any robtarget is within a object frame and this object frame is in a user frame. Both - user and object frame can be rotated and moved over all 3 axis.
The track as an absolut value and is not bound to the user/object frame. So how can I know where to place the track when my next robtarget is out of reach?