best way to check if print is running
-
Hi all
If i'd like to check with meta commends if a print is running, which is the best OM value for that?
I think, there are different possible ways...Thanks in advance
-
@cosmowave state.status
-
@jay_s_uk Do you know all the possible outputs of state.status?
I cant seem to find anything in the docs.duet3d page about it -
@Notepad See https://github.com/Duet3D/RepRapFirmware/wiki/Object-Model-Documentation#statestatus
state.status
Current state of the machine
This property may be one of the following:disconnected: Not connected to the Duet
starting: Processing config.g
updating: The firmware is being updated
off: The machine is turned off (i.e. the input voltage is too low for operation)
halted: The machine has encountered an emergency stop and is ready to reset
pausing: The machine is about to pause a file job
paused: The machine has paused a file job
resuming: The machine is about to resume a paused file job
cancelling: Job file is being cancelled
processing: The machine is processing a file job
simulating: The machine is simulating a file job to determine its processing time
busy: The machine is busy doing something (e.g. moving)
changingTool: The machine is changing the current tool
idle: The machine is on but has nothing to doIan
-
You could also read jobs.duration, sleep for a couple of seconds, then read it again to see it it has incremented.
-
@mikeabuilder it's probably better to check if it is > 0 (or eventually not = "null")
then, a single reading should be enough