Thanks for your feedback, we are looking into this.
One of the reasons why the probe gets turned off/on between operations are the G0/G1 movements which will likely trigger the probe when the machine accelerates/decelerates for these moves.
You can get around the undesired output you mentioned when you add this function to your post:
var probeIsEnabled = false;
var savehighFeedMapping;
var savehighFeedrate;
function setProbeOnOff(enable) {
if (enable) {
if (!probeIsEnabled || operationNeedsSafeStart) {
skipBlock = operationNeedsSafeStart;
writeBlock(gFormat.format(65), "P" + 9832); // spin the probe on
// save current highfeed and mapping mode
saveHighFeedMapping = highFeedMapping;
saveHighFeedrate = highFeedrate;
// set highFeedrate to probe linking feedrate and map all rapid travesals to high feed.
highFeedMapping = HIGH_FEED_MAP_ANY;
highFeedrate = getParameter("operation:tool_feedProbeLink", (unit == IN) ? 100 : 2500);
probeIsEnabled = true;
}
} else {
if ((hasNextSection() && !isProbeOperation(getNextSection())) || isLastSection()) {
writeBlock(gFormat.format(65), "P" + 9833); // spin the probe off
probeIsEnabled = false;
// restore highFeedrate and mapping mode
highFeedrate = saveHighFeedrate;
highFeedMapping = saveHighFeedMapping;
}
}
}
And replace the lines you highlighted in your screenshots with the call to the function you just added.
Replace:
writeBlock(gFormat.format(65), "P" + 9832);
with:
setProbeOnOff(true);
and replace:
writeBlock(gFormat.format(65), "P" + 9833);
with:
setProbeOnOff(false);
Be aware that this might cause the issues which I mentioned initially.
There is possibly a better solution which would be the usage of the G31 feature on the Haas.
This is a bit more complex to implement into the post, but I will describe the required changes below:
1) Do all steps mentioned in the first suggestion
2) In the onLinear function, add this code at the beginning:
if (probeIsEnabled) {
forceFeed();
}
and replace:
writeBlock(gFeedModeModal.format(94), gMotionModal.format(1), x, y, z, f);
with:
writeBlock(gFeedModeModal.format(94), gMotionModal.format(probeIsEnabled ? 31 : 1), x, y, z, f);
3) In the onSection function
replace:
var G = ((highFeedMapping != HIGH_FEED_NO_MAPPING) || !getProperty("useG0")) ? 1 : 0;
with:
var G = probeIsEnabled ? 31 : ((highFeedMapping != HIGH_FEED_NO_MAPPING) || !getProperty("useG0")) ? 1 : 0;
Note that this is not tested yet on a machine, so please test carefully.
We will do internal testing as well and when successful we will make the changes into the library Haas post.
Achim.N
Principal Technology Consultant