[SOLVED] Error on joint 2

More
18 Jun 2021 12:51 #212331 by Simeng
Error on joint 2 was created by Simeng
Hi Im new to this forum, so first of sorry if this is in the wrong place.

im getting an "emc/task/taskintf.cc 947: Error on joint 2, command number 253" when im trying to jog on axis 1 (y)
i have
1 joint on axis x
2 joints on axis y,
1 joint on axis z.

im sending this command, which works on axis 0(x), but not on 1(y)
self.cmd.jog(linuxcnc.JOG_CONTINUOUS, False, axis, vel)

i have tried changing the 2nd paramenter between true and false, together with:
self.cmd.teleop_enable(1) between 0 and 1:

true,1 :Joint jog requested for undefined joint number=-1 (min=0,max=3) (x axis does not work)
true,0 :Cannot jog joint 1 because home_sequence is synchronized (-2) (x axis works)
False,1 :emc/task/taskintf.cc 947: Error on joint 2, command number 253 (x axis works)
False,0: Joint jog requested for undefined joint number=-1 (min=0,max=3) (x axis does not work)

False= cmd.jog(linuxcnc.JOG_CONTINUOUS, False, axis, vel)
0=cmd.teleop_enable(0)





Some of my INI file:
[KINS]
KINEMATICS = trivkins coordinates=xyyz kinstype=BOTH
#KINEMATICS = trivkins coordinates=xyyz
JOINTS = 4

# Trajectory planner section
[TRAJ]

# These two variables are a bit weird for gantry machines.
# The gantry machine that this sim config describes has only three axes (X,
# Y, and Z), but it uses two joints to implement the Y axis. The
# [TRAJ]AXES variable somewhat confusingly counts joints, not axes.
# Furthermore, the [TRAJ]COORDINATES variable only lists the axis names
# that are accepted in incoming G-code, and duplicate names here have no
# effect.
COORDINATES = X Y Y Z
#COORDINATES = X Y A Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 25.00
MAX_LINEAR_VELOCITY = 250.00
NO_FORCE_HOMING = 1
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl


[AXIS_X]
MAX_VELOCITY = 250
MAX_ACCELERATION = 500
MIN_LIMIT = 5
MAX_LIMIT = 710
TYPE=LINEAR

[AXIS_Y]
MAX_VELOCITY = 250
MAX_ACCELERATION = 500
MIN_LIMIT = 10
MAX_LIMIT = 730
TYPE=LINEAR

[AXIS_Z]
MAX_VELOCITY = 250
MAX_ACCELERATION = 500
MIN_LIMIT = 5
MAX_LIMIT = 250
TYPE=LINEAR

[AXIS_A]
MAX_VELOCITY = 250
MAX_ACCELERATION = 500
MIN_LIMIT = -200
MAX_LIMIT = 200



#********************
# Axis X
#********************
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 500
P = 0.25
I = 1.0
D = 0.0
FF0 = 0.0
FF1 = 0.00175
FF2 = 0.0
BIAS = 0.00244
DEADBAND = 0.0
MAX_OUTPUT = 1.0
ENCODER_SCALE = 10000
OUTPUT_SCALE = -1.0
OUTPUT_MIN_LIMIT = -1.0
OUTPUT_MAX_LIMIT = 1.0
MIN_LIMIT = 5.0
MAX_LIMIT = 710.0
HOME_OFFSET = 100
HOME_SEQUENCE = 1
HOME_ABSOLUTE_ENCODER = 2

#********************
# Axis Y
#********************
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 500
P = 0.30
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0017
FF2 = 0.0
BIAS = -0.0035
DEADBAND = 0.0
MAX_OUTPUT = 1.0
ENCODER_SCALE = -10000
OUTPUT_SCALE = 1.0
OUTPUT_MIN_LIMIT = -1.0
OUTPUT_MAX_LIMIT = 1.0
MIN_LIMIT = 10.0
MAX_LIMIT = 730.0
HOME_OFFSET = 100
HOME_SEQUENCE = -2
HOME_ABSOLUTE_ENCODER = 2

[JOINT_2]
TYPE = LINEAR
HOME = 0.1
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 500
P = 0.30
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0017
FF2 = 0.0
BIAS = -0.0035
DEADBAND = 0.0
MAX_OUTPUT = 1.0
ENCODER_SCALE = 10000
OUTPUT_SCALE = 1.0
OUTPUT_MIN_LIMIT = -1.0
OUTPUT_MAX_LIMIT = 1.0
MIN_LIMIT = 10.0
MAX_LIMIT = 730.0
HOME_OFFSET = 100
HOME_SEQUENCE = -2
HOME_ABSOLUTE_ENCODER = 2

