Hello Guest it is March 28, 2024, 02:00:10 PM

Author Topic: Automagic M03 and M05?  (Read 2948 times)

0 Members and 1 Guest are viewing this topic.

Automagic M03 and M05?
« on: February 26, 2013, 03:33:08 PM »
I have just wired up a relay box to control my router and dust collector, and plan to install it this weekend when the shop is closed, and the CNC is offline. I know the commands are M03 and M05 to start and stop the spindle, and my tests indicated that installation should be easy enough.  What I'd like to know is, Is there any way Mach3 can be configured to assume a M03 at the start of the program, and a M05 at the end? I know my employees well enough to know that if every program has to be edited to include the commands, there will be runs without the M05, so the router will run for an hour after the job before someone notices it's finished, and other times when a tool gets run into the piece without the router spinning because someone hit start on an old program.

I'm fairly new to Mach3, so I'm really looking for a nudge in the right direction.
Is it possible to have another program push the Gcode into Mach3, instead of opening a file through the interface? If so, I could write a loader program to verify the commands are there, and add them as needed

Otherwise, is there a way to have a macro or brain sstart and stop the router based on whether or not the program is running?

Thanks

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Automagic M03 and M05?
« Reply #1 on: February 26, 2013, 04:21:24 PM »
"If so, I could write a loader program to verify the commands are there, and add them as needed"

Then just update ALL the programs your Employees have to run and be done with it.

Mach3 only does what it is told to do so it does not have an ASSUME function button(;-).

You can use the M30 / M1030 relation to add in code to the end of the file. Mach3 will run the M1030 macro at each M30 call. So you could have the code to turn OFF the spindle or vac if wanted. BUT that requires the M30 Gcode to be present.

You could also CHANGE the cycle start button to automatically turn ON the spindle when pushed.

IF the relays are installed correctly then when you shut down MACH3 all the relays will go offline

Just a thought, (;-) TP