I've created a new file M3100. The contents of that file first turn on the table vac (M7), then call up M31 to probe and then finally turn off the table vac (M9).
I don't fully understand the P parameter and how to use it. You can see below I've tried to make the file work a number of ways, commenting different lines in and out.
I thought I would just use:
M98 M31
as I think I would have years ago on my old WinCNC control. Then I found the P parameter and started experimenting with it. No luck so far. Just "error in code" messages.
I guess a main question is if I leave the M31.txt file as it is or copy/paste it to just 31.txt or P31.txt. I'm a bit lost as nothing so far has worked.
All that does work is the M7 and M9 lines if I comment out all the various attempts at the M98 call.
exec.Code("M7"); // VAC AND DUST COLLECTOR ON
Exec.Code("M98 P31");
// Exec.Code("M98 M31");
// M98 M31
M98 P31
exec.Code("M9"); // VAC AND DUST COLLECTOR OFF
Thanks,
BH