Upcoming Maintenance
Our forum will shut down for server migration on Saturday, 11/21/2026 at 05:00 CST (UTC-6).
This banner can be dismissed by pressing the X in the upper right corner.
Assuming you are moving along a single linear axis for painting, another approach would be to not use gcode to enable your spray.
Instead fire it using a hal component that monitored axis.L.pos−cmd and had an output pin that enabled the spray based on specific axis coordinates. Eg. turn on at 3" and off at 4". You could still do it for multi axis moves, but there would be a bit more maths involved. This would totally eliminate any possible issue with gcode affecting motion.