Spindle High/Med/Low settings - need Help <answered>
Posted: Sat Aug 02, 2025 3:28 am
by Reiko Röse
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.
;-------
;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
;-------
; 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
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
Re: Spindle High/Med/Low settings - need Help
Posted: Sun Aug 03, 2025 8:04 am
by Muzzer
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:
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.
;-------
;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
The only thing to do is to find out how to skip the macro wenn the right gear in already selected.
Regaeds Reiko
Re: Spindle High/Med/Low settings - need Help
Posted: Mon Aug 04, 2025 12:00 pm
by suntravel
You can use sensors or switches on the gear levers to let Acorn know which gear is selected.
Uwe
Re: Spindle High/Med/Low settings - need Help
Posted: Mon Aug 04, 2025 4:47 pm
by Reiko Röse
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