Author Topic: Any Mach3 Experts out there?  (Read 2655 times)

Offline maury

  • Full Member
  • ****
  • Posts: 515
    • Lone Star Engine Works
Any Mach3 Experts out there?
« on: February 03, 2018, 08:47:05 PM »
I've been doing some 4-6 hour CNC runs and have been plagued by power glitches, killing my runs. So I bought a UPS for the computer. Thing is, my system doesn't have one on the positioning motors or spindle. So now Mach doesn't crash but loose steps and get a step in my (3D) run.

So my question is: can the UPS somehow be set up to input a "Space" character into the computers input to cause Mach to "Feed Hold" when the power glitches? This will allow me to restart the run on a short power glitch or just manually shut the system down on a blackout.

The manual for the UPS is completely free of content on what the device actually does or what it's capable of or how to set it up. The only reference is to how to orderly shut down the computer, which is exactly what I don't want to do!

I'm running Mach3 on a 3 axis converted ZX45 mill drill.

Any ideas will be appreciated.

Thanks,
maury
"The trouble with socialism is that you eventually run out of other people's money."... Margaret Thatcher

Offline stevehuckss396

  • Full Member
  • ****
  • Posts: 1554
  • Sterling Heights, MI USA
    • Steve's Miniature Sparkplugs
Re: Any Mach3 Experts out there?
« Reply #1 on: February 03, 2018, 11:08:24 PM »
Hook up the CNC power supply to the ups. When the power goes down you can see how long the machine will run on the UPS. Then you can decide the next time the power goes out how long you can run before you hit cycle stop and shut down in a controlled fashion and wait out the outage.
Do not be like the cat who wanted a fish but was afraid to get his paws wet.

Offline kvom

  • Full Member
  • *****
  • Posts: 2649
Re: Any Mach3 Experts out there?
« Reply #2 on: February 03, 2018, 11:33:47 PM »
Mach3 has the notoriety of not stopping immediately on feed hold.  That's one reason I converted to Path Pilot on my mill.  Feed hold is immediate.

Offline maury

  • Full Member
  • ****
  • Posts: 515
    • Lone Star Engine Works
Re: Any Mach3 Experts out there?
« Reply #3 on: February 04, 2018, 01:40:12 AM »
The power outages I'm seeing are short glitches, a few milliseconds or so. Just long enough to put Mach in reset and kill the job. Thus the UPS. I don't have time to get to the machine and hit the feed hold key, that's why I want the UPS to do it electroniclly. I believe the feed hold will stop close enough.

Thanks,
maury
"The trouble with socialism is that you eventually run out of other people's money."... Margaret Thatcher

Offline stevehuckss396

  • Full Member
  • ****
  • Posts: 1554
  • Sterling Heights, MI USA
    • Steve's Miniature Sparkplugs
Re: Any Mach3 Experts out there?
« Reply #4 on: February 04, 2018, 06:42:25 PM »
If the outages are that short, having everything on the ups would solve the problem. Everything would stay powered up through the less than a second outage and the job would continue.
Do not be like the cat who wanted a fish but was afraid to get his paws wet.

Offline Admiral_dk

  • Full Member
  • *****
  • Posts: 3770
  • Søften - Denmark
Re: Any Mach3 Experts out there?
« Reply #5 on: February 04, 2018, 08:36:32 PM »
I'm very surprised that the computer is affected by a few mS. power glitches ....

As for the CNC controllers power supply .... I can imagine quite a few scenarios that will give you trouble and some of them will might reset Mach3 - put it into safety shutdown - or something else, depending on configuration.

Offline maury

  • Full Member
  • ****
  • Posts: 515
    • Lone Star Engine Works
Re: Any Mach3 Experts out there?
« Reply #6 on: February 05, 2018, 01:42:51 PM »
Steve, I agree having everything on UPS would solve the problem. I'm just having difficulty with finding a UPS to run my 1hp spindle motor through my 3 phase converter. So for very short power glitched the motor momentum would suffice, but for longer outages the may stop before I can get to the machine, adding to the ruined work a probably broken tool.

