Post processor coolant mFormat

Post processor coolant mFormat

aloKVDTB
Participant Participant
1,538 Views
8 Replies
Message 1 of 9

Post processor coolant mFormat

aloKVDTB
Participant
Participant

Hi,

 

Is there a reliable way to use special commands instead of plain M[number] to trigger air through tool?

The generic Hurco post does not allow anything but numbers in var coolants

{id: COOLANT_AIR_THROUGH_TOOL, on: 11Q1, off: 11Q0},
 
Thanks!
 
0 Likes
Accepted solutions (2)
1,539 Views
8 Replies
Replies (8)
Message 2 of 9

jlauschQGBNG
Contributor
Contributor

Look at what I did here and see if that gives you what you are looking for. In short instead of 

 

{id: COOLANT_AIR_THROUGH_TOOL, on11Q1off11Q0},

 

I did

 

{id:COOLANT_AIR_THROUGH_TOOL, on: "M11Q1" , off: "M11 Q0"},

Message 3 of 9

aloKVDTB
Participant
Participant
Thanks, that did not work for me sadly

Stack dump:

("Invalid argument type.")@:0

getCoolantCodes(5)@C:/Users/ALvil/AppData/Roaming/Autodesk/Fusion 360 CAM/Posts/hurco.cps:2390

setCoolant(5)@C:/Users/ALvil/AppData/Roaming/Autodesk/Fusion 360 CAM/Posts/hurco.cps:2321

onSection()@C:/Users/ALvil/AppData/Roaming/Autodesk/Fusion 360 CAM/Posts/hurco.cps:1197

Failed while processing onSection() for record 487.

###############################################################################



Error: Failed to invoke function 'onSection'.

Error: Failed to invoke 'onSection' in the post configuration.

Error: Failed to execute configuration.

Stop time: Thursday, December 30, 2021 8:35:24 AM

Post processing failed.


0 Likes
Message 4 of 9

jlauschQGBNG
Contributor
Contributor

I'm no expert with the post modification side of things however I have been able to make some changes to our posts at the shop. Drop you post file and I will see what I can do next week. It will be a .cps file like what I sent in the last reply.

0 Likes
Message 5 of 9

engineguy
Mentor
Mentor

@aloKVDTB 

 

What does your HURCO Control accept for Coolant Commands ???

 

You need to check your HURCO Manual or contact HURCO for what codes are accepted by your control for the different methods of coolant use before trying to change the Fusion Post Processor, without that information everyone will just be going round in the "guessing circles" and getting nowhere fast 🙂

 

The Fusion Post Processor will most likely be able to be modified to output something different but without knowing what can/can not be used by your control then it is pretty hard to guess 🙂 🙂

 

0 Likes
Message 6 of 9

aloKVDTB
Participant
Participant
Accepted solution

Got it

// M11Q1 + M11Q0 solved 30dec2021
function setCoolant(coolant) {
  var coolantCodes = getCoolantCodes(coolant);
  if (Array.isArray(coolantCodes)) {
    if (singleLineCoolant) {
      writeBlock(coolantCodes.join(getWordSeparator()));
    } else {
      for (var c in coolantCodes) {
        if ((tool.coolant == COOLANT_AIR_THROUGH_TOOL) && (coolant != COOLANT_OFF)) {
          writeBlock(coolantCodes[c], "Q1");
        }
        if ((tool.coolant == COOLANT_AIR_THROUGH_TOOL) && (coolant == COOLANT_OFF)) {
          writeBlock(coolantCodes[c], "Q0");
        } else {
          if (tool.coolant != COOLANT_AIR_THROUGH_TOOL) {
            writeBlock(coolantCodes[c]);
          }
        }
        //writeBlock(coolantCodes[c]); /*--originally just this in for (var c in coolantCodes) {}*/
      }
    }
    return undefined;
  }
  return coolantCodes;
}
 
----------
My postprocessor has a number of other modifications like G28 home even if safe retracts has been set to [Clearance Height] and there's delayed M63 aux2 off onClose so **caution** 
0 Likes
Message 7 of 9

aloKVDTB
Participant
Participant

Hi,

The problem was not with Hurco, air through tool worked if I manually wrote in code

M11Q1 //on

M11Q0 //off

I just needed the postprocessor to write the extra Q-codes with M11 when {id: COOLANT_AIR_THROUGH_TOOL, on: 11, off: 11was used in program

0 Likes
Message 8 of 9

Tomek.G
Alumni
Alumni
Accepted solution

Hi @aloKVDTB,

I am wondering which version of the post you are using.
There was an update some time ago that allowed you to add a text string as a coolant code.


CoolantString.png


 


Tomek.G
Sr. Technical Consultant
Message 9 of 9

jlauschQGBNG
Contributor
Contributor

I was wondering why my fix worked for me and not for him. This would explain why.