Got the gear change working just fine. First VB code I ever wrote. But now I have a problem that is Mach related.
If I am running or was running in low gear at 500rpm and stop the spindle with M5. My current pulley is Number 2
I now enter M3 S2500 (my threshold for gear change is 999rpm.
Mach looks at my pulley 2 max rpm and figures out it is too high. It throws a warning and reset my speed command to the max in the pulley setting. Then it calls M3 macro.
So the problem is, I have the code in the M3 macro to look at requested speed (Mach just changed it) and decide if gear change is needed. Also, as part of that macro, we set the new pulley to number 1.
I can't just change the pulley max rpm as that is directly tied to the analog out that runs the drive. Right now, at all speeds in any gear, I'm within .5%.
Is there a way to tell Mach to ignore max speed? Or is there a place it puts the original request that I could go get?
The issue is that when it finally shifts gears, runs the spindle up- I'm stuck at the low gear maximum. That ain't cool at all. Easy way to break a tool when I requested 4000rpm and in runs into the material at 1300rpm with only a note at the bottom of the screen. Hoping there is something in there to fix this.