G-Code to check if motors are running

Hi there,

I have a Lulzbot Taz 6 and I am writing code for computer controlled, custom use. The plan is to send serial commands to the printer. One G-code command I am looking for is a command that sends back information to the computer see if any of the 3 motors are currently moving. I haven’t been able to find a command like that and tried to use the M114 command that returns the current position of each axis. The plan was to keep running a loop while the position kept changing and then break out when it remained the same for a small period of time. Unfortunately it only reports the positions after the motors have finished running which I don’t think would be useful unless I check specifically for that.

Has anyone else tried this? I would like to just be able to tell when any single motor is running.

Thanks.

Marlin and Gcode don’t work that way. Each Gcode command is considered atomic.

The Klipper project is firmware for the printer that moves more of the processing to the attached computer (which is hopefully, more powerful than the 8-bit processor in the printer). Perhaps there’s something here that might meet your needs.