Follow Error - Open Loop Stepper Motor
- Project_Hopeless
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 200
- Thank you received: 10
21 Jan 2021 23:38 - 21 Jan 2021 23:39 #196161
by Project_Hopeless
Follow Error - Open Loop Stepper Motor was created by Project_Hopeless
I'm in the process of upgrading my stepper motors for more speed. I have already set up the joint and cartesian speed limits in LinuxCNC. I did not change any accel/deccel params.
The stepper motors are open loop. I'm running LinuxCNC 2.8 on Buster over ethernet to a Mesa 7i96e card.
When I jog an axis from the key board I almost immediately get a "follow error". The actual speed is no where near the max speed of even the old setup max.
any thoughts?
The stepper motors are open loop. I'm running LinuxCNC 2.8 on Buster over ethernet to a Mesa 7i96e card.
When I jog an axis from the key board I almost immediately get a "follow error". The actual speed is no where near the max speed of even the old setup max.
any thoughts?
Last edit: 21 Jan 2021 23:39 by Project_Hopeless.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7778
- Thank you received: 2075
21 Jan 2021 23:41 #196162
by cmorley
Replied by cmorley on topic Follow Error - Open Loop Stepper Motor
please post your config files - I'd guess the PID values are not right.
Please Log in or Create an account to join the conversation.
- Project_Hopeless
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 200
- Thank you received: 10
22 Jan 2021 00:36 #196165
by Project_Hopeless
Replied by Project_Hopeless on topic Follow Error - Open Loop Stepper Motor
To be honest I just used the defaults. This is a DIY machine at the low end of the speed spectrum.please post your config files - I'd guess the PID values are not right.
# This file was created with the 7i96 Wizard on Jun 27 2020 16:56:08
# Changes to most things are ok and will be read by the wizard
[EMC]
VERSION = 1.1
MACHINE = borg
DEBUG = 0x00000000
[HOSTMOT2]
DRIVER = hm2_eth
IPADDRESS = "10.10.10.10"
BOARD = 7i96
STEPGENS = 4
ENCODERS = 0
SSERIAL_PORT = 1
[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = COMMANDED
MAX_FEED_OVERRIDE = 1.2
CYCLE_TIME = 0.1
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 0
OPEN_FILE = ""
PROGRAM_PREFIX = /home/anto/linuxcnc/nc_files
PYVCP = borg.xml
[KINS]
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH
JOINTS = 4
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[RS274NGC]
PARAMETER_FILE = borg.var
[EMCMOT]
EMCMOT = motmod
SERVO_PERIOD = 2000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[TRAJ]
COORDINATES = XYYZ
LINEAR_UNITS = metric
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 50
[HAL]
HALFILE = borg.hal
HALFILE = io.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui.hal
HALUI = halui
[HALUI]
MDI_COMMAND = o<ztouch> call
MDI_COMMAND = o<sheetload> call
MDI_COMMAND = o<lubestroke> call
MDI_COMMAND = o<toolchg> call
MDI_COMMAND = o<tool_setter_test> call
[AXIS_X]
MIN_LIMIT = -.01
MAX_LIMIT = 1205
MAX_VELOCITY = 27.5 <is now 59.7>
MAX_ACCELERATION = 50
[AXIS_Y]
MIN_LIMIT = -.01
MAX_LIMIT = 1230
MAX_VELOCITY = 27.5 <is now 59.7>
MAX_ACCELERATION = 50
[AXIS_Z]
MIN_LIMIT = -165
MAX_LIMIT = .01
MAX_VELOCITY = 22 <is now 47.7>
MAX_ACCELERATION = 50
[JOINT_0]
AXIS = X
MIN_LIMIT = -.01
MAX_LIMIT = 1205
MAX_VELOCITY = 27.5 <is now 59.7>
MAX_ACCELERATION = 50
TYPE = LINEAR
SCALE = 80
STEPGEN_MAX_VEL = 33.0
STEPGEN_MAX_ACC = 60.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = -1
HOME_SEARCH_VEL = -10
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 2
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = True
[JOINT_1]
AXIS = Y
MIN_LIMIT = -.01
MAX_LIMIT = 1250
MAX_VELOCITY = 27.5 <is now 59.7>
MAX_ACCELERATION = 50
TYPE = LINEAR
SCALE = 80
STEPGEN_MAX_VEL = 33.0
STEPGEN_MAX_ACC = 60.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = -1
HOME_SEARCH_VEL = -10
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 1
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = True
[JOINT_2]
AXIS = Y
MIN_LIMIT = -.01
MAX_LIMIT = 1250
MAX_VELOCITY = 27.5 <is now 59.7>
MAX_ACCELERATION = 50
TYPE = LINEAR
SCALE = 80
STEPGEN_MAX_VEL = 33.0
STEPGEN_MAX_ACC = 60.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = -0.644
HOME_SEARCH_VEL = -10
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 1
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = True
[JOINT_3]
AXIS = Z
MIN_LIMIT = -165
MAX_LIMIT = .01
MAX_VELOCITY = 22 <is now 47.7>
MAX_ACCELERATION = 50
TYPE = LINEAR
SCALE = -100
STEPGEN_MAX_VEL = 26.4
STEPGEN_MAX_ACC = 60.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = .25
HOME_SEARCH_VEL = 10
HOME_LATCH_VEL = -2
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = True
[SPINDLE]
SPINDLE_TYPE = False
SCALE =
PWM_FREQUENCY = 20000
MAX_RPM =
MIN_RPM =
DEADBAND =
P =
I =
D =
FF0 =
FF1 =
FF2 =
BIAS =
MAX_ERROR =
[INPUTS]
# DO NOT change the input text
INPUT_0 = Min Limit & Home
INPUT_JOINT_0 = 0
INPUT_1 = Max Limit
INPUT_JOINT_1 = 0
INPUT_2 = Min Limit & Home
INPUT_JOINT_2 = 1
INPUT_3 = Max Limit
INPUT_JOINT_3 = 1
INPUT_4 = Min Limit & Home
INPUT_JOINT_4 = 2
INPUT_5 = Max Limit
INPUT_JOINT_5 = 2
INPUT_6 = Max Limit & Home
INPUT_JOINT_6 = 3
INPUT_7 = Min Limit
INPUT_JOINT_7 = 3
INPUT_8 = Select
INPUT_JOINT_8 = False
INPUT_9 = Probe
INPUT_JOINT_9 = False
INPUT_10 = E-Stop In
INPUT_JOINT_10 = False
[OUTPUTS]
# DO NOT change the output text
OUTPUT_0 = Spindle On
OUTPUT_1 = Select
OUTPUT_2 = Select
OUTPUT_3 = Select
OUTPUT_4 = Select
[OPTIONS]
MANUAL_TOOL_CHANGE = False
HALUI = True
PYVCP = True
GLADEVCP = True
LADDER = True
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17983
- Thank you received: 4834
22 Jan 2021 01:39 #196173
by PCW
Replied by PCW on topic Follow Error - Open Loop Stepper Motor
The FERROR limits are too small
Change these:
FERROR = 0.0051
MIN_FERROR = 0.0025
to
FERROR = 0.02
MIN_FERROR = 0.01
Change these:
FERROR = 0.0051
MIN_FERROR = 0.0025
to
FERROR = 0.02
MIN_FERROR = 0.01
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- Project_Hopeless
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 200
- Thank you received: 10
22 Jan 2021 20:03 - 22 Jan 2021 20:04 #196267
by Project_Hopeless
pncConfig generated a comment that the STEPGEN MAX_VEL and MAX_ACC should be 25% higher. In my file it is actually less than. Could that be the root cause?
Replied by Project_Hopeless on topic Follow Error - Open Loop Stepper Motor
Ok, so I made the changes and I still get the error. So I created a dummy config using pncConfig and compared to my original *.ini file.The FERROR limits are too small
Change these:
FERROR = 0.0051
MIN_FERROR = 0.0025
to
FERROR = 0.02
MIN_FERROR = 0.01
pncConfig generated a comment that the STEPGEN MAX_VEL and MAX_ACC should be 25% higher. In my file it is actually less than. Could that be the root cause?
-.01
MAX_LIMIT = 1205
MAX_VELOCITY = 27.5 <is now 59.7>
MAX_ACCELERATION = 50
TYPE = LINEAR
SCALE = 80
STEPGEN_MAX_VEL = 33.0
STEPGEN_MAX_ACC = 60.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = -1
HOME_SEARCH_VEL = -10
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 2
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = True
Last edit: 22 Jan 2021 20:04 by Project_Hopeless.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17983
- Thank you received: 4834
22 Jan 2021 20:31 #196271
by PCW
Replied by PCW on topic Follow Error - Open Loop Stepper Motor
I think the remaining issue is that the P term is 1000
but should be 500 for a 2 ms (20000000 ns) servo thread (
in addition to widening the ferror limits )
but should be 500 for a 2 ms (20000000 ns) servo thread (
in addition to widening the ferror limits )
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10810
- Thank you received: 3559
22 Jan 2021 21:00 #196274
by rodw
It would be important to fix these too. I have found relaxing thee a bit can remove following errors in the past so if they are too short, its bound to cause probems
Replied by rodw on topic Follow Error - Open Loop Stepper Motor
pncConfig generated a comment that the STEPGEN MAX_VEL and MAX_ACC should be 25% higher. In my file it is actually less than. Could that be the root cause?
It would be important to fix these too. I have found relaxing thee a bit can remove following errors in the past so if they are too short, its bound to cause probems
The following user(s) said Thank You: Project_Hopeless
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17983
- Thank you received: 4834
22 Jan 2021 21:14 #196281
by PCW
Replied by PCW on topic Follow Error - Open Loop Stepper Motor
I should add that the P value should be 1/Servo_thread_period
pncconf does this but if you change the servo thread period
you need to update the P values.
The effect of the P term is is this:
A P value of 1/Servo_thread_period means that any small deviation
in position found is corrected by the next servo period.
Lower P values are possible but do reduce the pulse stream
accuracy somewhat, larger values will result in ringing and overshoot
and values larger than 2/Servo_thread_period will result in oscillations
pncconf does this but if you change the servo thread period
you need to update the P values.
The effect of the P term is is this:
A P value of 1/Servo_thread_period means that any small deviation
in position found is corrected by the next servo period.
Lower P values are possible but do reduce the pulse stream
accuracy somewhat, larger values will result in ringing and overshoot
and values larger than 2/Servo_thread_period will result in oscillations
The following user(s) said Thank You: Project_Hopeless
Please Log in or Create an account to join the conversation.
- Project_Hopeless
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 200
- Thank you received: 10
22 Jan 2021 21:48 #196285
by Project_Hopeless
Replied by Project_Hopeless on topic Follow Error - Open Loop Stepper Motor
All is good now!
The problem was STEPGEN_MAX_VEL and STEPGEN_MAX_ACC values set less than the MAX_ values.
The problem was STEPGEN_MAX_VEL and STEPGEN_MAX_ACC values set less than the MAX_ values.
The following user(s) said Thank You: rodw, thefabricator03
Please Log in or Create an account to join the conversation.
Time to create page: 0.078 seconds