On/off spindle control like Easel with UGS

My X-Carve has an X-Controller and a relay switching power to my Dewalt router. All of this works perfectly fine when I import gcode into Easel and run the carve - Easel starts up the router and shuts it off after the carve is done.

I haven’t tried this using Universal Gcode Sender, but assume that powering on/off the spindle isn’t part of the Gcode file itself (because then if the job is interrupted it wouldn’t turn off). Does anyone have instructions for getting this going with UGS?

Depends on the software that generates your G-code.

For V-carve Pro/Desktop there is a post processing step that contains any start-up/shut-down G-code that you need for your file. Interrupted code shutdown is dependent on the method of interrupting the code. It may leave the router on since you don’t get to the code at the end of the file.

If you want to do it manually you can enter M3 in the Command line of UGCS to start the router and M5 to stop it.

So there is no feature in UGS like Easel that will send the M5 if the job either ends or is cancelled?

I’d really like to move to an offline controller for the X-Carve (neither Easel of Chilipeppr qualify), but UGS seems too unfriendly.

If your software generates an M5 in the G-code (as V-carve Pro can) then the router would turn off at the end of the job.

If you want to interrupt a job with UGCS you could issue a feed hold command which would stop processing G-code commands, turn the spindle and coolant off and wait for a cycle start command at which time you could cancel the job with the spindle off… The X-controller has a push button to activate the feed hold command which is independent of UGCS.

UGCS is not intended to be the end all of CNC programs, but a link in the workflow of a CNC job.

Inventables, with Easel, is trying to turn CNC work into a somewhat plug and play situation so that the uninformed (not to imply that it is not a useful tool for the informed) can also participate in making things with a CNC machine.

So, one could claim that UGCS is primitive, and I wouldn’t argue that point, but it is pretty good at doing what it does do.

BTW - UGCS will not cancel the job immediately. The Cancel function when sending a file just stops sending G-code to the CNC machine. Commands that are already buffered up on the device will continue to execute until the buffer is empty.

I am running VCarve and UGS

I recommend using the Daily Build version of UGS as I fixes a major memory issue with large cut files.

The VCarve post processor has a header and footer area.
Header adds at the setup stuff to the beginning of each gcode file, like starting the spindle
The footer adds all the final stuff to the end of each gcode file, like stopping everything.

Sometimes UGS will glitch and not end the file when done. If this happens I just manually type a M30 in the command window to shut off my spindle.

Add a
to your header as this will insure that UGC is running your file in absolute mode (as opposed to relative)
and remove the tool select info (“T1”) from the header as this can cause random crazy things to happen.

M3 and M5 does not work

We might be able to help if you would give a little information with your statement. Such as, what your machine configuration is (how you have your spindle/router wired), what software and version you are using that doesn’t seem to work for you.

I use M3 and M5 uncounted number of times a week and they work for me.

Figured it out.
The command is M3 S12000.
I was trying M3 then tied M3 S255 which neither worked as the default mode is in PWM.


I ran into this situation recently as well. It had me frustrated until I got my noggin wrapped around it.