tune stepper function

More
08 Sep 2020 15:50 #181294 by Reinhard
Hi,

I'm playing with pncconf with a test-setup (and new steppers). First try to tune a stepper looked ok, but when I increased travel distance, axis crashed against limit, where the stepper blocked and the driver turned into error state.

As I had no idea, about what went wrong, I thought, may be better to test with rotational axis, which can not block ...

But pncconf fails on trying to tune A-axis.

So I faked pncconf and connected the A-Axis at the X-Stepper connector. Then I realized, that the test function runs 1 distance ahead, but 2 distances back - As the carriage was near one limit at first test, I now know, why it runned into limits.
Could that be turned off, so that the step runs one distance ahead, and the same distance back?

What about driver parameters?
I can't change timing parameters or max vel. in test panel. Does that limitations come from GUI or from hal testfunction?
Driver bandwith is 200kHz and I'd like to test that speed.

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

More
08 Sep 2020 19:03 #181311 by cmorley
Replied by cmorley on topic tune stepper function
It's been a long while since using/looking at this.
A quick look at axistest.comp seems to show it should request +- 1 amplitude around start position.(if you select the +- option)
This get connected to simpletp and PID which could screw that up I suppose..
I'll have to test with hardware.

I do see setp pid.0.maxerror .0005 - in the test - which is wrong for metric machines...


As for adjusting stepper settings and max velocity.
max velocity is what you are testing. - maybe I don't understand what you are asking.
stepper driver timing setting should be able to be set in the test. - are you saying the spinboxes don't work?

Chris

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

More
09 Sep 2020 02:33 #181356 by Reinhard
Replied by Reinhard on topic tune stepper function

if you select the +- option

Hm, if the behaviour is intended, than I recommend a big fat warning in the dialog.
I guess, nobody likes the stepper crash against limits - and the meaning of ± is not obvious.
It could as well be like what I thought, that the test runs one dimension in one direction and the same dimension back to the beginning.
I would prefer this as default.
.

stepper driver timing setting should be able to be set in the test. - are you saying the spinboxes don't work?

Well, I didn't try smaller values, but bigger values don't work.

Max velocity is tied to 6000 mm/min.
I use stepper + drivers with a setting of 4000 steps per revolution. That leads to 12000 mm/min on a bandwith of 200kHz.
I tried to change max velocity to 10000 mm/min, but 6000 is fixed limit of the spinbox.

I can change settings in pncconf, but not in the tune-dialog.

Same is true for driver timings.
step-timings are set to 5000ns, same as directory changes. Specs of my driver recommend a delay of 10000ns between last/first step pulse and directory change.
So I tried to change timings of directory signal, but it keeps tied to 5000ns.

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

More
09 Sep 2020 04:46 #181360 by cmorley
Replied by cmorley on topic tune stepper function
+- is default and it moves 1 amplitude in the negative direction, moves back to start, and then moves one amplitude in the positive direction moves back to start.

I'm confused - is this what it did and you don't like it or did it do something else which means it's broken?

step setings/ velocity:
ok i understand now.
I use imperial so 6000 ipm is high enough :)
I have increased the settings in pncconf pages for metric people but i guess I didn't for the tests. I'll do that shortly.

Thanks
Chris

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

More
09 Sep 2020 14:02 #181446 by Reinhard
Replied by Reinhard on topic tune stepper function

+- is default and it moves 1 amplitude in the negative direction, moves back to start, and then moves one amplitude in the positive direction moves back to start.

Ok, I used the word "dimension" instead of "amplitude", but yes, that's what it does.

For me this behaviour is not obvious from "+-" without description.
Would be nice to add a warning, that carriage should be located in the middle of the axis for that test to work.

May be its possible to add a static text linked to the option, that describes the behavior of the selected test.
.

I have increased the settings in pncconf pages for metric people but i guess I didn't for the tests. I'll do that shortly.

Thanks a lot!

