I have CNC12 pro routher edition with Acorn board, and my machine has both a VFD (0-10v) router spindle and a deployable PWM diode laser. Spindle works fine, but when I try to Activate the laser with the M37 macro, it hangs up at the end when the "spindle is turned on and speed set to 0" with the M3 S-1 command. I get a "wating for spindle to come up to speed".
My VFD sends an "router is up to speed" signal to an Acorn input and the laser is waiting for this to happen (which it never will). How does Acorn know that the M3 command is supposed to control the PWM output instead of the 0-10v output? How do I get acorn to ignore the RouterUpToSpeed input when I am controlling the laser? Is there a command that redirects spindle control from 0-10v analog to PWM?
I have cut the relay wire for output 2 and assigned OUTPUT2 as PWMOutput. Is this correct?
Another problem I have is that for me to use my laser, I cannot have a tool in the spindle. I have a rack atc and there seems to be no functionality in the stock scripts to unload the current tool without loading another one. T0 M6 has been referenced in some things I have read, but issuing this command generates an error saying that tool #0 is invalid.
Any help would be greatly appreciated.
Questions about having both 0-10v spindle and PWM laser
Moderator: cnckeith
-
- Posts: 7
- Joined: Thu May 08, 2025 9:02 am
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Questions about having both 0-10v spindle and PWM laser
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Site Admin
- Posts: 8855
- Joined: Wed Mar 03, 2010 4:23 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: Yes
- Oak CNC controller: Yes
- CNC Control System Serial Number: none
- DC3IOB: Yes
- CNC11: Yes
- CPU10 or CPU7: Yes
- Contact:
Re: Questions about having both 0-10v spindle and PWM laser
please post a fresh report.zip
here is how.
here is how.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 7
- Joined: Thu May 08, 2025 9:02 am
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Questions about having both 0-10v spindle and PWM laser
Attached is the report.zip
- Attachments
-
- report_E06234702C43-0430248195_2025-05-21_20-11-43.zip
- (1.04 MiB) Downloaded 6 times
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 7
- Joined: Thu May 08, 2025 9:02 am
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Questions about having both 0-10v spindle and PWM laser
Anyone?
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 178
- Joined: Fri Jan 13, 2023 8:50 am
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Hopewell NJ
- Contact:
Re: Questions about having both 0-10v spindle and PWM laser
I have my diode laser set up as "JTech Laser with Analog Output AC spindle". In other words, the spindle and PWM are controlled independently.
The command to fire the laser in MDI mode is "M37 Sxxx" where xxx is desired power level. M3 is never to be found in G-code for laser work via PWM (at least my G-code never uses it). As I use my lasers (Opt) I just enable the laser with M37 and control PWM output via S-levels (S000 to S999). M38 turns the laser off.
Yes, Output 2 is assigned PWM Output and the PWM output comes via the DB25 pinouts. The wire you cut to turn off Output 2 is actually the third wire on the ribbon, correct?
The command to fire the laser in MDI mode is "M37 Sxxx" where xxx is desired power level. M3 is never to be found in G-code for laser work via PWM (at least my G-code never uses it). As I use my lasers (Opt) I just enable the laser with M37 and control PWM output via S-levels (S000 to S999). M38 turns the laser off.
Yes, Output 2 is assigned PWM Output and the PWM output comes via the DB25 pinouts. The wire you cut to turn off Output 2 is actually the third wire on the ribbon, correct?
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 7
- Joined: Thu May 08, 2025 9:02 am
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Questions about having both 0-10v spindle and PWM laser
Thank you for your reply and yes, I did cut third wire on the ribbon...and double checked it before enabling PWM by turning the output on and making sure relay 2 did not activate. I setup the laser using the wizard selecting PWM laser with VFD spindle like you mentioned, but the M3 command is indeed inside the stock mfunc37.mac which says that M3 is supposedly used to turn on the laser!?!?!?!?grossmsj wrote: ↑Fri May 23, 2025 3:13 pm M3 is never to be found in G-code for laser work via PWM (at least my G-code never uses it). As I use my lasers (Opt) I just enable the laser with M37 and control PWM output via S-levels (S000 to S999). M38 turns the laser off.
Yes, Output 2 is assigned PWM Output and the PWM output comes via the DB25 pinouts. The wire you cut to turn off Output 2 is actually the third wire on the ribbon, correct?
I think the problem I am experiencing partly lies in the fact that I chose to use the CNC12 input signal VFDUpToSPeed supplied from my spindle VFD that tells the controller that the spindle has reached commanded speed before starting to operate (instead of waiting a certain amount of time)....and the M37 macro uses M3. I don't understand with GCode how the PWM and 0-10v outputs are differentiated. When I look into the mfunc37.mac file, it starts by commanding M5 S-1 and finishes with a M3 S-1 which I cannot see how this tells the laser to fire and not the spindle. What does the "-1" have to do with the S parameter? When you command "M37 S999", how does this interact with the "M3 S-1" command inside the mfunc37.mac. Do I need something completely different in this macro file?
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Community Expert
- Posts: 3484
- Joined: Thu Sep 23, 2021 3:49 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Questions about having both 0-10v spindle and PWM laser
Code: Select all
N100 ;Insert your code between N100 and N1000
M5 S-1 ;Turn off Spindle and Set Speed to 0
#159 = 1 ;Set Variable for M38
M94 /47 ;KP Laser Deploy
M94 /37 ;Request Laser Enable
M94 /38 ;Request Laser PWM Enable
M94 /39 ;Request Laser Reset
G4 P.5 ;Pause
M95 /39 ;Turn off Reset
M3 S-1 ;Turn on Spindle and Set Speed to 0
N1000 ;End of Macro
Uwe
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 178
- Joined: Fri Jan 13, 2023 8:50 am
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Hopewell NJ
- Contact:
Re: Questions about having both 0-10v spindle and PWM laser
M3 controls the spindle. M3 is spindle on clockwise and in G-code you'll see something like S16000 M3. Those speeds are regulated by analog 0-10V.
M37 controls the laser. M37 enables it and the S-commands are power levels sent via PWM.
I can't/don't use spindle and laser in the same run, so I use different post-processors to send cutting or burning commands. With Scott Word's Vectric post processor for laser there are only M37 commands and no M3 commands. I can imagine it might be good practice to explicitly make sure the spindle is off by sending M3S-1.
I might be reading too much into your post, but don't confuse mfunc37.mac with the M37 command. As Uwe said, M37 is a command to the PLC to enable the laser. Mfunc37.mac is a macro that happens to contain an M37 command. But M37 doesn't make use of mfunc37.mac. I found this confusing when I first started with CNC12.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)