Hello Guest it is March 29, 2024, 04:56:23 AM

Author Topic: Spindle wont start with G-code  (Read 722 times)

0 Members and 1 Guest are viewing this topic.

Spindle wont start with G-code
« on: October 10, 2022, 02:14:41 PM »
Hey Guys,

I'm a noob to Mach3 so bear with me. 

I'm running R3.043.066 on Winders 10pro.  For some reason when I run a program, the spindle start on the screen is active, it dwells for the 10 seconds I told it to, then nothing.  I pause the program, turn the spindle off via mach3, then back on and it starts just fine.

Any ideas?

Cheers,

Wes
Re: Spindle wont start with G-code
« Reply #1 on: October 15, 2022, 04:46:01 PM »
I thought I'd post a follow up as I figured it out... sort of.

It turns out the pins and ports instruction in my DMC2 were wrong (shocker), I simply had to swap the spindle outputs in the pins and ports/spindle setup.  Now M3 works properly.

The only problem now is that Fusion 360 is generating the wrong g-code.  It sends M5 as the spindle start g-code rather than M3.  Yeesh, if its not one thing its another.

On another note, is there a more active forum somewhere for Mach3/CNC?
Re: Spindle wont start with G-code
« Reply #2 on: October 16, 2022, 03:19:58 PM »
Hi,

Quote
The only problem now is that Fusion 360 is generating the wrong g-code.  It sends M5 as the spindle start g-code rather than M3.  Yeesh, if its not one thing its another.

Fusion usually/often puts in an m5 so the spindle is stopped. This is in anticipation that any job will begin with an m6 toolchange. If Fusion is not producing
an m3/m4 then you have a fault with your post settings.....I use Fusion and it does produce m3/m4.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Spindle wont start with G-code
« Reply #3 on: October 16, 2022, 06:50:25 PM »
Yes, I've found the same thing.  I simply edit the g-code and change the M5 to M3.  A little annoying but manageable.
Re: Spindle wont start with G-code
« Reply #4 on: October 16, 2022, 06:55:43 PM »
Hi,
I don't have to edit anything, yes the Fusion post puts an m5 at the start, but thats no problem as the spindle is usually stopped anyway, but shortly
thereafter Fusion inserts an m3 snnnn block and the spindle starts.

For example:
Code: [Select]
(LENS)
(T2  D=1.5 CR=0. - ZMIN=-3.25 - FLAT END MILL)
G90 G94 G91.1 G40 G49 G17
G21

(2D CONTOUR1)
M5
T2 M6
S24000 M3
G54
G0 A0.
M8
G0 X37.05 Y0.65
G43 Z15. H2

Note the M5, followed by M6 and then an M3. This is straight from the post, no editing required.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Spindle wont start with G-code
« Reply #5 on: October 16, 2022, 07:33:06 PM »
Thanks. 

I had a look at my g-code and found that indeed fusion is generating the correct M3.  I just ran a test and it does correctly start the spindle at the correct RPM.  Weird, I wonder why it wasnt before?  99.9% chance it was a PIBKAC error...

(T3  D=0.1181 CR=0. - ZMIN=-0.25 - FLAT END MILL)
G90 G94 G91.1 G40 G49 G17
G20
G28 G91 Z0.
G90

(2D ADAPTIVE3)
M5
T3 M6
S24000 M3
G54
M8
G0 X6.6335 Y0.7715
Re: Spindle wont start with G-code
« Reply #6 on: October 16, 2022, 07:38:15 PM »
Hi,
my machine does not have a toolchanger so the m6 is redundant. If I recall correctly you can make a setting in the post that stops Fusion from including
an m6 block....but then I think you miss out on the required m3.

My machine (Mach4) is set up to 'Ignore M6', so even the redundant m6 does not stop my machine, it just ignores it but does get the benefit from the inclusion of
the following m3.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'