Pico USC Following Error
- cprhodin
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
26 Apr 2021 05:13 #207074
by cprhodin
Pico USC Following Error was created by cprhodin
I'm using a Pico USC to drive my milling machine. The board is configured to use the internal feedback, not external encoders. In this configuration I'm getting following errors. What can cause this? Is there something that needs tuning?
Chris
Chris
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20183
- Thank you received: 6870
26 Apr 2021 10:43 #207094
by tommylight
Replied by tommylight on topic Pico USC Following Error
Uploading the config files (hal and ini) would help.
Please Log in or Create an account to join the conversation.
- jmelson
- Offline
- Moderator
-
Less
More
- Posts: 817
- Thank you received: 157
26 Apr 2021 15:24 #207128
by jmelson
univstep_motion.hal :
setp ppmc.0.stepgen.00-03.pulse-width-ns 3500
setp ppmc.0.stepgen.00-03.pulse-space-min-ns 3500
# setup time is set to 1 uS
setp ppmc.0.stepgen.00-03.setup-time-ns 1000
If these times are excessive for your stepper motor driver, you can reduce them.
Then, in the .ini file, there are settings for the max velocity for the entire system in the [TRAJ] section and
then for individual axes and joints in the [AXIS_<letter>] and [JOINT_<number>] sections. You likely need
to up those numbers. Note that they are in user units per SECOND.
Finally, there are PID settings in the [JOINT_n] sections, but hopefully you will not have to touch those.
Jon
Replied by jmelson on topic Pico USC Following Error
The step generator has a maximum step rate determined by these parameters in the configs fileI'm using a Pico USC to drive my milling machine. The board is configured to use the internal feedback, not external encoders. In this configuration I'm getting following errors. What can cause this? Is there something that needs tuning?
Chris
univstep_motion.hal :
setp ppmc.0.stepgen.00-03.pulse-width-ns 3500
setp ppmc.0.stepgen.00-03.pulse-space-min-ns 3500
# setup time is set to 1 uS
setp ppmc.0.stepgen.00-03.setup-time-ns 1000
If these times are excessive for your stepper motor driver, you can reduce them.
Then, in the .ini file, there are settings for the max velocity for the entire system in the [TRAJ] section and
then for individual axes and joints in the [AXIS_<letter>] and [JOINT_<number>] sections. You likely need
to up those numbers. Note that they are in user units per SECOND.
Finally, there are PID settings in the [JOINT_n] sections, but hopefully you will not have to touch those.
Jon
Please Log in or Create an account to join the conversation.
- cprhodin
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
27 Apr 2021 10:06 #207206
by cprhodin
Replied by cprhodin on topic Pico USC Following Error
The configuration files.
I'm using an AC servo that accepts quadrature step inputs at up to 4 MHz. This weekend I reduced the resolution to 0.001 inches per step to limit the step frequency and make the steps visible on the ball screw position dial.
I'm using an AC servo that accepts quadrature step inputs at up to 4 MHz. This weekend I reduced the resolution to 0.001 inches per step to limit the step frequency and make the steps visible on the ball screw position dial.
Please Log in or Create an account to join the conversation.
- cprhodin
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
04 May 2021 01:40 #207778
by cprhodin
Replied by cprhodin on topic Pico USC Following Error
I've continued to work on this, trying different resolutions and experimenting with LinuxCNC settings. I've increased the following error window to 1.0" so I can observe the behavior without actually causing an error.
I'm still getting a following error at ~80 IPM (with my current resolution of 0.0001"). I noticed that this error only occurs on long moves and is associated with an audible thunk at the end of a move. Looking at the velocity on HAL Scope I can see short moves have linear velocity ramps and long move ramp up normally and ramp down sharply with a decay shape. What it looks like is LinuxCNC is requesting a velocity higher than the USC is willing to deliver. I've been checking the LinuxCNC settings but can't figure out where this limit is being imposed. I've increased every velocity (searched for "VEL") in the INI to 180 IPM.
Where should I be looking to fix this?
Chris
I'm still getting a following error at ~80 IPM (with my current resolution of 0.0001"). I noticed that this error only occurs on long moves and is associated with an audible thunk at the end of a move. Looking at the velocity on HAL Scope I can see short moves have linear velocity ramps and long move ramp up normally and ramp down sharply with a decay shape. What it looks like is LinuxCNC is requesting a velocity higher than the USC is willing to deliver. I've been checking the LinuxCNC settings but can't figure out where this limit is being imposed. I've increased every velocity (searched for "VEL") in the INI to 180 IPM.
Where should I be looking to fix this?
Chris
Please Log in or Create an account to join the conversation.
- jmelson
- Offline
- Moderator
-
Less
More
- Posts: 817
- Thank you received: 157
04 May 2021 02:47 #207781
by jmelson
Replied by jmelson on topic Pico USC Following Error
The last setup info I have is from your April 27 message. In that, in the .ini file, you have MAX_VELOCITY set to 1.2 That equals 72 IPM (1.2 IPS * 60).
So, you clearly need to increase this number in both the [TRAJ] and [JOINT_x] sections.
Then, your SCALE is 327680. So, if user units are inches, you want 180 IPM that is 3 IPS. 3 * 327680 = 983040 steps/second. This is WAY above the rating for the Universal stepper controller, we usually recommend staying below 300K steps/second.
Do you REALLY need this resolution? You are talking about a step resolution of 3 microinches! If your drives have a lower microstepping ratio, I would recommend that as the first thing to do.
Also, to step at this rate, the step width and space would have to be about 1 us.
Jon
So, you clearly need to increase this number in both the [TRAJ] and [JOINT_x] sections.
Then, your SCALE is 327680. So, if user units are inches, you want 180 IPM that is 3 IPS. 3 * 327680 = 983040 steps/second. This is WAY above the rating for the Universal stepper controller, we usually recommend staying below 300K steps/second.
Do you REALLY need this resolution? You are talking about a step resolution of 3 microinches! If your drives have a lower microstepping ratio, I would recommend that as the first thing to do.
Also, to step at this rate, the step width and space would have to be about 1 us.
Jon
Please Log in or Create an account to join the conversation.
- BeagleBrainz
-
- Visitor
-
04 May 2021 02:58 #207782
by BeagleBrainz
Replied by BeagleBrainz on topic Pico USC Following Error
Wouldn't 3 micro inches be less than the thermal expansion of cast iron per inch per degree F ?
Please Log in or Create an account to join the conversation.
- jmelson
- Offline
- Moderator
-
Less
More
- Posts: 817
- Thank you received: 157
04 May 2021 03:10 #207785
by jmelson
Jon
Replied by jmelson on topic Pico USC Following Error
Yes, that is why having a SCALE factor of 327680 is just wrong, unless you have a diamond turning lathe making optical parts under a constant temperature water deluge. Such machines exist, but probably aren't running LinuxCNC and stepper motors.Wouldn't 3 micro inches be less than the thermal expansion of cast iron per inch per degree F ?
Jon
Please Log in or Create an account to join the conversation.
- cprhodin
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
04 May 2021 09:27 #207807
by cprhodin
Replied by cprhodin on topic Pico USC Following Error
I'm not using regular steppers, what I have are AC servos that accept step inputs. The maximum step rate is 4MHz. The native resolution is 131072 counts per turn (or 655360 counts per inch with a 0.2 inch ball screw). I have the servo configured to accept A/B quadrature so switches 5-8 of the USC are open. Switches 1-4 of the USC are also open so it's using the internal count feedback.
My latest INI is attached. The three stepgen times are all set to 300.
Chris
My latest INI is attached. The three stepgen times are all set to 300.
Chris
Please Log in or Create an account to join the conversation.
- jmelson
- Offline
- Moderator
-
Less
More
- Posts: 817
- Thank you received: 157
04 May 2021 15:51 #207842
by jmelson
Replied by jmelson on topic Pico USC Following Error
OK, in your [JOINT_n] setction, you still have PID_MAX_VEL set to 1.25, which limits you to 75 IPM. That should be rased to just a little above your MAX_LINEAR_VELOCITY.
Still, you are really asking the USC board to do what it is not designed for. The step generator clock is 10 MHz, so when making step rates around 900K/sec, then each increment of velocity is approximately a 10% jump. But, even worse, the digital filter on the step pulse counter is 1 MHz, so when step rates approach 1 MHz, counts could be lost. That is why I recommend not going about about 300K steps/second, so the counter can be assured to never miss a step. (Now, the encoder counter is used to count the quadrature step signal that is derived from the same clock source, so the digital fiter is not actually needed in the open-loop case, but it is part of the design and can't be disabled.)
Jon
Still, you are really asking the USC board to do what it is not designed for. The step generator clock is 10 MHz, so when making step rates around 900K/sec, then each increment of velocity is approximately a 10% jump. But, even worse, the digital filter on the step pulse counter is 1 MHz, so when step rates approach 1 MHz, counts could be lost. That is why I recommend not going about about 300K steps/second, so the counter can be assured to never miss a step. (Now, the encoder counter is used to count the quadrature step signal that is derived from the same clock source, so the digital fiter is not actually needed in the open-loop case, but it is part of the design and can't be disabled.)
Jon
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.132 seconds