Hi rrc,
This is an ongoing issue which will perhaps never go away.
Revisions to Mach have, at times, changed the way in which it processes the combination / mixture of VB (cypress basic) and GCode commands within a running macro / script.
I have made 4 changes to my probing script over the last 3 years in order to resolve various issues (as I updated to later Mach versions) and I am currently very pleased with the operation of the G31.
I use the probing function, for tool position setting, many times each day, 7 days a week and it is faultless, but I will never become complacent (at the suggestion of others I did fit an over-travel, e-stop, switch to my tool-setting probe but, so far, it has never been invoked).
My suggestion is that you look closely at the probing script that you are using and perhaps search other threads on the subject in order to correct it’s operation.
(If it is of any help to you, the probing script I am currently using is at the bottom of this page
http://www.cooperman.talktalk.net/files/17.htm - I am not saying that this is the 'be-all' and 'end-all' because there are better scripts around but this one works for me).
Tweakie.