- Posts: 12169
- Thank you received: 4153
Joco wrote: I'm probably being thick but if you are controlling the velocity with PID what is making the decisions around the size of the move of the Z axis? Is that part of the same PID? Or is there another module I have missed understood from the thread doing this? I recognize that 0 velocity means no move but a non 0 velocity still needs a vector to operate on, yes?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
stepgen has two control modes, which can be selected on a channel by channel basis using ctrl_type. Possible values are "p" for position control, and "v" for velocity control. The default is position control, which drives the motor to a commanded position, subject to acceleration and velocity limits. Velocity control drives the motor at a commanded speed, again subject to accel and velocity limits. Usually, position mode is used for machine axes. Velocity mode is reserved for unusual applications where continuous movement at some speed is desired, instead of movement to a specific position. (Note that velocity mode replaces the former component freqgen.)
Please Log in or Create an account to join the conversation.
13.1. Pins
control-type - (Bit, In) Switches between position control mode (0) and velocity control mode (1). Defaults to position control (0).
Please Log in or Create an account to join the conversation.
That's the business. Velocity mode gets you your continuous movement signal I referred to so your +/- acceleration approach should work. I hope you have a chance to get to it. Looks like a promising line of investigation.rodw wrote: Hmm, this does the trick!
linuxcnc.org/docs/html/man/man9/stepgen.9.html
stepgen has two control modes, which can be selected on a channel by channel basis using ctrl_type. Possible values are "p" for position control, and "v" for velocity control. The default is position control, which drives the motor to a commanded position, subject to acceleration and velocity limits. Velocity control drives the motor at a commanded speed, again subject to accel and velocity limits. Usually, position mode is used for machine axes. Velocity mode is reserved for unusual applications where continuous movement at some speed is desired, instead of movement to a specific position. (Note that velocity mode replaces the former component freqgen.)
Please Log in or Create an account to join the conversation.