I was trying to answer this question about doing a dry run and getting the real time status on spindle, coolant or read the tool that should be active on that line of code.
Obviously I know there are API calls for spindle and coolant control, but there is only one way to know if they should be on or off on a certain line of Gcode. And the API to read the status is returned in a structure that only a plugin can read.
For clarification “Run From Here” is calling “Dry Run” and then pulling the positions from the interpreter to know where to move the axes to for that line of code. The user can jog or use the dialog to move into position. The API to read the current state for the auxiliaries is more geared for a developer because it takes a lot of work to implement, and almost everyone will want to implement it a little differently.
Was playing around with the Dry run function and noticed that it does not start the spindle, coolant, or pick up the tool changes for my testing.
The only way to get the spindle data is through a plugin. There isn't a scripting API for it.
mcCntlGcodeInterpGetData(MINSTANCE mInst, interperter_t *data);
struct Interperter_info {
double ModalGroups[MC_MAX_GROUPS];
double FeedRate;
double SpindleSpeed;
int SpindleDirection;
bool Mist;
bool Flood;
int ToolNumber;
int HeightRegister;
int DiaRegister;
};
typedef struct Interperter_info interperter_t;