I am developing an application to take tables from a stack and feed a machine
first of all I have to locate the position of the stack to align the robot
I have already managed to locate the position using “SearchL” and I have calculated with “Atan” the angle that I have to rotate axis 6 so that the tool is parallel to the stack
How can I move only the 6 axis the degrees that I have calculated?
I have done this operation several times with kawasaki robots using the “Drive” instruction but in the list of rapid instructions I have not found anything that works for me (or I have not seen it)
I have managed to solve it using the argument “RelTool” in a move instruction
In any case, I keep my original question in case I need it in this or another application: what instruction should I use to move a single axis the amount of degrees defined by a numerical variable?
I would use the function CJointT to read in the current joint angles into a JointTarget variable. Then add or subtract the required degrees to the component of that variable which represents axis 6. Then MoveAbsJ to that target.
I don’t think that you can use another variable as a component of another variable. You would have to make assignments of that component to manipulate its value.
I have stored the robot position in a jointtarget with the “CJointT” instruction.
The value of axis 6 is, for example, “14º” and I need to add a value stored in a variable type “num” to the value captured of axis 6 of the current position of the robot.
So if the value of my variable is “11” I need to modify the value of axis 6 by adding (or subtracting) to get “14 + 11”.
I have already achieved this by using “MoveJ RelTool” with “tool0” since it only wants to move axis 6.
But maybe at another time I need to move another axis with which this instruction would no longer serve me.
I hope I have explained myself in the best possible way.
Any solution?
I viewed in the program data window one of my jointtargets. See the name followed by robax:, which is then broken down into the component for each axis value.
I know it’s been a while since this post has been resolved, but if it helps in any way, here’s a tip…
To obtain a jointtarget I use a position as a base, because according to your case the objects, “the tables”, can have their position changed by some parameter (in my cases I open this option to the operator - this minimizes the calls), and so the positions of the axes can change.
One position the operator cannot change is the ‘P_HOME’ position, so I use it to calculate the joint position…
Thus, I take a specific position as the origin and when the object changes its position, for example, the operator can inform the object’s displacement through the parameters and the robot corrects its movements.
With this solution it is not necessary to calculate the angle at which the tool must be to pick up the object.
Ex:
FUNC jointtarget rotate (num paramX, num paramY, num paramZ\num paramRX\num paramRY\num paramRZ)
VAR jointtarget jtCalcPosL;
jtCalcPosL:=CalcJointT(RelTool(P_HOME,0,0,0\Rx:=0\Ry:=0\Rz:=24),tool0\WObj:=wobj0);
jtCalcPosL.robax.rax_1:='paramRotAx1;
jtCalcPosL.robax.rax_6:=jtCalcPosL.robax.rax_6+jtCalcPosL.robax.rax_1;