Knowledge Base Articles

Setup Custom Coolant M-Codes

 

This article will show you how to set up Coolant M-Codes inside of BobCAD-CAM. You can now set up custom on and off Coolant commands inside of BobCAD to allow you to set up M-Codes like Thru-Spindle Coolant. Read through this article if you are interested in setting up your own coolant commands.

 

Location of Coolant Options

If you are using one of the default post processors in the software, it may already contain some custom commands that you can use.

 

1. To navigate to these coolant options, go to “CAM” > “Current Settings” at the top ribbon of the software

Go to Current Settings in BobCAD-CAM

Pic. 1 – Go to Current Settings

 

2. On the initial “Machine Parameters” tab, select the “Make” drop-down box and select your machine.

Select Your Machine in BobCAD-CAM

Pic. 2 – Select Your Machine

 

As you can see in the picture below (pic. 3), the default Haas 3x Mill machine already has some default Coolant Options pre-configured, such as the Thru-Spindle Coolant.

Coolant Options in BobCAD-CAM

Pic. 3 – Coolant Options

 

Type – Allows you to give the Coolant option a name. This will show up in the Feature Wizard when selecting the coolant type you want to use for that operation.

On Block Column – Corresponds to the Coolant On M-Codes that are set up in the post processor on Blocks 840. – 849. (Keep reading to see how you can modify these.)

Off Block Column - Corresponds to the Coolant On M-Codes that are set up in the post processor on Blocks 850. – 859.

 

Modify / Create Coolant M-Codes

To make modifications to these existing coolant options, or add more coolant options, follow the steps below:

 

3. Open a “File Explorer” on your computer. Then, navigate to the BobCAD-CAM Data folder file path (C:\BobCAD-CAM Data\BobCAD-CAM V35\Posts\Mill), right-click on your machine, and select “Open with” either “Notepad” or “Notepad++” if you have it.

Open Post Processor (C:\BobCAD-CAM Data\BobCAD-CAM V35\Posts\Mill)

Pic. 4 – Open Post Processor (C:\BobCAD-CAM Data\BobCAD-CAM V35\Posts\Mill)

 

4. Next, press “CTRL+F” or go to “Edit” > “Find” at the top toolbar to search for the word “Coolant”. Hit the “Find Next” button until you get down to blocks 840-859

Picture depicts the Haas Post Processor .bcpst file opened and showing Blocks 840-859 to setup Coolant M-Codes

Pic. 5 – Blocks 840-859 to setup Coolant M-Codes

 

Observe in the pic. 5 that 840. – 849. are reserved for the Coolant On M-Codes (“On Block” column on the Current Settings page) and 850. – 859. Are reserved for Coolant Off M-Codes (“Off Block” column).

 

Note: If you have an older post processor, you may not find these blocks in the post processor. You can insert the following text below in-between blocks 827. And 900 just like you see in the image above (pic. 5) to get you started.

Copy and Paste the text below and insert it into your post processor between blocks 827. And 900:
840. Coolant 1 ON code? "M08" //Coolant On

841. Coolant 2 ON code? "M07" //Shower Coolant On

842. Coolant 3 ON code? "M73" //Tool Air Blast On

843. Coolant 4 ON code? "M83" //Auto Air Gun On

844. Coolant 5 ON code? "M88" //Thru-Spindle Coolant On

845. Coolant 6 ON code? ""

846. Coolant 7 ON code? ""

847. Coolant 8 ON code? ""

848. Coolant 9 ON code? ""

849. Coolant 10 ON code? ""

 

850. Coolant 1 OFF code? "M09" //Coolant Off

851. Coolant 2 OFF code? "M74" //Tool Air Blast Off

852. Coolant 3 OFF code? "M84" //Auto Air Gun Off

853. Coolant 4 OFF code? "M89" //Thru-Spindle Coolant Off

854. Coolant 5 OFF code? ""

855. Coolant 6 OFF code? ""

856. Coolant 7 OFF code? ""

857. Coolant 8 OFF code? ""

858. Coolant 9 OFF code? ""

859. Coolant 10 OFF code? ""

 

Note: There may be other Blocks already between 827. And 900. If this is the case, just fit the Coolant Blocks in numerical order. Note, this is simply all visual preference as the post processor does not care where exactly these blocks are placed. They simply just need to be in the post processor.

 

Setting Up Thru-Spindle Coolant in 3x Mill Haas Post Processor

Pic. 6 – Setting Up Thru-Spindle Coolant in Post Processor

 

You can observe in pic. 6 above that the Thru-Spindle Coolant On M-Code is designated for Coolant On number 5. However, the Coolant Off M-Code is designated for Coolant Off number 4. This is why when you set up the Thru-Spindle Coolant in the Current Settings, the On Block is set to 5 and the Off Block is set to 4.

You can modify or add more M-Codes here in this portion of the post processor to fit the specifications for your specific machine. As you can see on the “Current Settings” page and from the example Thru-Spindle Coolant, that you can choose which number corresponds to which M-Code. This allows you, for example, to utilize the same Coolant Off M-Codes for multiple Coolant Types.

 

Pick your Coolant in the Feature Wizard

 

Something you may observe is that if you have NOT set up your custom coolant commands in the Current Settings or the “Use customized coolant options (post updates may be required)” is disabled (see below), this will default to the old coolant options in the Feature Wizard on the Tool page.

 

If this is happening for you, please make sure the “Use customized coolant options (post updates may be required)” option is enabled in the Current Settings for your machine. Then, review the “Modify / Create Coolant M-Codes” section of this article again to ensure you have properly set up the custom coolant commands in the post processor.

 

Note: If you had to enable “Use customized coolant options (post updates may be required)” or you modified the Custom Coolant options, make sure you REFRESH your machine for your current job to see the change. Right-click on your Machine name in the "CAM Tree" and select "Edit". Ensure that your machine is indeed still selected in the drop-down box that shows up and click "OK".  It may seem like this does nothing. However, this resets the machine for that current job with the newly revised specifications you set up in the Current Settings page. You may now edit or create a new feature and navigate to the Tool Page to see your new Coolant Options (See Step 5).

 

5. Once you have enabled and set up your custom coolant commands, you can go to the Tool Page in a Feature Wizard and select “Coolant”. Then, enable all the coolant types needed for that specific operation.

Select Thru-Spindle Coolant in the Feature

Pic. 7 – Select Thru-Spindle Coolant in the Feature

 

6. Finally, post out the job and observe in the NC file. You should now see your Coolant On and Off M-Codes at the beginning and end of that Operation.

Thru-Spindle Coolant in the posted G-Code

Pic. 8 – Thru-Spindle Coolant in the posted G-Code

 

This concludes the article. We covered the “Location of Coolant Options”, “Modify / Create Coolant M-Codes”, and “Pick your Coolant in the Feature Wizard”. Feel free to review each section again as needed and ensure you have properly set up your custom coolant M-Codes inside of BobCAD-CAM.

 

If you need further assistance, please contact our support team at (727) 489 – 0003 or [email protected]

Leave a comment