Spindle High/Med/Low settings - need Help <answered>
Moderator: cnckeith
-
- Posts: 8
- Joined: Wed Oct 30, 2024 1:00 pm
- 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: 54453808391C-0702248376
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany M.V.
Spindle High/Med/Low settings - need Help <answered>
Hello,
I need help with the Spindle High/Med/Low settings for the manual gearbox on my mill. I entered the max and min speed for the High range and also the gear ratios for the Med and Low ranges. However, the buttons in the VCP are not working.
Additionally, when I run a program with an RPM lower than 600, there is no warning message indicating that the machine is in the wrong gear range.
What did I miss in the setup? An actual report ZIP file is attached.
Regards Reiko
I need help with the Spindle High/Med/Low settings for the manual gearbox on my mill. I entered the max and min speed for the High range and also the gear ratios for the Med and Low ranges. However, the buttons in the VCP are not working.
Additionally, when I run a program with an RPM lower than 600, there is no warning message indicating that the machine is in the wrong gear range.
What did I miss in the setup? An actual report ZIP file is attached.
Regards Reiko
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Community Expert
- Posts: 3708
- Joined: Thu Sep 23, 2021 3:49 pm
- 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: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Spindle High/Med/Low settings - need Help
Why are you using an old legacy VCP skin?
I suggest use one of these actual ones to have all features of the current 5.30 CNC12 version:
Uwe
I suggest use one of these actual ones to have all features of the current 5.30 CNC12 version:
Uwe
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Community Expert
- Posts: 3708
- Joined: Thu Sep 23, 2021 3:49 pm
- 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: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Spindle High/Med/Low settings - need Help
The Spin Low button will run mfunc41.mac (M41)
By default it is requesting this from the PLC:
If nothing more is set up in the macro or the PLC it will do nothing except to turn your spindle drive with S/0.12 in your setup.
On my lathe with a manual gearbox I have made custom macros like this on :
If M42 is issued, it prompts me to switch to Medium Gear, test if I have shifted ok, if not it calls me stupid to try again
Uwe
Code: Select all
;-------
;M41 macro
; Selects Low Range Spindle
;-------
IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 100 ;Skip macro if graphing or searching
M95 /42/43 ;Turn off Med & High Request
M94 /41 ;Request Low range
N100
Code: Select all
M41 IS SV_M94_M95_41 ;(Spindle Low Range)
On my lathe with a manual gearbox I have made custom macros like this on :
Code: Select all
;-------
; M42 macro
; Selects Med Low Range Spindle
;-------
IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching
M5
N90
M200"Shift to MEDIUM GEAR\n\nPress CYCLE START to continue"
M95/41
M95/43
M94/42
M3 S100
G4 P1
#1=#25009
If #1>90and#1<110 THEN GOTO 100 ELSE GOTO 200
N100
M200"M3 S=%f\nRPM=%f\n\nIf OK Press CYCLE START to continue"#4119#1
GOTO 300
N200
M200 "M3 S=%f\nRPM=%f\n\nWrong Gear You STUPID\n\nPress CYCLE START and try again"#4119#1
M5
GOTO 90
N300
M5
M95 /14/16
M94 /15
N1000

