Carving the same gcode 200 times

I use UGS. I would think you could modify your file in a text editor like Notepad to raise your Z, go back to x0,y0 and just have to hit run. You would have to clear the alarm only 1 time after you connect to UGS, depending if homing is enabled in the Grbl setting. Do you have an M30 as the last line in the program?

I just went out and tried my machine. I opened up UGS. I opened the file. When you connect the UGS it goes into Alarm mode. So you clear it. Then you can home it and run your program. On mine, work zero is 000, but machine zero is 29 something because of the way the board was flashed. Occasionally I’ll disconnect after homing and reconnect to get them all 0,0,0.

The command M30 stops the machine and tells it the program has finished, then the program is rewound back to the start .

Here is a post from Larry in another thread :

Jul '15

Hi, Drew.

When Homing is enabled and the machine is turned on Grbl goes into the Alarm state which shows up as the Alarm state in UGS because the software has no idea where the hardware is positioned. You have to Home the machine($H) to clear the Alarm. Once Homing is accomplished then the software is synchronized with the hardware and knows where Machine 0,0,0 is.

You can check this thread for more information. It is one of many threads on this topic on this forum.
Breaking homing switches - slamming the spindle to a rail? No need to