# Move only axis 6

cantabria
hello

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)

• cantabria
Hello!!
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?

Greetings!
• United States ✭✭✭
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.
Lee Justice
• cantabria
Hello!

Now i have the jointtarget that i need to modify axis 6
So how can i add a num variable in the axis 6 of that jointtarget?

I am asking for solutions that i know in AS language from kawasaki but the abb world is new for me

Thx!!
• United States ✭✭✭
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.
Lee Justice
• cantabria
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?

Thanks!!
• United States ✭✭✭
I am not fully understanding what you need.
Lee Justice
• cantabria
lemster68 said:
I am not fully understanding what you need.
i need to move only axis 6 the value of a num variable

i have the actual position of all axis in a jointtarget
PERS jointtarget pAlmacen:=[[0,24,33,0,18,14],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

i have a calculated num variable with an angle value
PERS num nAng:=-10.9183;

so i need change the value of the axis 6 of pAlmacen from "14" to "24.9183" {14-(-10.9183)}

for a robtarget is something like this
p13.trans.x:=n12MemX;

how can i change the value of "rax_6" in a jointtarget?
• United States ✭✭✭
Ah, I see.  The syntax.  Like so:  MyJointTartget.robax.rax_6:=MyNumVariable;

And, just so you will know how to figure these things out, look at this:

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.
Lee Justice
• cantabria
thxxxxxxxx
i was trying this: pAlmacen.rax_6:=pAlmacen.rax_6+nAng;

it showed my a mistake but i was near from the solution

lot of thx!!

• Brazil
Good Morning...

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

<CODE>
jtCalcPosL:=CalcJointT(RelTool(P_HOME,paramX,paramY,paramZ\Rx:=paramRX\Ry:=paramRY\Rz:=paramRZ),tool0\WObj:=wobj0);
jtCalcPosL.robax.rax_1:='paramRotAx1;
jtCalcPosL.robax.rax_6:=jtCalcPosL.robax.rax_6+jtCalcPosL.robax.rax_1;
<CODE>

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:
<CODE>
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;

RETURN jtCalcPosL
ENDFUNC
<CODE>

Hope the contribution helps.
• Germany
Thanks for your solution. I am not sure why you are adding Axis 1 to Axis 6.

It also would help more to understand problem and solution, when you show it in 3D, maybe just a simple mockup.

Other than that, keep up the good work.
• Brazil
Hello...

I added axis 1 to 6 because in this situation I want to move axis 1 without the claw moving in relation to the base, that's all.

Hug.