Uwe
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 815
- Joined: Mon Feb 19, 2018 2:52 pm
- 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: 38D269594F9C-0110180512
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: UK
- Contact:
Re: Spindle High/Med/Low settings - need Help
I have a slightly different setup. My Shizuoka AN-SB has a 2 speed geared head with pneumatic actuators to engage the appropriate ratio, along with microswitches to detect if the gear has been correctly and fully engaged. The selection is a little crude, based on the set speed (S1000 etc) active in the g-code when the M4 (spindle forward) or M5 (spindle reverse) code is called.
As the gears don't always mesh first time, I check the signal from the appropriate microswitch and if it's not fully engaged, I tickle the spindle motor by sending a short on/off signal and retrying until the gears engage properly. That's enough to move the gears slightly without grinding them. This system usually works on the first retry if initial engagement fails.
It's not quite what you are after but might give you some ideas. M3 and M4 are almost identical although obvs they need to issue the appropriate spindle direction once gear selection is successfully completed.
Here it is in action, including a successful retry:
As the gears don't always mesh first time, I check the signal from the appropriate microswitch and if it's not fully engaged, I tickle the spindle motor by sending a short on/off signal and retrying until the gears engage properly. That's enough to move the gears slightly without grinding them. This system usually works on the first retry if initial engagement fails.
It's not quite what you are after but might give you some ideas. M3 and M4 are almost identical although obvs they need to issue the appropriate spindle direction once gear selection is successfully completed.
Here it is in action, including a successful retry:
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 8
- Joined: Wed Oct 30, 2024 1:00 pm
- 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: 54453808391C-0702248376
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany M.V.
Re: Spindle High/Med/Low settings - need Help
Hello,
thank you for the Answers. I was able to solve my problem - now i need no buttons. I have modified the Post Processor for my maschine. The Post Processor call´s macro 43, 42 or 41 in the G-Code depending on the Spindle speed for the Tool. The macro tells me with a M200 message which gear i have to put in and i can resume the Job with cycle start.
I added this function to the PP
and also inserted this Line
the Macro looks like this
The only thing to do is to find out how to skip the macro wenn the right gear in already selected.
Regaeds Reiko
thank you for the Answers. I was able to solve my problem - now i need no buttons. I have modified the Post Processor for my maschine. The Post Processor call´s macro 43, 42 or 41 in the G-Code depending on the Spindle speed for the Tool. The macro tells me with a M200 message which gear i have to put in and i can resume the Job with cycle start.
I added this function to the PP
Code: Select all
function insertGearMacro(rpm) {
if (rpm <= 200) {
writeComment("LOW-Gang Auswahl per Makro");
writeBlock("M41");
} else if (rpm <= 600) {
writeComment("MID-Gang Auswahl per Makro");
writeBlock("M42");
} else {
writeComment("HIGH-Gang Auswahl per Makro");
writeBlock("M43");
}
}
Code: Select all
if (spindleSpeed > 99999) {
warning(localize("Spindle speed exceeds maximum value."));
}
insertGearMacro(spindleSpeed); // Makro wählt M41/M42/M43 je nach Drehzahl
writeBlock(
sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4)
);
}
Code: Select all
;-------
;M41 macro
; Selects Low Range Spindle
;-------
IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 100 ;Skip macro if graphing or searching
M5
N90
M200"Shift Gearbox to 205rpm\n\nPress CYCLE START to continue"
M95 /42/43 ;Turn off Med & High Request
M94 /41 ;Request Low range
N100
Regaeds Reiko
Last edited by Reiko Röse on Mon Aug 04, 2025 4:48 pm, edited 2 times in total.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Community Expert
- Posts: 3708
- Joined: Thu Sep 23, 2021 3:49 pm
- 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: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Spindle High/Med/Low settings - need Help
You can use sensors or switches on the gear levers to let Acorn know which gear is selected.
Uwe
Uwe
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 8
- Joined: Wed Oct 30, 2024 1:00 pm
- 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: 54453808391C-0702248376
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany M.V.
Re: Spindle High/Med/Low settings - need Help
Hello,
I resolved the repeated gear selection issue by modifying the post processor as well. If the next spindle speed remains within the same range as the previous one, the macro will not be triggered.
for this functionality I added this variable to the PP
an have modified the function insertGearMacro(rpm)
Regards Reiko
I resolved the repeated gear selection issue by modifying the post processor as well. If the next spindle speed remains within the same range as the previous one, the macro will not be triggered.
for this functionality I added this variable to the PP
Code: Select all
var lastGearMacro = ""; // global: zuletzt ausgegebener Gang
Code: Select all
function insertGearMacro(rpm) {
var gearMacro = "";
if (rpm <= 200) {
gearMacro = "M41";
} else if (rpm <= 600) {
gearMacro = "M42";
} else {
gearMacro = "M43";
}
if (gearMacro !== lastGearMacro) {
writeComment("Gangwahl: " + gearMacro);
writeBlock(gearMacro);
lastGearMacro = gearMacro;
} else {
writeComment("Gangwechsel nicht nötig (aktueller Gang: " + gearMacro + ")");
}
}
(Note: Liking will "up vote" a post in the search results helping others find good information faster)