After some distinct buggerage with the lathe cycle graphics, let's do some actual testing of the cycles on a live machine. Of course, I can start by checking what commands the macros are sending to the machine controller but ultimately I need to see what happens when I run the machine.
The more conventional "turning" and "facing" operations are prett straightforward and although I can't pretend I've done any seriously thorough testing at this stage, they seem to work largely as expected. I'm sure I can finesse the instructions a bit but initially I need to know if the toolpaths are almost sensible looking.
The "chamfer" toolpaths don't seem to be working quite as expected. There are 3 "corner types" on offer, depending on which of the3 possible chamfers you want to machine.
External chamfer (Front Outside"):
Here's the dummy setup I'm planning to run. It's air cutting at this stage but the tool starting position and chamfer parameters are hopefully good starting points.
And here's the displayed toolpath trace ie where the tool actually went, as reported in the backplot panel within the main screen:
- The backplot trace is all over the shop. This is due to the graphics freezing up, then waking up again and jumping to the current position. So parts of the toolpath are missing, with rogue traces where the jumps happened. The machine itself was working as expecting, so this seems to be a graphics problem.
- The starting coordinates are inappropriate. The macros start by acquiring and storing the current machine coordinates under the active WCS. This position is then used as the retract position (G30 perhaps?), so ideally you'd get them right. In my case, I seem to have positioned the tool miles away from the stock. It's a learning process, I guess.
- But more worryingly, the toolpath seems to be making rapid moves within the stock. For an external "Front Outside" chamfer, the tool should be clearing the work to the right and bottom of the screen for a front toolholder. The cause is actually quite visible - for this type of chamfer, the "chamfer distance" argument (5mm here) should immediately follow the feed argument (0.15mm) - check out the orange "call" script at the bottom of the setup panel). So, by sending the distance parameter as the 8th argument rather than the 7th argument, the GUI is accidentally specifying a "rear outside" chamfer. This turned out to be fairly simple to fix.
This looks almost credible, with the caveat that again, I seem to have positioned the virtual tool miles from the actual stock. And again, the graphics is sorely messed up due to the freezing / jumping behaviour:
Internal Chamfer ("Front Inside"):
There then followed a session where Claude buggered about with the Python code that generates these calls. This fixed the front / rear chamfer mixup.