Setting up independent axis

More
9 years 10 months ago #84410 by Todd Zuercher
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.

Please Log in to join the conversation.

More
9 years 10 months ago #84431 by andypugh

andypugh wrote: 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:
Code:
#!/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 to join the conversation.

Time to create page: 0.035 seconds
Powered by Kunena Forum