I'm still looking for an answer to getting Feed Hold to assert during power glitches.

This wasn't a problem until recently, there is a lot of construction going on around here, and with all the new homes going in the local power grid is overloaded. Maybe I should just move further out in the country.

Thanks for the help guys.

maury
"The trouble with socialism is that you eventually run out of other people's money."... Margaret Thatcher

Offline RonGinger

  • Full Member
  • ****
  • Posts: 302
  • Boothbay Maine USA
    • Pleasant Cove Models
Re: Any Mach3 Experts out there?
« Reply #7 on: February 05, 2018, 07:06:19 PM »
I have not looked at current UPS, but the older ones had a serial port that could be used to monitor them. A process running on the PC would check the UPS and take action to shut the PC down gracefully. See if your UPS offers some kind of PC monitor routine.

It is a weakness of Mach3 that the feed hold only takes place after an internal buffer is run out, which can be a variable time. Mach4 has eliminated that and feed hold is now instant.

Mach3 does have the ability to run a BASIC script periodically- like 10 times per second. That script could watch for a signal from the UPS and call a Feedhold or stop. Maybe a simple relay operated by the 120v line which would drop out and be the trigger, without  using the UPS would work. A place like Adafruit sells small board with relays on them which could be hooked to a simple diode and resistor divider.

Offline kvom

  • Full Member
  • *****
  • Posts: 2649
Re: Any Mach3 Experts out there?
« Reply #8 on: February 05, 2018, 08:26:45 PM »
If everything inside the PC is DC past the power supply, can you not place a large battery as a buffer between the power supply and the electronic?

Offline Steamer5

  • Global Moderator
  • Full Member
  • *****
  • Posts: 1272
  • The "Naki" New Zealand
Re: Any Mach3 Experts out there?
« Reply #9 on: February 05, 2018, 09:08:47 PM »
Hi Maury,
 The plant I work at had issues with the power supply, in the milli second range, which dropped all the electric drives. This meant a plant restart taking an hour or three.
 To over come this the plant is now setup such that a power out for less than a second everything now reaccelerates via the control system.....still gets the heart rate up when it does it! Not sure if this is feasible in the home shop environment, you would still need to hold up your computer etc on a UPS & I guess would need some hardware.

Cheers Kerrin 
Get excited and make something!

Offline Admiral_dk

  • Full Member
  • *****
  • Posts: 3770
  • Søften - Denmark
Re: Any Mach3 Experts out there?
« Reply #10 on: February 05, 2018, 09:21:41 PM »
Can't you put the CNC controller on the UPS without attaching the Spindle to it too ?

Offline maury

  • Full Member
  • ****
  • Posts: 515
    • Lone Star Engine Works
Re: Any Mach3 Experts out there?
« Reply #11 on: February 06, 2018, 02:11:44 AM »
Ron, my UPS does have a USB port for shutting down the computer. Unfortunately, I want to stop the G code from
executing, not shut down the computer. I'm wanting to save and restart the run which was in progress when the
power went out.

Your answer about the script inspired a thought; can I program one of the extra inputs to perform a Feed Hold?
I can design a circuit to give a pulse when the power fails and input it into this input, stopping the G code. THe UPS gives an audio allert that the system has stopped, and is waiting for the power to come back on.
I think there will be enough momentum in the system to correctly move the tool to the end of where the buffer contents ends. If mach can be startd again at this point everything will be seemless.

__________________

Can't you put the CNC controller on the UPS without attaching the Spindle to it too ?

yes, if I don't mind breaking tools.

Thanks,
maury
"The trouble with socialism is that you eventually run out of other people's money."... Margaret Thatcher

 

SimplePortal 2.3.5 © 2008-2012, SimplePortal