Advertisement
Guest User

Untitled

a guest
Jan 11th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. function onClose() {
  2. onCommand(COMMAND_COOLANT_OFF);
  3.  
  4. //writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(1)); // retract
  5. //writeBlock(gFormat.format(0), gAbsIncModal.format(91), "Z" + xyzFormat.format(1)); // retract
  6. zOutput.reset();
  7.  
  8. setWorkPlane(new Vector(0, 0, 0)); // reset working plane
  9.  
  10. if (!machineConfiguration.hasHomePositionX() && !machineConfiguration.hasHomePositionY()) {
  11. // 90/91 mode is don't care
  12. //writeBlock(gFormat.format(28), gAbsIncModal.format(91), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0)); // return to home
  13. } else {
  14. var homeX;
  15. if (machineConfiguration.hasHomePositionX()) {
  16. homeX = "X" + xyzFormat.format(machineConfiguration.getHomePositionX());
  17. }
  18. var homeY;
  19. if (machineConfiguration.hasHomePositionY()) {
  20. homeY = "Y" + xyzFormat.format(machineConfiguration.getHomePositionY());
  21. }
  22. //writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), homeX, homeY);
  23. }
  24.  
  25. onImpliedCommand(COMMAND_END);
  26. onImpliedCommand(COMMAND_STOP_SPINDLE);
  27. writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off
  28. writeln("%");
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement