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

I agree with Marco on using visual studio code to learn how to make generic changes and tune in your post but for a direct answer you'll need to edit the section of your post that begins on the line:

 

function onCycleEnd() {

 

As a default this will be followed by:

 

if (!cycleExpanded) {
switch (cycleType) {
case "thread-turning":
forceFeed();
xOutput.reset();
zOutput.reset();
g92ROutput.reset();
break;
default:
writeBlock(gCycleModal.format(80));
}
}

 

You will need to add in the cycles you want inbetween cycleType and default. For example to add you M-code for only tapping (standard tapping only, this will not add to the tapping with chip breaking etc):

 

if (!cycleExpanded) {
switch (cycleType) {
case "thread-turning":
forceFeed();
xOutput.reset();
zOutput.reset();
g92ROutput.reset();
break;

case "tapping":

writeBlock(gCycleModal.format(80));

writeBlock(mFormat.format(128));

break;
default:
writeBlock(gCycleModal.format(80));
}
}

 

If you need other tapping cycles to act the same you can sort of stack the cases:

 

if (!cycleExpanded) {
switch (cycleType) {
case "thread-turning":
forceFeed();
xOutput.reset();
zOutput.reset();
g92ROutput.reset();
break;

case "tapping":

case "left-tapping":

case "right-tapping":

case "tapping-with-chip-breaking":
case "left-tapping-with-chip-breaking":
case "right-tapping-with-chip-breaking":

writeBlock(gCycleModal.format(80));

writeBlock(mFormat.format(128));

break;
default:
writeBlock(gCycleModal.format(80));
}
}

 

For basic edits like this I like to use Notepad++ and I set the language to JavaScript to highlight what it should but equally these edits can be done in Visual Studio Code.

 

Does this answer your question?