Position / Velocity control

More
09 Aug 2022 04:43 - 09 Aug 2022 04:49 #249379 by MRx
Hi,

I have some application now for cutting plastic gears, while I would cut the gears with the regular A axis in position mode, I would like to part the gear in velocity mode. I am able to install a parting tool on the milling head of the VMC.
Is there any way to switch stepgen via g-code between velocity and position control?

Do commercial systems support that somehow?

how about exporting stepgen->pos_mode from the stepgen module and make it switchable?
Upon change stepgen should be reinitialized.
Last edit: 09 Aug 2022 04:49 by MRx.

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

More
09 Aug 2022 10:53 - 09 Aug 2022 10:54 #249388 by MRx
Replied by MRx on topic Position / Velocity control
ok seems like I got it work.

Instead of modifying stepgen, I have just added another stepgen instance in velocity mode.

loadrt stepgen step_type=0,0,0,0,0,0,0 ctrl_type=p,p,p,p,p,p,v

I'm switching between velocity and position mode via mux_generic

loadrt mux_generic config="bb2"

net spindle-1-enable <= spindle.1.on => mux-gen.00.sel-bit-00 stepgen.6.enable
net spindle-1-cmd spindle.1.speed-out => stepgen.6.velocity-cmd
net spindle-1-out <= stepgen.6.step => mux-gen.00.in-bit-01

sel-bit-00 selects either the position or the velocity instance.

The A Axis is wired up with the mux:
net astep => mux-gen.00.in-bit-00
net astep <= stepgen.3.step

Now M3 $1 enables the stepper in velocity mode
M5 $1 sets the stepper back into positioning mode
Last edit: 09 Aug 2022 10:54 by MRx.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.108 seconds
Powered by Kunena Forum