Hey Greg,
Yes, the plate thickness and probe feed are added to the screen with a designer (Screen4 or waiting for the latest JetCam designer).
The value of P for me is in seconds, but you can also have it be set to milliseconds in 'General Config'. This just give me enough time to get from the computer to the Z-plate and hold it in position.
The "G31Z-5 F" &ProbeFeed is a G-code probing cycle that records the position of the axis when contact is made. The -5 value is just a amount that should allow it to reach the plate from any Z axis position it may be started at. You can increase this if you have more travel because if it travels 5" without contact, the height won't be set. I think I increased mine to 7" If you work in millimeters, you will have to adjust some of these values.
The While IsMoving() is to keep the macro from continuing on until the previous requested action is completed.
The "G4 P0.25" pause is just to be sure that the position has had time to be recorded within Mach.
GetVar(2002) is a internal variable that is the exact position where the probe made contact, not where the axis stopped at. Because the axis can't stop immediately, there can be a slight overrun. Although, if your probe feedrate is slow enough (about 20ipm) it's almost unnoticeable. When the macro runs, you can feel the slight adjustment made due to the difference between the axis position and where the probe actually hit at, which is what the Code "G0 Z" &ZProbePos line does.
Hope this helps to understand the flow of the macro. I also have another one much the same that can be used to set X & Y to the inside corner of a jig/fixture or the outside corner of the material.
If you need help setting up a screen, just ask.
Regards,