I have changed my code by the tip of DenisCa. After each command for a move i save the move position and if necessary Ib change the E6POS to E6AXIS. Now the robot moves like it should.
Posts by MathiasN
-
-
Yes, When i leave out the Continue before the $Axis_Act everything works fine but this makes the program stop the robot shortly and cost cycle time.
$AXIS_FOR does not always give me a good position for the move i make. If i get the $Axis_For good my problem should be solved.
-
This can I find in the manual about $Axis_ACT:
3.31 $AXIS_ACT
Description
Current axis-specific setpoint position of the robot
The variable of structure type E6AXIS contains the current axis angles or
axis positions.
• A1 … A6: Setpoint position of the robot axes in [°] or [mm]
• E1 … E6: Setpoint position of the external axes in [°] or [mm]
In the robot program, the variable triggers an advance run stop.
So i think this is the stop of the pointer. Also when i'm not putting CONTINUE before $Axis_ACT everything works fine.
This is the code from the function MoveJ:
DEF MoveJ (Point :IN,Speed :IN ,APO :IN ,Tool :IN ,Base :IN )
DECL E6AXIS Point
Int Speed
int APO
int Tool
Int Base
$BWDSTART = FALSE
PDAT_ACT=PDEFAULT
FDAT_ACT=FDEFAULT
PDAT_ACT.Vel=Speed;
PDAT_ACT.APO_DIST=APO;
FDAT_ACT.TOOL_NO=Tool
FDAT_ACT.base_NO=Base
BAS(#PTP_PARAMS, Speed)
SET_CD_PARAMS (0)
if APO>0 then
ptp Point c_dis
else
ptp Point
endif
END
-
Hello,
I 'm starting up my first Kuka robot (KRC4 -8.5.8) and have some trouble with the function $Axis_.
I have tried different things but i don't see the logic when it goes good and bad.
Shortly, I'm trying to get the last used robot Axis target point to use for calculations. When I use this code everything works fine:
XCurrentposition=$axis_ACT
XHomebetween.A1=XCurrentposition.a1
MoveJ(XHomeBetween, speedjointH, cnt100, T1, B1)
With the above code everything goes like it should but i get a program stop on the function $axis_ACT and i can not make a round movement . So I put a CONTINUE before the function and replace with $axis_FOR.
Now I thought this should work but the axis_for is not always filled in with the correct position. The $advance is on 1.
Is $axis_FOR always filled in by PTP, SPTP, LIN, SLIN, CIRC?
How can i do this without program stop?
Just if anyone asks what I do with my strange way of making the robot move. I have made some program's like moveJ, moveL and MovePTP. This is just because i like to change program's on my computer and don't like the way of inline form's KUKA uses.