Editing the G-code from Ace Converter

 

The G-code that Ace generates does a lot of the work for us, but it's not perfect. Ace is trying to drill holes and we want to punch rivets. Here we can make the code perfect with just a little work with a good "replace" function on out word processing program. First, Ace wants Z at 0.0000001, but we want the die in the down position, that is Z at 1. We'll fix that. Then, Ace wants to send the Z axis to 3.000000, but we want the punch to be in the up position which I defined as Z being 0. We'll fix that. too. Finally, we'll add in dwell times to allow the rivet to be fully formed and to make sure the die has retracted completely.

This is what a short section of G-code looks like from Ace converter for five rivets:  

 

Ace thinks we want to drill holes at each spot, not emboss rivets. So we have to change things a bit. I have set up my machine so that when Z=0, the rivet punch is retracted and when Z=1, the punch goes down, making the rivet. The rivet does not form instantly, so I add a little time (“dwell”) in the down position to make sure the rivet is fully formed. I also add a little dwell in the up position just in case something gets stuck for a split second (and it has). This is where the “Replace” command is helpful.

Step 1 – Replace “G01 Z0.000000” with:

 

G00 Z1.     (this means “push the die down and make the rivet”)

G04 P600  (prepare for a delay and that delay is for .600 seconds)

 

Notice that we want to replace one line (G01 Z0.000000)2 with two lines. Word can do this by going to the Replace dialog box and hit these buttons: More > Special > Manual Line Brake when you want to type the second line. The Manual Line Break symbol looks like ^l . So the dialog box looks similar to this when you are finished with this replacement:

 

Replace: G01 Z0.000000

With:       Z1.^lG04 P600

 

 

Step 2 – Replace “G01 Z3.000000” with:

G00 Z0     (this means “raise the die”)

G04 P200  (prepare for a delay and that delay is for .200 seconds)

If you were to run this little program, you would make five rivets at the x and y positions specified on your sheet of brass or styrene.

I use Microsoft Word on my home workstation, but it is expensive and I did not have a copy to run on my rivet machine computer. Not wanting to be succumb to the sin of software piracy, I rejected loading Word on this computer and tried, in vain, to try to make WordPad’s or Notepad’s “Replace” function search for one line and replace it with two lines. (I’m sure, now, someone will tell me how trivial it all is!) So, I Googled “free word processor” and found a – not free – but $40 word processor that worked as well or better than Word for this application. It’s EditPad at www.editpadpro.com . Maybe you can find a truly free program by being a little more persistent.

 

1. All those extra zeros after the decimal are meaningless, ignore them.

2. Basically, G1 means "go at the specified speed" and G0 means "go quickly". I find it easier just to specify G0 rather than always specifying a speed that is required by a G1 command.

 

Back