Carving the same gcode 200 times

Greetings,

I’m new to the CNC machines and software. I have tried searching but unable to find an answer to my question. To start, using Easel I created an engraving. Its basically a “Property of …” engraving. To engrave my gcode I use a Sain Smart 3018. On the 3018, I made a jig where my blanks to be carved will be housed and secured. They will always be in the same place and are all exactly the same measurement. My gcode is executed using Candle. I home the machine, perform a z-axis touch, zero the x and y axis and send my code. Everything works fine there, once the engraving is done the bit returns to its set zero on x and y and the machine stops.

I want to remove the completed carving, insert a new blank, reset, and unlock the machine and run the same gcode again and again, 200 times. When I trying doing so Candle goes into alarm mode or the bit is too low and carves too deep. Is there something I’m missing? Would executing the gcode in UGS allow me to get this done? Candle 1.1.8 running on Linux Mint. To run the same gcode again, I need to rehome the machine, set touch my z-axis and reset my x and y. This is too time consuming.

Thanks for reading. Please help.

that sounds like a lot of extra work, try this out

OpenBuilds Software - FREE Software for CNC Control: OpenBuilds CONTROL and OpenBuilds CAM

after first setup you just need to hit run. you might have a small learning curve if you haven’t used it before.

1 Like

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

I will give it a try and report back.

I was going to try UGS first.

here is another one I came across

Introducing gSender | Sienci Labs

Hi Martin,

Thanks for getting back to me. In Candle, I need to home the machine either by pressing the home button or $H before I can execute my gcode.

Here are the last couple of lines from the gcode I’m sending.

G1 X27.267 Y6.238 F609.6
G1 X27.698 Y6.252 F609.6
G1 X27.950 Y6.360 F609.6
G21
G90
G0 Z3.810
G0 X0.000 Y0.000
G4 P0.1
M5

After this code executes, the machine goes back to its starting point. The starting point I set as the x0,y0 not the one set by the homing cycle. I noticed that the z axis does not reset to its starting point. When I resent the code the spindle goes in really deep. I’ve been running the code with an empty jig. There have been several times I had to hit the emergency off button on the machine because I thought it was going to carve in the bed.

It was a busy day today. I’m working on getting UGS installed. I’ll report back if the behavior in UGS is any different.

you should be able to edit your code G0 Z3.810 to whatever you want that to be. I use notepad or wordpad on a pc.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.