#********************
# Axis Z
#********************
[JOINT_3]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 500
P = 0.4
I = 0.5
D = 0.0
FF0 = 0.0
FF1 = 0.00402
FF2 = 0.0
BIAS = 0.0025
DEADBAND = 0.0
MAX_OUTPUT = 1.0
ENCODER_SCALE = 10000
OUTPUT_SCALE = -1.0
OUTPUT_MIN_LIMIT = -1.0
OUTPUT_MAX_LIMIT = 1.0
MIN_LIMIT = 5.0
MAX_LIMIT = 250.0
HOME_OFFSET = 100
HOME_SEQUENCE = 0
HOME_ABSOLUTE_ENCODER = 2
The following user(s) said Thank You: Stormholt

Please Log in or Create an account to join the conversation.

More
18 Jun 2021 22:36 #212362 by andypugh
Replied by andypugh on topic Error on joint 2
Is the machine homed?

Please Log in or Create an account to join the conversation.

More
21 Jun 2021 08:32 - 21 Jun 2021 08:34 #212542 by Simeng
Replied by Simeng on topic Error on joint 2
Thanks for the response, sry about the late response form me.
when im doing a "status.homed" im getting a (1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0)
which in my mind indicates that it is homed on join 0-3, this is after a "status_poll".

so im pretty sure it's homed.
Just cutting it out in to slices, so that if im doing something wrong, then it is hopefully spotted ;)

jogging on axis y stille results in
"cannot jog joint 1 because home_sequence is synchronized (-2)"

I found the fault for the z axis, i have to jog on 3, which is the z axis join, but what i dont understand is in the python interface the documentation says i have to jog on the axis and not the joints, which i would then assume would be 2 (x 0, y 1, z 2) but i do have 2 y joints.

but that leads to the y axis issue, how do i then jog on 1 and 2 at the same time, i guess that is the problem ?
please do correct me if im wrong, im new to linuxcnc.
Last edit: 21 Jun 2021 08:34 by Simeng.
The following user(s) said Thank You: Stormholt

Please Log in or Create an account to join the conversation.

More
21 Jun 2021 10:51 - 21 Jun 2021 10:52 #212548 by Simeng
Replied by Simeng on topic Error on joint 2
Im now understanding what i did wrong with the jog, i have to the "teleop_enabled(1)"
and then jog by jog(linuxcnc.JOG_Continuous, False, 0-2, vel)
And not True, to jog by the axis.

But doing this comes with a new issue jogging on axis 1 (y) (2 joints):
"Joint 2 following error"
"emc/task/taskintf.cc 947:Error on joint 2, command number 230."


bot axis x and z (0 and 2) are working. (both with only 1 joint)
Last edit: 21 Jun 2021 10:52 by Simeng. Reason: added comment
The following user(s) said Thank You: Stormholt

Please Log in or Create an account to join the conversation.

More
21 Jun 2021 23:54 #212617 by andypugh
Replied by andypugh on topic Error on joint 2
Following error means that the joint.N.motor-pos-cmd and motor-pos-fb values differ by more than the f-error limit. This is more likely to be a HAL config problem than a code problem.

Can you halscope those signals and see what is going on?
The following user(s) said Thank You: Simeng

Please Log in or Create an account to join the conversation.

More
23 Jun 2021 08:55 - 23 Jun 2021 08:57 #212723 by Simeng
Replied by Simeng on topic [SOLVED] Error on joint 2
Thanks alot for your help, it turns out i made the following mistake, having 2 with the same name in my hal file.
resulting in no feedback of joint 2.
net Xpos joint.0.motor-pos-cmd => joint.0.motor-pos-fb ddt_x.in
net Ypos joint.1.motor-pos-cmd => joint.1.motor-pos-fb ddt_yl.in
net Ypos joint.2.motor-pos-cmd => joint.2.motor-pos-fb ddt_yr.in
net Zpos joint.3.motor-pos-cmd => joint.3.motor-pos-fb ddt_z.in

changed to:
YposL
YposR
Last edit: 23 Jun 2021 08:57 by Simeng.
The following user(s) said Thank You: Stormholt

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum