505
« on: March 29, 2017, 09:51:08 AM »
Well, there isn't too many things that aren't doable in lua. With manumatic tool changes the question is more of it being practical. It sounds like yours is reasonably practical. You will need to do this in 2 parts. Just keep in mind that any automated operation has to be defined by set parameters (until we achieve AI anyway). So here is the way I would do it.
1) Set conditions to manually change the tool: I would simply have the M6 move the spindle to the tool change location, turn off the spindle, coolant, etc. and update the tool number and after motion stops, do a cycle stop.
2) Change Tool: Manually change the tool.
3) Set conditions to resume Gcode execution: Then have a button that moves my spindle to the tool touch location, does the touch routine that sets the tool offset of the current tool and return the spindle to a safe location that the Gcode could be continued from. In your Gcode you would need to make sure it can go from this location to its next working move without issue and set spindle speed, turn the spindle, coolant, vacuum, etc. back on. It might be a good idea to add a move in the Gcode to go to the touch location just after the M6 to. Since it is already there it won't cause any motion but it would insure that the machine is in the position you plan to resume running from every time a M6 is called.
4) Resume Gcode execution: Then you just click Cycle Start to continue running after a tool change. Or...... at the end of your touch routine you could add the cycle start but I would save that for the very last thing after its all proved out.