Error: ReferenceError: COOLANT_DISABLED is not defined, but it is in the Tool classes reference online ?

Error: ReferenceError: COOLANT_DISABLED is not defined, but it is in the Tool classes reference online ?

bernard5BABD
Advocate Advocate
266 Views
2 Replies
Message 1 of 3

Error: ReferenceError: COOLANT_DISABLED is not defined, but it is in the Tool classes reference online ?

bernard5BABD
Advocate
Advocate

I need to be able to make the difference between COOLANT_DISABLED and COOLANT_OFF. (looks like the old story of the difference between zero and null). Coolant_Off is seen as being undefined, so I thought I could use Coolant_Disabled, but it seems to not be available (not defined), so it's the story of the cat chasing it's tail. What would be the proper way to allow to NOT use coolant for a tool on a specific material. 

In Fusion dialog box for feed and speed, you can clearly disable coolant, so what should be done on the post-processor side?

Bernard Grosperrin, Retired, Maker, and Autodesk Certified Instructor
Blog : Le Bear CNC | Forum : Le Bear CNC Forum | Addin : Airfoil Sketch from file
0 Likes
267 Views
2 Replies
Replies (2)
Message 2 of 3

boopathi.sivakumar
Autodesk
Autodesk

Hi @bernard5BABD 

function setCoolant is responsible for enabling and disabling the coolant codes in our generic post processor.

COOLANT_DISABLED is an integer which can be used for comparison statements like tool.coolant == COOLANT_DISABLED. 

 What would be the proper way to allow to NOT use coolant for a tool on a specific material. 

How you are specifying material to the post processor? If  its by post properties then you can do something like this below

  // set coolant after we have positioned at Z
if (getProperty("material") != "wood"){
  setCoolant(tool.coolant);
} else {
  setCoolant(COOLANT_OFF)
}

If the material is wood then coolant will be turned off by default 


Boopathi Sivakumar
Senior Technology Consultant

0 Likes
Message 3 of 3

bernard5BABD
Advocate
Advocate

Thank you for your answer, but you may not have fully understood my question. Using COOLANT_DISABLED in my code trigger an error, as quoted in the title.

Bernard Grosperrin, Retired, Maker, and Autodesk Certified Instructor
Blog : Le Bear CNC | Forum : Le Bear CNC Forum | Addin : Airfoil Sketch from file
0 Likes