hostmot2 stepgen control-type
- snowgoer540
- Topic Author
- Offline
- Moderator
Less
More
- Posts: 2396
- Thank you received: 785
14 Jul 2023 21:27 - 14 Jul 2023 21:29 #275441
by snowgoer540
hostmot2 stepgen control-type was created by snowgoer540
I am hoping that someone can help me wrap my head around the difference between Position mode (0) and Velocity mode (1) for the stepgen control-type. The man page in hostmot2 is pretty vague, only saying that it sets the different modes.
I have also looked at the stepgen man page, but it isn't a ton of help either:
I think I need someone to explain it to me like I'm 5, and also it would be helpful to have an example application of each.
EDIT: I should add that some of my confusion comes from the above description saying that velocity mode is reserved for unusual applications, however it seems to be the default for about every config I've ever seen here.
I have also looked at the stepgen man page, but it isn't a ton of help either:
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.
I think I need someone to explain it to me like I'm 5, and also it would be helpful to have an example application of each.
EDIT: I should add that some of my confusion comes from the above description saying that velocity mode is reserved for unusual applications, however it seems to be the default for about every config I've ever seen here.
Last edit: 14 Jul 2023 21:29 by snowgoer540.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7776
- Thank you received: 2073
14 Jul 2023 21:40 #275445
by cmorley
Replied by cmorley on topic hostmot2 stepgen control-type
position mode stepgen - tell it to go 1 inch forward
velocity mode stepgen - tell it to go at 2 inches a second forward
For linuxcnc's axes, velocity mode uses external PID to convert position to velocity command.
This drives velocity towards zero-ish when it gets to position.
position mode does a similar thing - just internally.
velocity mode stepgen - tell it to go at 2 inches a second forward
For linuxcnc's axes, velocity mode uses external PID to convert position to velocity command.
This drives velocity towards zero-ish when it gets to position.
position mode does a similar thing - just internally.
The following user(s) said Thank You: snowgoer540
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7776
- Thank you received: 2073
14 Jul 2023 21:41 #275447
by cmorley
Replied by cmorley on topic hostmot2 stepgen control-type
It was discovered that position mode had some trouble in certain situations.
Velocity mode worked better and was easy to set up.
Velocity mode worked better and was easy to set up.
The following user(s) said Thank You: snowgoer540
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19462
- Thank you received: 6529
14 Jul 2023 23:07 #275458
by tommylight
Replied by tommylight on topic hostmot2 stepgen control-type
Lets see if i can mess this up
-
Position mode = no PID loop, feedback is directly from stepgen, more susceptible to jitter
Velocity mode = PID loop, feedback through PID from stepgen, feedback easily changed to encoder for closed loop in LinuxCNC, less susceptible to jitter
-
Found a post by PCW explaining the jitter issue:
-
Position mode = no PID loop, feedback is directly from stepgen, more susceptible to jitter
Velocity mode = PID loop, feedback through PID from stepgen, feedback easily changed to encoder for closed loop in LinuxCNC, less susceptible to jitter
-
Found a post by PCW explaining the jitter issue:
I have done some experimentation and have found that you can get better
stepgen following performance on systems with moderate jitter by using a
PID loop for position control instead of the stepgen drivers built-in position control loop.
The problem with the built in driver position control is that its tends to overcorrect
for measured position errors cause by sampling jitter.
The following user(s) said Thank You: snowgoer540, spumco
Please Log in or Create an account to join the conversation.
- snowgoer540
- Topic Author
- Offline
- Moderator
Less
More
- Posts: 2396
- Thank you received: 785
15 Jul 2023 01:16 #275474
by snowgoer540
Replied by snowgoer540 on topic hostmot2 stepgen control-type
Thank you Chris and Tommy, that helps a lot. I’ll ponder for a bit and see if I come up with any more questions
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds