Programming Piece work

I took a job where I’m basically slotting and putting holes in a piece of plastic. I have 120 to do at a time. Takes average of 2 minutes per piece. Is there a way that I can make program pause when done then repeat? Every time I’m haveing to hit start and resume a few times. I do disable bitsetter. I use vcarve pro for programming.

I do. I am running a program right now V-Carving coasters. I edit the gcode and remove the M6 (tool change command) and the command for the router speed.

Then I edit the end of the program and remove everything below the final z retract. I change the z up to about 2 inches (if you have room) to clear my clamps and then have it move back 5 or 6 inches.

So, when the job is done, the spindle moves up and back out of the way at the end of the program. The big thing to remember with this plan is that you MUST ensure that the first movement of the spindle is to X0 Y0, then Z move down to the work piece.

I learned the hard way that makercam moves the spindle in the Z axis first before the X and Y, and I chewed up a clamp and broke a bit. Good times… Good times…

3 Likes

what tool do you use to view and edit the g-code?

1 Like

Microsoft notepad. I know, high tech, right?

4 Likes

Can you edit the gcode to n carbide motion?

Would’ve never thought about notepad. I guess I will have to start learning how to write gcode. Thanks

I had no idea you could just use Notepad… :flushed:

Yeah, it neat to think that our machines make all these cool things by just reading and executing the commands in a text file.

Here’s what I do, since I create one gcode file per tool, and I don’t have the bitrunner.

I get rid of the tool change command [ M6 ] and the spindle speed command [ M3 ] - highlighted text. Then I move the G0 X and Y move command [ G0X0.0000Y0.0000 ] to before the Z command [ G0Z20.3200 ] so that I don’t crash into my clamps when I start the second piece.

Then at the bottom, I get rid of everything below the Z up move. CM has your machine move the spindle up to the top of the Z axis and then move the gantry all the way to the back of the machine. Something I do not want it to do when repeating the same thing over and over again.

Then I just have the machine move up in the Z direction high enough to clear my tooling and then move whatever direction gets the spindle and gantry out of the way to put in the next part.
[ G0Z40 ] or [G0Z50 ] or whatever. . .

So, for my last program, I changed the Z to move up to +40mm [ G0Z40 ] and then added another move to move the spindle and gantry towards the back of the machine 6 inches (152.4mm) from the zero location [ G0X0.0000Y150.0000 ] then save the file.

Now the program will cut your widget, move up and back out of your way and complete without going to the rear of the machine. You can put in a new part, hit run and then start, and it will go to your zero, lower and start cutting your next part.

5 Likes

I will note that Grbl’s limited command support and lack of support for variables and looping makes coding in it really tedious.

Have you looked at Gsharp?

There are other programming tools:

https://wiki.shapeoko.com/index.php/Programming

I’ve been using (abusing) OpenSCAD for this, but it’s slow in rendering, and rather clunky (really wish I could get someone to add an option to write out a filtered text file from it).

2 Likes

I’ll check it out. Thanks

If you use a different sender, you can do this without issue.
Are you using the same work origin for each piece or adjusting XY to a new spot?

Yes using same work origin (x y and z) for each piece

Using CNCjs (with a good post processor), I would just run a job, replace stock, run, repeat.

Finally got a chance to mess with this. It worked perfect!!! Thanks for your help

1 Like

“Notepad++”, I don’t do much/any programming anymore, but when I do I use Notepad++ to edit or compare code, simple and free (with style support for many programming languages)…

https://notepad-plus-plus.org/

2 Likes

Note that there are a couple of different G-Code syntax highlighting modes available for NPP for G-Code:

(listed at: https://wiki.shapeoko.com/index.php/Programming#G-Code_editors which has some additional options)

2 Likes

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