05-10-2023
09:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-10-2023
09:34 AM
Hi @Danvil9226
Open your post with a text editor.
Search for the startSpindle function.
Inside the startSpindle function, in the branch outputting the G97 command, we can change the code.
Piece of code before the change :
if (getSpindle(true) == SPINDLE_SECONDARY) {
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir
);
} else {
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir
);
}
Let's add some logic for gradually speed up the spindle.
After the change, the same piece of code is now:
. if (getSpindle(true) == SPINDLE_SECONDARY) {
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir
);
} else {
var startSpindleSpeed = 300;
var spindleIncrement = 100;
var tempSpindleSpeed = startSpindleSpeed;
while (tempSpindleSpeed < _spindleSpeed+spindleIncrement) {
writeBlock(
spindleMode,
sOutput.format(tempSpindleSpeed),
spindleDir
);
writeBlock(gFormat.format(4), "P" + milliFormat.format(1000));
tempSpindleSpeed +=spindleIncrement;
}
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir
);
}
Regards.
______________________________________________________________
If my post answers your question, please click the "Accept Solution" button. This helps everyone find answers more quickly!
Fusion