Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onClose() {
- onCommand(COMMAND_COOLANT_OFF);
- //writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(1)); // retract
- //writeBlock(gFormat.format(0), gAbsIncModal.format(91), "Z" + xyzFormat.format(1)); // retract
- zOutput.reset();
- setWorkPlane(new Vector(0, 0, 0)); // reset working plane
- if (!machineConfiguration.hasHomePositionX() && !machineConfiguration.hasHomePositionY()) {
- // 90/91 mode is don't care
- //writeBlock(gFormat.format(28), gAbsIncModal.format(91), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0)); // return to home
- } else {
- var homeX;
- if (machineConfiguration.hasHomePositionX()) {
- homeX = "X" + xyzFormat.format(machineConfiguration.getHomePositionX());
- }
- var homeY;
- if (machineConfiguration.hasHomePositionY()) {
- homeY = "Y" + xyzFormat.format(machineConfiguration.getHomePositionY());
- }
- //writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), homeX, homeY);
- }
- onImpliedCommand(COMMAND_END);
- onImpliedCommand(COMMAND_STOP_SPINDLE);
- writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off
- writeln("%");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement