How to probe Z after tool change

I’m trying to figure out tool change in gSender. I put g-code in the pre-hook to raise the spindle and shut it off and move to a convenient location to change the tool. I want to probe Z for the new bit so I used M0 in the post-hook to pause. Now how do I probe Z since, once it is paused, gSender functions for jogging and probing are unavailable?

Using Fusion360 personal and TimPatterson’s Post Process All: Fusion 360 CAM Batch Post Add-In to restore rapid moves.


before change:
G0Z50; lift carriage high to facilitate tool change
M05; turn off spindle
G0 X0 Y0; go to convenient location to change tool

after change:
Z30; lower carriage to help with positioning touch plate
M0; pause until touch plate is in place
G10 L20 P1 Z0;
G91 G21; movements now are relative to initial positioning
G38.2 Z-40 F75; probe slowly downwards
G0 Z4; lift up a bit
G38.2 Z-30 F20; probe agin extra slowly
G4 P0.3; wait 0.3 seconds
G10 L20 P1 Z15; redefine Z0
G0 Z4 ; lift up a bit
G90; movements are now again absolute
M03; reenable spindle
M0; Pause


What does %wait do? I am not familiar with it and can’t seem to find it defined anywhere.

Just a half second wait (G4P0.5)

Thanks. I’m completely new to JavaScript.