I have no big experience with ocuma controls, but these similar to fanuc. If you don't missed something, this should to work. It is good idea to test that code by running the probe on air. Just hit you stylus with the finger to see the effect. Try different axes combinations.
Well, lets take a close look on the code above.
N40 G31 G0 Z#26 (Z AXIS ONLY)
N50 G31 G0 X#24 Y#25 (X AND Y AXIS)
N60 G31 G0 X#24 (X AXIS ONLY)
N70 G31 G0 Y#25 (Y AXIS ONLY)
it is clearly seen, that if we have collision at XZ motion, the machine will not be...