<p>I am currently writing (software) and building (printing) a little control panel for my printer. I have some 2D joysticks that I want to use for X/Y and Z/E movement. The idea is that when I move the joystick in X direction the printer starts moving to the right/left and when released it should stop. For now it should just be constant speed, so the amount of tilting the joystick should not matter. I have been looking through the GCode reference (Marlin) but I all the movement related GCodes seem to be moving to specific position, but not simply starting to move until further notice.</p>

<p>When using positioning I can think of two possible issues.</p>

<ul>
<li>Moving too much per iteration -> it will continue to move after releasing the joystick</li>
<li>Moving too little per iteration -> it will jerk around (stop, start, stop, start, ...) which is probably not too good for the motors</li>
</ul>

<p>Is there a way to have the printer head just start and stop moving without having to give a target coordinate? If it makes any difference: I am only talking about having this for a Creality CR-20.</p>

CC BY-SA 4.0
2020-03-05T18:26:33.740Z
If iterating like you're doing, you could time each successive command to happen just before the deceleration from the previous move would begin, based on acceleration profile. But I'm not sure if the planner will react that quickly. You may instead be able to just send a long move, then a command to abort as needed, but there still may be high latency. Printer firmware isn't made for interactive control.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2020-03-05T21:11:24.210Z
You'd be better off with each nudge of the joystick equaling a set movement. I don't know of a way to just kick off movement without an endpoint.
Davo
CC BY-SA 4.0
2020-03-06T06:44:35.040Z
Those are both good ideas, I think I will implement it in a way that moving it into a direction causes a movement to the end of the platform and when released I will abort the last command. It doesn't matter if there is just a small delay between releasing and stopping
Yanick Salzmann
CC BY-SA 4.0
2020-03-06T15:25:39.073Z
Obviously there's no Gcode to "move until instructed otherwise," as that leads to nasty hard-stop collisions.  Your thought about "Move to Max_X" followed by an Abort command should work, but be cautious about speed since the limit switches may not cut the drive off in time.
Carl Witthoft
CC BY-SA 4.0
2023-03-24T11:52:05.757Z
klipper not support `G80` gcode to stop runing move
CS QGB
<marlin><g-code>
Command to have printer head move constantly
Yanick Salzmann
# Command to have printer head move constantly

(Asked by: username_0 on 2020-03-05)

I am currently writing (software) and building (printing) a little control panel for my printer. I have some 2D joysticks that I want to use for X/Y and Z/E movement. The idea is that when I move the joystick in X direction the printer starts moving to the right/left and when released it should stop. For now it should just be constant speed, so the amount of tilting the joystick should not matter. I have been looking through the GCode reference (Marlin) but I all the movement related GCodes seem to be moving to specific position, but not simply starting to move until further notice.

When using positioning I can think of two possible issues.

* Moving too much per iteration -> it will continue to move after releasing the joystick
* Moving too little per iteration -> it will jerk around (stop, start, stop, start, ...) which is probably not too good for the motors

Is there a way to have the printer head just start and stop moving without having to give a target coordinate? If it makes any difference: I am only talking about having this for a Creality CR-20.

**Tags:** marlin, g-code
> **Comments:**
> **username_1**: If iterating like you're doing, you could time each successive command to happen just before the deceleration from the previous move would begin, based on acceleration profile. But I'm not sure if the planner will react that quickly. You may instead be able to just send a long move, then a command to abort as needed, but there still may be high latency. Printer firmware isn't made for interactive control.  
> **username_2**: You'd be better off with each nudge of the joystick equaling a set movement. I don't know of a way to just kick off movement without an endpoint.  
> **username_0**: Those are both good ideas, I think I will implement it in a way that moving it into a direction causes a movement to the end of the platform and when released I will abort the last command. It doesn't matter if there is just a small delay between releasing and stopping  
> **username_3**: Obviously there's no Gcode to "move until instructed otherwise," as that leads to nasty hard-stop collisions.  Your thought about "Move to Max_X" followed by an Abort command should work, but be cautious about speed since the limit switches may not cut the drive off in time.  
> **username_4**: klipper not support `G80` gcode to stop runing move  

---

## 0 answers

