Conditional g-code extra functions
-
I would like to see some simple date/time functions added to the meta commands. At the moment I can't manually kill a long-running macro without doing an emergency stop. If the macro itself could calculate how long it has been running it could execute an M99 itself.
One possible solution is a getDateTime function that populates an array:
var dt = getDateTime()
dt[0] is 4-digit year
dt[1] is month 1-12
dt[2] is day of month 1-31
dt[3] is hour 0-23
dt[4] is minute 0-59
dt[5] is second 0-59
dt[6] is milliseconds 0-999 (if possible)could also have day of week (mon,tue etc) or week number (0-52) etc etc
Alternatively the format could be similar to the object model:
e.g. dt.year. dt.month etc -
There is already an up time variable in the OM. However, to implement timeouts I think you will need to use variables, so that you can capture the up time at the start of the macro.
-
Ok, that's interesting about the uptime. I realise my solution would have to wait for variables.
I also just discovered that I can use the M291 command to periodically check with the user if they want to continue. It's a useful workround for now.