caxis.comp - problems

More
22 Jan 2024 13:05 #291344 by smc.collins
Replied by smc.collins on topic caxis.comp - problems
Just because we can brute force something to work, doesn't mean it's a good idea. Also a lot of machines have rotary axis that can behave as a spindle. This needs to be addressed at a axis level.

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

More
22 Jan 2024 21:31 #291370 by spumco
Replied by spumco on topic caxis.comp - problems

This one you posted here:
forum.linuxcnc.org/10-advanced-configura...lems?start=20#291280
 


Well hot dang.  I recompiled/installed caxis.comp, and it worked.

I have no idea what the difference was, but I've now got two instances of caxis.comp.

Time to set up the subspindle...

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

More
25 Jan 2024 04:49 #291570 by spumco
Replied by spumco on topic caxis.comp - problems
Subspindle is set up and working badly.  The second caxis.comp is doing it's thing, but as usual my PID-fu is weak.

Spindle mode it works fine.  RPM is as-commanded running open loop.

Problem is in axis mode.  I'm pretty sure I've got some scaling issue, or I've connected the wrong feedback pin somewhere (RPM vs RPS).

To recap the setup:
  • Step-dir command, stepgen is in velocity mode
  • Feedback is from the drive; 2500 lines, 10k post-quad to 7i85s.
  • Steps per rev is 5000
I can only get the axis (barely) stable with the following settings:
P - 1
I - 0
D - 0.01
FF0 - 0
FF1 - 0.025(?)
FF2 - 0
FF3 - 0
max_output - 0
deadband - 0.1

Any higher P and it wags back and forth until ferror.  No D and it runs away until ferror.  The strange FF1 tells me I have something wrong somewhere.

If I can get it to home and settle down, any commanded moves (G0 W180) take forever.  The motor jumps a few degrees at normal speed, then creeps along with a pid.w.output at about 0.1rpm... oscillating the whole time.  Takes 10-15 seconds to get close to finishing the move, then another 15 seconds to settle down.  It does eventually stop without hunting.

The following error isn't super-high, compared to the wild behavior before I found the above settings, but somthing is causing the output speed to be silly.

I don't think any of the other INI values/settings are clamping the speed - everything is set pretty high.

So... what have I got wrong that would cause FF1 to need to be set like it is?  Halscope attached, even though its silly.

Warning: Spoiler!


 
Attachments:
The following user(s) said Thank You: jpg

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

More
25 Jan 2024 05:24 #291573 by smc.collins
Replied by smc.collins on topic caxis.comp - problems
As i said, the problem is trying to be 2 different things. I'm looking at it
The following user(s) said Thank You: spumco

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

More
25 Jan 2024 14:02 #291591 by spumco
Replied by spumco on topic caxis.comp - problems
I should really look back at my previous posts.

I think the problem is the same as what prompted me to switch from step-dir to PWM on the main spindle.  The spindle stepgen scale is set for steps/rev, but the axis mode config is set up for steps/degree.

The sub drive can't be run in PWM or analog, no so option to change.  Next test will be to set up the stepgen to be suitable for axis mode, and then see where I can scale something or other so the spindle works properly.

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

More
25 Jan 2024 14:08 #291592 by smc.collins
Replied by smc.collins on topic caxis.comp - problems
The issue at handz is that we can't send a rpm command to the acis to make it operate as a spindle.

Ie the acceleration or speed rate of roatary axis is not correctly handled. That desperately needs to be fixed and a spindle mode input to handle the math change. But I need to look over the source code and I'm super swamped.


I think adding a equation

RPM / numbers = degrees second

Add a spindle function input to handle the brake and chabge over, and maybe offer a second set of pid tuning values for the spindle operation. In all not really that much code but touches things.

Ohh and add the input pins to outout to hal.

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

More
25 Jan 2024 15:54 #291602 by spumco
Replied by spumco on topic caxis.comp - problems
I've got a cunning plan.

I'm going to use the caxis.comp axis-mode PID-enable signal to switch a mux2 which will change the stepgen position-scale value.

At rest or during c-axis commands, caxis.1.pid-enable is ON.  This will set the stepgen position scale to a value which correlates to degrees.

At M3/M4, caxis.1.pid-enable is OFF.  The mux-sel will switch the stepgen scale to a value which correlates to revs.

I'm sure I'll have more issues, but I think this is the last major piece of the puzzle to using a stepgen for both modes.

Testing tonight.
setp mux2.s1.in0            [SPINDLE_1](SCALE)
setp mux2.s1.in1            [JOINT_4](SCALE)
net WAXIS-POS-ENABLE        <=  caxis.1.pid-enable
net WAXIS-POS-ENABLE        =>  mux2.s1.sel
net SPIN0-STEPSCALE-OUT     <=  mux2.s1.out
net SPIN0-STEPSCALE-OUT     =>  hm2_[MESA](BOARD).0.stepgen.03.position-scale

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

More
26 Jan 2024 03:01 #291638 by spumco
Replied by spumco on topic caxis.comp - problems
Bugger.

Stepgen.N.position-scale is a parameter, not a pin.  Can't use net to link a parameter.

Hmmm.... how to set parameter values on the fly....?

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

More
26 Jan 2024 12:37 #291651 by spumco
Replied by spumco on topic caxis.comp - problems
On a whim I tried setting the stepgen position-scale to be in degrees/per rather than revs/per, and it smoothed out considerably.

Downside was that no matter what the command or other PID settings, it wouldn't go faster than 3rpm in spindle or axis mode.


I've come to the conclusion that I need to get this thing working as an axis without the spindle-switch part muddying the waters or confusing me.

Once I've found settings & connections that work as an axis scheme I can circle back and try to figure out what the issue is when using caxis.comp.

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

More
26 Jan 2024 14:05 #291656 by smc.collins
Replied by smc.collins on topic caxis.comp - problems
Ohhh check your axis max angular velocity settings. Would you be willing to test a hal component?? I can draft 1 that turns rpm in deg sec and routes all the spindle pin and we can grab emcoder feedback for cordinated motion and pipe it back to spindle
The following user(s) said Thank You: spumco

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

Time to create page: 0.098 seconds
Powered by Kunena Forum