Hi,
It would be best if you could supply sample working code and what the machine is so we can help more effectively.
However, if you would like to try one of the library posts, I would begin with the siemens 840D post (https://cam.autodesk.com/posts/download.php?name=siemens-840d&type=post), as the code should be similar (a number of people on the forums have used this for an 828D effectively already). This may need some modifications to run perfectly for your machine, but it should at least get you something to start with. Just be cautious when you first try the code on the machine (one thing to note is the tool length compensation is always output as D1 using this post - this can be easily modified if required).
The reason that posting fails when THROUGH_TOOL is selected is because the post needs to be modified with the correct coolant on command that suits your machine.
If you open the post and go to line 221, you should see the COOLANT_THROUGH_TOOL line :-
As you can see, the coolant is listed, but there's no 'on:' or 'off:' M code assigned.
You just need to replace that line with one of the following lines and modify the on/off codes - if the machine requires flood and through coolant together (M8 and M88 for example), you can change the line to :-
{id: COOLANT_THROUGH_TOOL, on: [8, 88], off: [9, 89]},
or if just one M code for through coolant is required :-
{id: COOLANT_THROUGH_TOOL, on: 88, off: 89},
(note the ',' at the end, this is required)
This would then give you the M codes in the NC code and post successfully.
If my post answers your question, please click the 'Accept Solution' button. This helps everyone find answers more quickly!
Andy Millard
Product Support Specialist