RobotStudio event

Robtarget translation betwee workobjects

Options
Hello all,

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)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VAR jointtarget jTarget;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VAR robtarget rTarget;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jTarget:=CalcJointT(newTarget,Endmill40mm\WObj:=wo_logholderRight);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rTarget:=CalcRobT(jTarget,Endmill40mm\WObj:=wo_track);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newTarget.extax.eax_a:=rTarget.trans.x;<br><br>&nbsp;&nbsp;&nbsp; ENDPROC


Comments

  • Slokko
    Options
    Have you tried using an error handler in your Routine?
    </code><code>PROC PosEx_updateTrackPos(INOUT robtarget newTarget)<br><br>   VAR jointtarget jTarget;<br>   VAR robtarget rTarget;<br><br>   jTarget:=CalcJointT(newTarget,Endmill40mm\WObj:=wo_logholderRight);<br>   rTarget:=CalcRobT(jTarget,Endmill40mm\WObj:=wo_track);<br><br>   newTarget.extax.eax_a:=rTarget.trans.x;<br>  ERROR<br>    IF ERRNO = ERR_OUTSIDE_REACH THEN<br>      ! Code to handle positions out of reach goes here.<br>      <br>      <br>    ENDIF<br>ENDPROC


  • Thank you, Slokko

    but this doesn't solve my problem. I still need the x value to make a decision where i will place the track BEFORE I move to the robtarget..
  • graemepaulin
    Options

    Is this an ABB track?

    Do you want to have coordinated motion (that is the robot works as the track moves) or is the robot stopped while the track moves?

  • 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.

    Thanks for helping me.

  • graemepaulin
    Options
    Please explain what you mean by moved and rotated by all 3 axis? Is the work piece being rotated by a positioner?
  • 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?