31
General Mach Discussion / Re: Machine setup help - urgent if possible :)
« on: July 24, 2016, 05:12:17 PM »
You obviously quoted me before my sly edit. It's the S/Speedchange macro you need to edit, not the M6 for the spindle speed.
You'd need to check in what order the scripts get run, especially if both M3 and S are on the same line.
As long as they don't both get called simultaneously, you could essentially have identical code in both to test for the correct gear, so even if the M3 gets called before the speed change, the M3 macro will of already done the gear checking, so by the time the spindle speed macro is called, it just checks for the correct gear and then sets the VFD as required.
Then on just a speed change, the spindle speed macro will handle the gear change.
You'd need to check in what order the scripts get run, especially if both M3 and S are on the same line.
As long as they don't both get called simultaneously, you could essentially have identical code in both to test for the correct gear, so even if the M3 gets called before the speed change, the M3 macro will of already done the gear checking, so by the time the spindle speed macro is called, it just checks for the correct gear and then sets the VFD as required.
Then on just a speed change, the spindle speed macro will handle the gear change.