Could you please check the test for an A-axis?
If pncconf supports xyza machines, it would be nice to be able to test an A-axis too.

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

More
09 Sep 2020 18:32 #181483 by cmorley
Replied by cmorley on topic tune stepper function
ok done and pushed!
The following user(s) said Thank You: tommylight

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

More
10 Sep 2020 19:18 #181667 by Reinhard
Replied by Reinhard on topic tune stepper function
Hi,

A-axis is testable now. Thanks.

Test-Dialog accepts now new values, but I guess, that values will not be used at testing.
hal-show displays a velocity of 100 and 12,7 - which I guess are mm/s - so the speed is stil 6000, although the dialog shows different values.

Help page of axistest claims, that test run uses a trapezoidal velocity profile, but my ears don't believe that. It looks, as if the test starts with full speed (100) and after half of distance it switches to low speed (12,7).

Is there a way to really test trapezoidal velocity with the given acceleration parameters from dialog?
Help page of axistest does not name a pin related to acceleration.
Is the dialog value misleading?

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

More
10 Sep 2020 23:26 #181687 by cmorley
Replied by cmorley on topic tune stepper function
I just tested the latest on my stepper machine.
It does use a trapezoidal profile.
It will go above 6000

Of course you must have the distance and acceleration high enough to allow it to get to the cruise phase.

To see for your self use halscope to watch the stepgen velocity feedback pin.
(This is simple_tp 's code if you want to look at it what plans the move)
github.com/LinuxCNC/linuxcnc/blob/master...nents/simple_tp.comp

BUT
I did occasionally see weird oscillations in halscope (I didn't run motors)
And i may have found the problem.
A long while ago Peter of Mesa told me to not connect a signal to PID.command-deriv. i removed them from the configure HAL code but missed the test.
if a signal is connected to it but no driving pin is use FF1 becomes useless and that is what keeps the stepgen track accurately - apparently.

I'll push the fix to remove it and maybe you can test again/

Chris

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

More
11 Sep 2020 02:40 #181710 by Reinhard
Replied by Reinhard on topic tune stepper function

I just tested the latest on my stepper machine.
It does use a trapezoidal profile.
It will go above 6000

Of course you must have the distance and acceleration high enough to allow it to get to the cruise phase.

I don't run motor test on existing machine configurations.

I always start pncconf to build a new machine (by reading mesaoutput through help input page).
My A-axis is a geared rotary axis with a gear rate of 1:90 - so one turn should be long enuf for cruise phase.

hal-show of position has fast update rate, so I can see intermediate values.
So if a trapezoidal profile would be used, I expect intermediate values on feedrate too. But feedrate jumps from 100 to 12.7 and back (and some exponential values instead of zero).

Whatever I enter in the maxspeed combobox - velocity does not rise above 100
... and I can change acceleration to small values, but I don't see rampings in hal-show output.

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

More
11 Sep 2020 04:11 #181716 by cmorley
Replied by cmorley on topic tune stepper function
I assume when you say hal-show you mean halmeter.
It matters because hal-show is used when testing a full configuration -leading me to wonder what you were testing with pncconf or the ful config.

I'll assume pncconf.
Halmeter does not really update very fast.

try HALscope - its right there.
set to rolling
pick stepgen.00.velocity-fb
adjust the gain till you see the shape

You should be able to tell me what the shape is rather then both of us guess why it doesn't seem right :)

Not sure how I can debug any further for you. I tested metric and imperial with a live mesa card it all seemed to work.
If you can adjust the spinboxes higher then 6000 then it should use the numbers.
Here again you can use halmeter to check to see if the velocity changes.
for instance HAL pin 'simple_tp.maxvel' (units per second) should track the spinbox (units per minute)

Finally - did you set maxoutput in the PID to a limitting setting ?
A setting of zero will let the PID have no limit.

Chris

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

Moderators: cmorley
Time to create page: 0.102 seconds
Powered by Kunena Forum