Hello Guest it is March 29, 2024, 01:00:00 AM

Author Topic: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One  (Read 3876 times)

0 Members and 1 Guest are viewing this topic.

I have an Ethernet SmoothStepper from Warp9, A MB3 BOB from CNCRoom.com and a THC and a new licenced copy of Mach4 because the plasma integration was raved about (was using Mach3) until my THC arrived.  I designed everything in Fusion360 and don't want to learn new software.

The problem I am having is I can't get this (m62/63) in my G code to fire the torch with the current Mach3 post-processor as it wants to use my spindle relay (M3), so is there one for Mach4? and I would like to use the m62/63 commands as they supposedly sync with motion and the ESS seems to be designed for it.

The ESS plugin has this checkbox
use a torch on/off relay on m62/63 output but no other options

So does anyone know where and what I would change in the Mach3 plug in so that I can output the m62/63 signal instead of the spindle relay signal (m3) OR a proper Mach4 Plasma post processor for Fusion360 (No I don't want to buy more software like Sheetcam)

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
The M62/M63 command set will only work with Mach4 and the ESS Mach3 plugin will only work with Mach3.

Tweakie.
PEACE
Yes thank you I am trying to figure out how to get the post-processor to put the command,  the ESS (Ethernet) plugin I have does work with Mach4 it's the USS (USB) that only works with Mach3

writeBlock(mFormat.format(power ? 5: 3));

changed to

writeBlock(mFormat.format(power ? 62: 63));

Sort of works but I need to identify the pin that controls it and cant seem to figure out how.



The original code:

var powerIsOn = false;
function onPower(power) {
  initialG31 = false;
  writeBlock(mFormat.format(power ? 5: 3));
  powerIsOn = power;
  if (power) {
    onDwell(getProperty("pierceDelay"));
    if (zFormat.isSignificant(getProperty("pierceHeight"))) {
      feedOutput.reset();
      var f = (hasParameter("operation:tool_feedEntry") ? getParameter("operation:tool_feedEntry") : toPreciseUnit(1000, MM));
      zFormat.setOffset(0);
      zOutput = createVariable({prefix:"Z"}, zFormat);
      writeBlock(gMotionModal.format(1), zOutput.format(getCurrentPosition().z), feedOutput.format(f));
    }
  } else {
    if (zFormat.isSignificant(getProperty("pierceHeight"))) {
      zFormat.setOffset(getProperty("pierceHeight"));
      zOutput = createVariable({prefix:"Z"}, zFormat);
    }
    writeln("");
  }
}

« Last Edit: June 08, 2021, 10:54:56 AM by Steelbarz »

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Looks like Andy at Warp9 is now dealing with this issue.

Tweakie.
PEACE
Yes he did this is the code to change in the Fusion360 PostProcessor for Mach4 and ESS to get it to put the right Mcode in for P62/63

var powerIsOn = false;
function onPower(power) {
  initialG31 = false;
  //writeBlock(mFormat.format(power ? 62: 63));
 
  powerIsOn = power;
  if (power) {
    writeln("M62P3 (+++turn torch on +++)");
    onDwell(getProperty("pierceDelay"));
    if (zFormat.isSignificant(getProperty("pierceHeight"))) {
      feedOutput.reset();
      var f = (hasParameter("operation:tool_feedEntry") ? getParameter("operation:tool_feedEntry") : toPreciseUnit(1000, MM));
      zFormat.setOffset(0);
      zOutput = createVariable({prefix:"Z"}, zFormat);
      writeBlock(gMotionModal.format(1), zOutput.format(getCurrentPosition().z), feedOutput.format(f));
    }
  } else {
      writeln("M62P3 (---Turn Torch Off ---)");
    if (zFormat.isSignificant(getProperty("pierceHeight"))) {
      zFormat.setOffset(getProperty("pierceHeight"));
      zOutput = createVariable({prefix:"Z"}, zFormat);
    }
    writeln("");
  }
}
Here is the file if anyone else would like it

change
Mach4 plasma ESS.txt
to
Mach4 plasma ESS .cps

and put it here:

C:\Users\"your folder"\AppData\Local\Autodesk\Autodesk Fusion 360\CAM\cache\posts

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
How about this one liner?  In the original post code, change:

writeBlock(mFormat.format(power ? 5: 3));

to:

writeBlock(mFormat.format(power ? 62: 63), "P3");

Or I think

writeBlock(mFormat.format(power ? 62: 63)+"P3");

will work too.

Steve
« Last Edit: June 11, 2021, 03:35:32 AM by smurph »
Forgive me for asking stupid questions here; I gave up on Fusion 360 and anything plasma related with Mach4/ESS. So I was intrigued with this conversation and opened the file and there were a bunch of references to Mach3 and such.

I have tried to roll my own post for Fusion and Mach4/ESS with THC for some time. I get the basics working but the torch height control never works.

My OEM claims that the fault is with AutoCad. Does this post processor have THC using the ESS ?
Also, you write the same code that turns on the torch to turn it off...

function onPower(power) {
  initialG31 = false;
  //writeBlock(mFormat.format(power ? 62: 63));
 
  powerIsOn = power;
  if (power) {
    writeln("M62P3 (+++ Turn Torch On +++)");
    onDwell(getProperty("pierceDelay"));
    if (zFormat.isSignificant(getProperty("pierceHeight"))) {
      feedOutput.reset();
      var f = (hasParameter("operation:tool_feedEntry") ? getParameter("operation:tool_feedEntry") : toPreciseUnit(1000, MM));
      zFormat.setOffset(0);
      zOutput = createVariable({prefix:"Z"}, zFormat);
      writeBlock(gMotionModal.format(1), zOutput.format(getCurrentPosition().z), feedOutput.format(f));
    }
  } else {
      writeln("M62P3 (---Turn Torch Off ---)");
    if (zFormat.isSignificant(getProperty("pierceHeight"))) {
      zFormat.setOffset(getProperty("pierceHeight"));
      zOutput = createVariable({prefix:"Z"}, zFormat);
    }
    writeln("");
  }
}


Shouldn't the turn off code be?


      writeln("M63P3 (---Turn Torch Off ---)");
« Last Edit: July 21, 2021, 04:34:33 PM by subnoize »
For the records this Post file for Fusion DOES NOT support THC.