Hi slimneil,
You didn't describe your workflow for how you determine and use offsets (Tool and Fixture). Here are some thoughts:
Running the home sequence a 2nd time shouldn't change anything (unless your Home program does something unusual).
Of course the Fixture/Global offsets must be set correctly before running a Job. Most Users use the "Save Always" option to keep the same values that were last used. Optionally you can use the Settings file (see Default.set) to force them to zero on KMotionCNC startup if that helps.
I think the biggest issue is making sure that the Tool length parameter is active when I start to set the XYZ for part zero.
When using a Tool to touch off and set a fixture offset it is important to have the Tool length compensation for that Tool active. Tool Length Compensation for a tool is enabled in GCode with G43Hn and turned off with G49. The Tool Length/Offset Immediately Option will have Tool Length Compensation turned on for a Tool Selected using the on screen Tool Drop Down Selector. The 1st Tool will be selected on KMotionCNC Start up.
is there a way to have the initialization file automatically ask for and set the tool height offset right when it turns on? I’m thinking a prompt screen that asks what too is in the spindle, and then applies that tool height and makes it active right away
Yes. Is there an automatic way to determine what Tool is in the Spindle on Startup? Many Users write the Last Tool to a disk file every time a Tool is changed. Then recover the Last Tool on startup or Initialization.
However you determine the current Tool on startup (by reading the Disk file or asking the Operator) you could set KMotionCNC to that Tool and apply the compensation for that tool with code such as:
Code:
#include "KMotionDef.h"
#define TMP 10 // which spare persist to use to transfer data
#include "KflopToKMotionCNCFunctions.c"
#define LAST_TOOL_VAR 8 // -1=Spindle empty, 0=unknown, 1-4 Tool Slot loaded into Spindle
main()
{
char s[80];
sprintf(s,"T%dG43H%d",persist.UserData[LAST_TOOL_VAR],persist.UserData[LAST_TOOL_VAR]);
MDI(s); //send the T and H words and Turn on Compensation
}