Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
serge.quiblier
in reply to: Danvil9226

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!

 



Serge.Q
Technical Consultant
cam.autodesk.com