Setting up independent axis
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4976
- Thank you received: 1373
19 Dec 2016 13:36 #84410
by Todd Zuercher
Replied by Todd Zuercher on topic Setting up independent axis
Yes, the stepgen component has its own velocity and acceleration limits that you can use to control the speed.
see:
linuxcnc.org/docs/html/man/man9/stepgen.9.html
under parameters.
see:
linuxcnc.org/docs/html/man/man9/stepgen.9.html
under parameters.
Please Log in or Create an account to join the conversation.
19 Dec 2016 19:59 #84431
by andypugh
I should have mentioned that this approach is equally applicable to both software and Mesa stepgens. The Pico stepgens appear to use velocity-mode, which means that a PID or Simple TP component is needed, but it is still fairly straightforward.
A User M-Code can take two parameters (P and Q) so you could pass both position and velocity requests to the stepgen.
M100 P100 Q200
would call a file called M100, which might contain something like:
In the G-code you would then monitor the output of a near via G-code input pin with the M66 command to pause execution until the move is completed. (or to timeout and handle the error)
Replied by andypugh on topic Setting up independent axis
it would need to be set by a user M-code using halcmd.
I should have mentioned that this approach is equally applicable to both software and Mesa stepgens. The Pico stepgens appear to use velocity-mode, which means that a PID or Simple TP component is needed, but it is still fairly straightforward.
A User M-Code can take two parameters (P and Q) so you could pass both position and velocity requests to the stepgen.
M100 P100 Q200
would call a file called M100, which might contain something like:
#!/bin/bash
position=$1
velocity=$2
halcmd setp stepgen.4.maxvel $velocity
halcmd setp stepgen.4.position-cmd $position
exit 0
In the G-code you would then monitor the output of a near via G-code input pin with the M66 command to pause execution until the move is completed. (or to timeout and handle the error)
Please Log in or Create an account to join the conversation.
Time to create page: 0.080 seconds