Problem VCarve to UGS platform Start height

I am not sure what I am doing wrong. I obviously have something set up wrong, but don’t know what.
I have an xcontroller, Vcarve pro and UGS Platform (nightly build Aug 12)

In UGS Platform, I home my machine, send it to my G28 (start point). I then probe using the inventables probe for my material height. It is set to retract 20mm from material.
I then open up my gcode file, and hit run.
The bit raises an additional 20mm then comes down and begins cutting air. It seems to follow the correct pattern, just above the material.

Here is the opening lines from the gcode. (I am using the X-carve inches processor)

T1
G17
G20
G0Z0.8000
G0X0.0000Y0.0000S12000M3
G0X1.6974Y0.3768Z0.2000
G1Z-0.0525F20.0
G1X1.6091Y0.2951F50.0
G1X1.5613Y0.2508
G1X1.5513Y0.2416
G1X1.5448Y0.2364
G1X1.5310Y0.2269
G1X1.5169Y0.2175
clip***

Now to make it more confusing.
If I hit the stop button in UGS. Everything stops.
Then I hit “Return to Zero” : The bit moves back to my zero point, just touching the material. ie… zero in all three axis.
Then I hit Run: The program will cut properly, including all correct depths. When it is finished it returns to the Zero point, but 20mm above the material.
If I then hit Run again, it will run everything properly again, also returning back to X,Y zero and 20mm above matertial.
If I swap out bits, requiring me to reprobe, It starts all over again with the air carve.

Here is the end portion of my Gcode

clip*
G1X1.8488Y0.6018
G1X1.8413Y0.5864
G1X1.8337Y0.5712
G1X1.8257Y0.5561
G1X1.8175Y0.5412
G1X1.8091Y0.5264
G1X1.8004Y0.5119
G1X1.7915Y0.4976
G1Z-0.1700
G1X1.7552Y0.4445
G1X1.7153Y0.3940
G1X1.7128Y0.3911
G1X1.6974Y0.3768
G0Z0.2000
G0Z0.8000
G0X0.0000Y0.0000
M02

As an additional note, my probe works fine in easel.
Thanks for any help.

What are you using to probe? Can you post that?

I had to add a G90 in my post processor to make it work. My Z probe was changing to G91 and caused my Gcode to not work.

My first three lines are:
G17
G20
G90

What is g90

G90 sets the positioning mode to absolute positioning vs relative positioning (G91).

G90 is what you want.

I would highly suggest you edit the post processor to remove the T1 command. The T command is used to change tools and seems to confuse or give unreliable results on the GRBL.

G90 is the code to set “absolute positioning” mode.
In that mode, G0 X10Y10 will send the machine to your work position 10,10.
G91 is “relative positioning” mode. In relative positioning, G0 X10Y10 will move your machine 10 to the right and 10 back from the current position.
Grbl defaults to G90 when neither is sent, but it sounds like, according to @JustinBusby, that UGS might send a G91 and not reset back to G90.

I didn’t say UGS sends it. UGS only sends what you tell it to send.

His probe script, which is what was my problem was, might use G91 moves and then his Gcode file doesn’t set back to G90.

I used a script from my Triquetra probe (it’s like 2 years old so no clue what Charley uses now) to do my probe and relative moves while probing make the most sense considering you almost are guaranteed to not have a spot found yet since you’re still probing.