Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Steelbarz on June 08, 2021, 09:36:51 AM

Title: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: Steelbarz on June 08, 2021, 09:36:51 AM
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)
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: Tweakie.CNC on June 08, 2021, 10:49:47 AM
The M62/M63 command set will only work with Mach4 and the ESS Mach3 plugin will only work with Mach3.

Tweakie.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: Steelbarz on June 08, 2021, 10:52:45 AM
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("");
  }
}

Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: Tweakie.CNC on June 08, 2021, 11:08:45 AM
Looks like Andy at Warp9 is now dealing with this issue.

Tweakie.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: Steelbarz on June 08, 2021, 11:16:33 AM
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("");
  }
}
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: Steelbarz on June 08, 2021, 11:29:31 AM
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
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: smurph on June 11, 2021, 03:32:18 AM
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
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: subnoize on July 21, 2021, 04:20:19 PM
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 ?
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: subnoize on July 21, 2021, 04:32:55 PM
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 ---)");
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: subnoize on July 29, 2021, 07:59:46 PM
For the records this Post file for Fusion DOES NOT support THC.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: ashleylose07 on August 03, 2021, 06:35:26 AM
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.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: systema on October 09, 2022, 12:16:18 PM
Anyone made ground on this?

M@
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on October 09, 2022, 07:49:36 PM
Hi,
I can't really understand the point of this thread......THC is a realtime hardware thing not Gcode at all.

It's true that  Fusion 360 post generates Gcode from the Fusion tool path...but what Gcode command says 'Go up a little' or 'Go down a little'.....there is no such
Gcode instruction, and even if there were all Gcode instructions have to pass through the motion buffer, easily 100ms delay. That's not THC, THC is, or needs to be, realtime or close
to it.

Also this board is about Mach4....its not really about Autodesk software. All the excerpts that have been posted in this thread are from Autodesk's post processor which
is in C# if I understand it correctly....it's got nothing to do with New Fangled Solutions software at all. No doubt Mach4 users whom also use Fusion (as I do) am interested in Fusion posts
and so its not unreasonable to post on this board.......but strictly speaking this is not a Mach4 issue at all.

The ESS supports THC, in particular it supports the WarpRunner board, and that board is similar to the TMC board that precedes it. With the WarpRunner board and the plugin recommended
for it by Warp9 then THC works just fine.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on October 09, 2022, 11:36:26 PM
Hi,
see the attached pic, it is of the ESS plugin HC (Height Control) tab. Note that there are a few options, from no HC, to manual HC,
to two hardware HC types, namely Up/Down pins like the familiar Proma type THC controller and WarpRunner/TMC type controllers.

Do you have either a Proma type or a WarpRunner/TMC type controller?

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 14, 2023, 10:40:10 AM
Looks like Andy at Warp9 is now dealing with this issue.

Tweakie.
.

Tweakie,
Do you know if Andy ever finished up a fusion 360 post processor for mach4 for plasma?
I can’t seem to find one anywhere.
Thanks,
Chuck.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 14, 2023, 04:25:40 PM
Hi,
Fusion 360 already has a Mach4 post.

You will most likely have to modify it to suit your specific purpose, but the basic post is there and complete.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 14, 2023, 04:28:41 PM
Hi,
no doubt you'll want this:

https://cam.autodesk.com/posts/posts/guides/Post%20Processor%20Training%20Guide.pdf (https://cam.autodesk.com/posts/posts/guides/Post%20Processor%20Training%20Guide.pdf)

A breezy 288 pages, all in a good days work.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 14, 2023, 10:24:01 PM
Thanks Craig for your reply.

I’m not much on programming, hopefully somebody more familiar with  programming  can modify the Mach4 Mill post processor  to work on  plasma cutting.

Chuck
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 14, 2023, 10:52:38 PM
Hi,
but what is it you want the post to do?

THC is realtime hardware controlledprocess, its got nothing to do with Gcode.

A post, any post, can only ever produce Gcode, that's what it does. But there is NO Gcode that says 'go up a little or go down little', that is THC and is not
part of the Gcode file at all.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 14, 2023, 11:06:41 PM
Craig,
I would like it to work the way the Artsoft Mach3 plasma post processor works. 

The Mach4 Laser post processor works well using the M 62/M 63 commands that  Seth yes from liberty machine put together a Mach4  laser post processor.  But it does not work for Plasma Cutting.

Chuck
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 14, 2023, 11:08:26 PM
Hi,
what is it that you need the post to do?

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 12:19:07 AM
Craig,
Basically it needs to turn the plasma torch on and off. Because there is a time delay with the plasma torch coming on,  there needs to be a G4 dwell of a couple seconds before any G1 moves.

In Mach3, the Plasma post processor initially  moves the torch up .5” before the first cut is made.  After a cut is made the torch Is again moved up a half inch as the torch  moves to the next cut position.

For what I’m doing currently, I don’t need THC, but I would think that needs to be built into the pose processor because most machines use THC 

The Mach4 post processor, liberty machine made for laser cutting does not work for plasma cutting because of the time it takes for the Torch to start up.

It might be easiest to develop a plasma pose processor, starting with the post processor that’s already there for Mach4 laser cutting and build a time delay G4 into it

Tweekie said Andy was working on this but I haven’t heard anything.

Thank you,
Chuck
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 12:45:23 AM
Hi,
Ok you've made some points.

Quote
but I would think that needs to be built into the pose processor because most machines use THC

That's what I'm have said before THC is not, nor can it be anything to do with the post. Remember the post produces Gcode....but THC is not driven by Gcode, it's a realtime
voltage control loop, that is a realtime hardware control that if you like 'overrides' the Gcode file.

As for some of the rest:

Quote
Basically it needs to turn the plasma torch on and off. Because there is a time delay with the plasma torch coming on,  there needs to be a G4 dwell of a couple seconds before any G1 moves.

This is best handled by a macro. Call m101() for instance. Anytime m101() is encountered in the Gcode file the torch will turn on, with the required delay and NOT proceed with any
subsequent Gcode UNTIL the macro is complete.

Quote
In Mach3, the Plasma post processor initially  moves the torch up .5” before the first cut is made.  After a cut is made the torch Is again moved up a half inch as the torch  moves to the next cut position.

These too would be perfect candidates for macros, say m102() and m103().

Now you have three macros to control the behaviour of the torch now all you have to do is induce the post to insert in the Gcode file the macro calls at the required time.

There are a number of possibilities. One that I have used for defining a 'Safe location' in four axis toolpaths is called Pass Through. In Fusion/Manufacture/setup/ManualNC you'll find some
useful methods to insert code into a Gcode file, including Pass Through. All of these option can be automated.

I would suggest that you start by defining exactly the steps that you want the machine to take, for example the Torch Start sequence above. Code that sequence as a macro....then insert that macro
into the Gcode either manually or in automated fashion. There is no Gcode instruction to Start the Torch, so a post can't really do that, what it could do is insert a macro, which is just one line,
in this case m101, and you code what you want to happen in that macro.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 09:03:25 AM
Hi Craig, thanks for the detailed response.

I understand now what you were saying about the THC.

I have never messed around with macros, but It sounds like I need to learn how to do macros and along with the 288 page post processing guide you sent, create a post processor for Plasma.

I am really surprised that no one out there using Mach4 has not developed a  post processor for plasma cutting.

Thanks again for all your suggestions.
Chuck.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 04:52:09 PM
Hi,
if you look on page 6 of the Mach4PlasmaConfiguration PDF in Mach4Hobby/Docs you'll see that m3, conventionally means StratTheSpindle, but in the Plasma ScreenSet
it means StartTheTorch with the settings applied as stored in the registers, things like PierceDelay and TargetCutHeight.

It would appear that the m3 macro is already there and available.

Now all you have to do is have the post insert m3 to start the torch, and an m5 to stop it. Posts do that normally anyway, given that m3 means StartTheSpindle and m5 means StopTheSpindle.

Quote
I am really surprised that no one out there using Mach4 has not developed a  post processor for plasma cutting.

The Fusion Mach4 Post Processor is written by and maintained by Autodesk. Its covered by intellectual property law....it belongs to Autodesk. Autodesk encourage you to use it
and modify it to match your needs but at all times it remains Autodesk property. The post itself takes the underlying movement code, an Autodesk proprietary protocol, and then generates
the Gcode according to the post. Note that while the post is published the underlying protocol is not. If you wanted to write your own post then you would have to reverse engineer the Autodesk
protocol...and I would NOT expect Autodesk to help you, although I don't think reverse engineering it would be considered an infringement.

Have you seen the Plasma Tool Select screen of Fusion.
When you go to choose the tool for Manufacture, select Cutting rather than Milling and you'll see Waterjet, Laser and Plasma as options. May I suggest you experiment with those and see what sort of
code Fusion generates as is before you worry too much about modifying the post.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 04:59:58 PM
Hi,
digging around a bit more and I found this already in Fusion. You can modify it to suit your needs, but its already there, you have to take advantage
of what Autodesk has already loaded into Fusion.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 06:43:56 PM
Hi,
ask yourself whether its likely that Fusion cannot produce code for Plasma, Waterjet etc. This is a company worth hundreds, maybe billions of dollars
and sells hundreds of millions of dollars worth of software annually....do you suppose they would ignore things like Plasma, Waterjet and Laser? I rather think not.
That suggests that there is capacity to do things that you and I are unaware of but exist nonetheless.

It's probably worth a posting a request for information about Plasma (Cutting) specific features on the Fusion Forum. If there are features you can use, and I've already seen a couple
of them, and feel bound that there is more then someone will gladly tell you what they are and where you can find them.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 06:52:09 PM
Craig,
Yes, I have been using the different cutting manufacturing process in fusion.

I am able to define the Cutter paths for the Plasma Cutter and then when I go to post process those cutter paths, if I choose the Mach3 plasma post processor, everything works perfectly when running that G code on Mach3.

There is no Mach4 Plasma post processor, that I can find aware of and if I use the post processor for laser cutting, it does not have the time delay required for Plasma since Laser turn on time is instantaneous, so if I use the  laser post  processor for Plasma,  the cut doesn’t start for about two seconds after the command is given to the Plasma Cutter.

So the post processor for Plasma Cutting  for Mach4 would be very similar to the Mach4 Laser post processor except it needs a G4 dwell time of about two seconds before a G1, G2, or G3 command is requested.

Chuck
 
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 07:09:24 PM
Hi,
I had no trouble generating a Plasma Toolpath but it fails when going to post. This usually means that some feature in the post is turned off.

This happened to me when I was trying to post four axis toolpaths. I had to go into the post and define the fourth axis, it was already there, I just had to turn it on
with the appropriate data. I suspect that this issue will be the same thing. That is to say you need to go into the Mach4 post and define certain things, in effect turn
the Plasma feature on.

This is a slam dunk for the Post Discussion board on the Fusion Forum. Ask there and you will get the info you need to turn on the required features.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 07:27:50 PM
Craig,
Relative to, “ I had no trouble generating a Plasma Toolpath but it fails when going to post. This usually means that some feature in the post is turned off.”

You say it failed when you went to post, what post processor did you choose?

If I post process to Mach3 plasma, it works fine.  So I am not dead in the water plasma cutting, but I would like to be able to do Plasma Cutter under Mach4.

I will take your advice and post this question to the other group you mentioned.

Thanks again for your help,
Chuck



Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 07:29:19 PM
Hi,
OK, I have used the Mach3Plasma post, and it works. Why not just use that?
You may have noticed that Mach3 toolpaths, with very few exceptions, run in Mach4 and vice versa. The only time Mach4 fails to run Mach3 Gcode
is when one of the shortcuts for which Mach3 was famous for is invoked and Mach4 refuses to play ball. It usually means tweaking the Gcode so that it meets
the more formally defined Fanuc21i for which Mach4 is almost a dead ringer.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 07:41:31 PM
Craig
Relative to, “ OK, I have used the Mach3 Plasma post, and it works. Why not just use that? ”, are you suggesting using the Mach3 Plasma post in Mach4? Or are you saying simply use Mach3 and forget, using Mach4 all together? 

Chuck
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 07:49:13 PM
Hi,

Quote
are you suggesting using the Mach3 Plasma post in Mach4? Or are you saying simply use Mach3 and forget, using Mach4 all together?

My intent was to say use Mach4 but just use the Gcode file that was generated for Mach3. In 99.999% of cases a Mach3 file will run in Mach4 and vice versa.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 07:51:27 PM
Craig,
I tried that and it did not work, but I think it might’ve had something to do with how I have Mach4  configured for spindle start and stop. I need to look into this. 

Chuck
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 07:57:19 PM
Hi,
this is the Gcode generated by Fusion using the Mach3 Plasma post:

Code: [Select]
N10 G90
N15 G71

(2D Profile1)
N20 G0 X22.67 Y-2.5
N25 M3
N30 G4 P1.
N35 G1 X27. Y0. F1000.
N40 G3 X-27. I-27. J0.
N45 G3 X27. I27. J0.
N50 G1 X22.67 Y2.5
N55 M5


(2D Profile2)
N60 G0 X184.83 Y-117.5
N65 M3
N70 G4 P1.
N75 G1 X180.5 Y-120.
N80 G2 X180. Y-120.5 I-0.5 J0.
N85 G1 X-180.
N90 G2 X-180.5 Y-120. I0. J0.5
N95 G1 Y120.
N100 G2 X-180. Y120.5 I0.5 J0.
N105 G1 X180.
N110 G2 X180.5 Y120. I0. J-0.5
N115 G1 Y-120.
N120 G1 X184.83 Y-122.5
N125 M5

N130 M30

And there is nothing about it which is alien to Mach4. The only thing is that it uses M3 followed by a G4 P1 to turn the torch on. Have you a properly configured M3
in your profile?

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 08:01:49 PM
Craig,
I think our messages are getting crossed in the mail.

Relative to, “ Have you a properly configured M3”

I think that’s what my problem is.

Do you have any insight on how I need to configure M3 for Mach4?

Chuck

Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 08:15:28 PM
Hi,

I have just generated another toolpath for a somewhat smaller part. I ran the Mach3Plasma post and have run the code on my mill. It runs fine, but obviously the spindle turns on
rather than a plasma, but the code runs fine with the correct clearance for the width of the cut.

As to what constitutes an decent m3....well.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 08:19:42 PM
OK, I need to find out how to get my spindle on/off, M3/ M5 configured properly in Mach4
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 08:25:22 PM
Craig,
 As I understand, in Mach4 M62 and M63 were developed for more precise, laser cutting., Much more precise than M3 and M4.

I was hoping a post processor could be developed for Mark’s for using the M 62 and M63 commands.

Chuck
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 09:08:50 PM
Hi,
I don't use either Laser or Plasma so I'm having to guess to a certain extent.

m62/m63 are for lasers. It turns the laser on, but ONLY when the machine has started to move, otherwise the laser would burn a spot right at the start. m63/m63 are not right for you.

First thing you may note is that I use lowercase m or lowercase g in all Gcode....because Mach's Gcode interpreter parses all Gcode to lowercase, strips out leading zeros and whitespace. Thus
M03 becomes m3, etc. When the interpreter encounters an M3 for instance its going to search for code starting m3. To make sure it finds it then use its preferred format, ie lowercase and without
leading zeros. Note that I often still use whitespace to separate items for readabilities sake, but should in truth remove whitespace as well so g1x16.67y45.67f556 not g1 x16.67 y 45.67 f556.

When Mach encounters an m3 it will search in the macros folder of the current profile, if it does not find it it will search 'up the file tree' until it does. Normally this means that Mach will
use the built in m3 that turns the spindle one. Presumably the built-in m3 will turn on the SpinOn signal and generate the required PWM to meet the prevailing S word etc. In your case you want
m3 to turn on the torch so you will have to write your own m3() function and put it in the macros folder of your profile. Thus Mach will find and execute your macro BEFORE it searches to find the built-in one.

I would guess you need to code something like:
Function m3()
1) g31 probe the surface of the material
2) Back off the surface of the material by 20mm or so
3) Activate the torch turn on relay.
4) Wait until the ARC_OK signal is received from the plasma. If an ARC_OK signal is not received within 5 seconds....bail ARC_FAIL_YOU_BLOODY_PLONKER.
5) descend to pierce height
6) Wait for the pierce delay
7) Return....this signals that the torch has fired, arc stabilised, pierced and is now ready to cut.

And your m5 would be something like:

Function m5()
1) De-activate the torch relay
2) Lift off the material by 20mm
3) Return

Craig

PS: the ARC_FAIL_YOU_BLOODY_PLONKER is optional!
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 09:50:18 PM
Craig,
“ m62/m63 are for lasers. It turns the laser on, but ONLY when the machine has started to move, otherwise the laser would burn a spot right at the start.” 

I’m with you on this. But there is no reason m62/m63 would not work for Plasma as long as g4p2 dwell is included,  I have manually put a two second dwell before any x or y axis  movement
And the it did  operate properly.

I am really not into macros/programming so I think I’m going to simply use Mach3 for my plasma cutting and wait for somebody to develop a plasma cutting post processor for Mach4.

Thanks for all your input,
Chuck


Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 10:29:10 PM
Hi,

Quote
Mach3 for my plasma cutting and wait for somebody to develop a plasma cutting post processor for Mach4.

I think you'll be waiting a long time....what you want is not done by a post processor, what you require is to set up your machine with a compliant m3()
which is a function of your machine, and that is not a post process at all.

What you are actually saying really 'I want someone to write some magic code so I don't have to', and that tends to take a long time.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 15, 2023, 11:17:38 PM
OK, Craig, sounds like I’m gonna have to learn how to do macros which I’ve been avoiding.

Thanks for all your input,

Chuck.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 11:33:18 PM
Hi,
this one is really simple, or at least can be simplified down to a couple of lines.

A more sophisticated macro would be bigger and take more effort.

Lets say for the moment you ignore all Z axis movement, that is to say you jog the machine to the start point and set it to the correct cutting height.
Then all you have to do is say Turn the Arc On, wait for 2 seconds and return. That would be enough, two, three maybe four lines.

A slightly more complex start routine would be Turn the Arc ON, wait until the ArcOK signal is received and return. If the plasma refuses to fire then the ArcOk signal
will never happen, ie the arc did not start so there is no point moving to cutting stuff because there is no arc.

A more complex one again would be to go to some safe height before starting the arc, the Start the Arc, wait until ArcOk signal, drop to pierce height, wait 2 seconds to pierce,
drop to cut height and return.

So you can see that you can start very simple and add nuances to match your requirement, but the simplest is about three or four lines.

What signal have you used to control the Arc relay? Have you hooked up the ArcOK signal from the plasma and to what input did you hook it to?

Craig


Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 15, 2023, 11:44:06 PM
Hi,
I've just been experimenting with the Mach4 Plasma screenset and it appears like m3 is already coded and working. Is there a reason you don't use it?

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 16, 2023, 12:46:56 AM
Craig,
“ Is there a reason you don't use it?”

The reason I didn’t use it was  because I have been looking for a Plasma post processor for Mach4 like the one Artsoft has for Mach3.

If I had used the Mach4 Plasma screenset, what post processer in fusion 360 would I use for my “plasma cutting”tool paths?

Chuck
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 16, 2023, 01:03:30 AM
Hi,

Quote
If I had used the Mach4 Plasma screenset, what post processer in fusion 360 would I use for my “plasma cutting”tool paths?

The same one, it seems the Mach3Plasma post.

You seem to be fixated on the post....and the post has got ZERO to do with it. The post generates Gcode , but Gcode does not start or stop the torch,
that is m3 or m5.

The machine behaviour in response to m3 or m5 is where you need to concentrate. You have already proven that you can get perfectly good tool paths from Fusion and
the Mach3Plasma post.....but what you can't do is turn the torch on or off.....and that's got nothing to do with Fusion or the post.

The Mach4Plasma screenset already has a sophisticated m3 routine built in....there is no need for you to code it.

It first touches off the material surface. Note this procedure is optional, although you'll certainly want it if you are using different thickness plate. Anyway once the machine
touches off the plate and effectively determines where Z zero is then in raises to the torch start height....whatever you program in. Then it fires the torch and waits for the
ARC_OK signal. If it doesn't get an ARC_OK signal after about three seconds it faults, ie the torch has been told to fire but it fails for whatever reason.

Assuming the torch does fire and Mach receives the ARC_OK signal then the torch lowers to the pierce height, whatever you set. After a pierce delay of so many seconds, whatever you set,
then it starts to decsend to its target cut height, agin whatever you specify and starts the tool path.

What you really need, as a minimum, is a circuit to activate to turn the arc on and an ACR_OK signal. Ideally you'd have a probe input so the torch can touch off too.

Do you have those?

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 16, 2023, 02:01:46 AM
Craig
OK, I understand what you’re saying.

“What you really need, as a minimum, is a circuit to activate to turn the arc on and an ACR_OK signal. Ideally you'd have a probe input so the torch can touch off too.

Do you have those?”


To activate the arc, I’m using output number 2, which is a pin16 of port2.


Not sure about the “ ACR_OK signal” and “probe input”.
I will look into these.

Thanks,
Chuck
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 16, 2023, 05:34:43 PM
Hi,
so what plasma machine do you have?.

There are three things that ALL plasmas have that are intended for machine use.

The first is an input to start the arc, it replicates the trigger on a handheld torch. The best solution is s set of isolated relay contacts with the relay
under control of  Mach. Sounds like that's what you've got.

The second is ARC_OK. When a plasma arc first starts the tip is energised and the nozzle is earthed. The plasma current is usually limited to 20A
or so otherwise the nozzle will be wrecked. If the arc in in reach of the plate the arc will 'transfer' to the earthed plate, and the plasma machine will recognise this
and release the earth on the nozzle thereby preventing further excessive wear while the arc is now formed between the tip and the plate. Now the plasma current will ramp up
to whatever you have set the machine at. The 'transfer' and current ramp up signal that the machine is ready to cut and it will close a set of relay contacts (typically)
and that is the ARC_OK signal. Mach would use this to determine that the plasma has established an arc and that it has successfully transferred to the plate. It will now
assume the correct pierce height and the cutting will begin.

The ARC_OK signal is critical. If the m3() macro in Mach4Hobby Plasma screenset does not recieve an ARC_OK signal after a few seconds it will fault out.

I noted in a previous post that you start the plasma and wait for a fixed delay, two second or whatever. That might be how you'd do it manually but a machine plasma uses
the ARC_OK signal.

I worked for seven years for a company that sold and serviced welding equipment. I was an electronic repair tech, and used to repair plasmas and plasma tables.
Our premier brand was Hypertherm, but over the years I worked with  Kaliburn, ESAB, Lincoln, Miller, Thermal Dynamics and who knows how many Chinese machines.
All of the good ones had an ARC_OK signal.

The last feature that is required for machine use is a arc voltage output. Hypertherm have a 50:1 voltage divider, while some of the other brands copied that same 50:1,
others were 20:1, 25: 1, 30:1 etc. This voltage is used by the THC module to monitor the arc voltage.

One other feature you'll need is a probe input.  When you put a piece of plate in the machine the torch needs to descend and touch off the plate to know where the top surface is.
Without knowing that then your Pierce Height or Cut Height  don't really mean much do they? And what happens if you take a 3mm plate out and put in a 12mm plate for the next part?
If you don't have some routine to tell where the new surface level is the machine will drive to '3mm off the plate being pierce height' only to find that is still below the surface
of the piece of 12mm plate you just put in. The traditional way to do this is to use a g31 probing move. The torch descends from some safe height until the nozzle touches the
plate and Mach detects that touch or probe event and stops. It latches the Z axis location so it knows where the surface of the plate is. Many plasmas have a connection on the plasma
machine which is hooked to the nozzle of the torch to facilitate this touch off. Its sometimes also called Ohmic probing.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 17, 2023, 12:21:29 AM
Craig,
Thanks for all the detailed information on Plasma Cutters.

I have an thermodynamics cutmaster 52

I do not have a THC module and my set up is pretty basic. I have the plasma torch  mounted on my milling machine which has a 28 inch X travel and a 15 inch y travel.

A Couple years ago, I worked with Arturo, CNC4PC,  trying to get a THC module set up on my machine and we could not do it, machine compatibility issues.

For the small parts that I cut I really don’t need the THC.

I have had good success with Mach3 Plasma.

Hopefully I can get Mach4 Plasma working correctly.

Thanks again for all your input.
Chuck.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 17, 2023, 12:32:07 AM
Hi,
what you need is an ARC_OK signal. I think Thermal Dynamics include one. Look in the manual. If you have an ARC_OK signal then you could get
the rest working no trouble. If I'm not mistaken there is a round multi-pin plug on the back of the machine, called Machine Plug or similar. Find it and get the pinout
of the plug.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 17, 2023, 12:34:48 AM
Will do,
Thanks
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 17, 2023, 12:54:02 AM
Hi,
I found this within a few minutes.

There is an ARC_OK signal, its closing relay contacts called OK TO MOVE by Thermal Dynamics. The Start/Stop presumably you've already got sorted.

It would be no trouble to tap into the machine to read the torch voltage, I've had these things in 1000 bits on a number of occasions. They have an IGBT
to close the earth to nozzle circuit used at start up. If it fails short circuit, and it often does, the nozzle blows out repeatedly in short order. I used to keep the IGBTs in stock,
and given how tight my boss was that was a battle!

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 17, 2023, 01:07:13 AM
Hi,
yep, 'piece of piss mate' (translates to 'too f*****ing easy!!). See on the CNC board its got a voltage divider, either /16.67 or /30 or /50 and that you need to hook the input of the divider
to the terminal on the main board that is connected to the tip, ie arc voltage.

Five dollars worth of resistors and a couple of capacitors and you'd have divided arc voltage for THC if you want. These things are pretty basic, and its
all there if you want it. Ideally you get the additional option board that has the 'you beauty' plug on it and all that s***t but you don't need it. I'd solder the wires in in ten minutes.

Craig
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 17, 2023, 10:05:57 AM
Wow, that sounds encouraging. If I were to purchase a THC, do you have a recommendation?.

I don’t use my plasma set up that often. I have a 18o watt CO2 laser connected to the same machine which I also use as a milling machine.

I have been  satisfied with Mach3 Plasma using M3/M5 to control the plasma. But if I could get a THC set up that would be sweet.

Thanks for researching all this for me.
Chuck.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: joeaverage on May 17, 2023, 03:34:00 PM
Hi,
there are various THC units with ever increasingly sophisticated operation.

One of the goto standards for Mach users is the Proma 150. In essence you hook it up to the plasma without even the need of a divider,
set the target voltage and the unit produces two signals THC_UP and THC_DOWN. This works but has no anti-dive.

If you use an ESS motion controller then the WarpRunner THC board is the correct choice. It is an optimized design of the TMC3in1 which
preceded it, and is specifically meant to work with the ESS. It has good anti-dive functionality. Overall, the WarpRunner provides functionality
that you might expect from Hyperthrm but at a fraction of the price.

If previously you've had successes without THC, then you can again have that success without it, but you do need to hook up your plasma to your
breakout board/motion control combination to take advantage of the Mach4Hobby Plasma screen and the features it includes. That you can do
without having to spend anything. I suspect you'd find that combination a significant step forwards and upwards in terms of automation and usability over what
you have been accustomed to in Mach3......and may decide therefore that THC is just an un-warranted expense.

Craig

Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 17, 2023, 03:43:13 PM
Thanks Craig for your detailed and unbiased approaches to THC.

I’m going to take your advice and tie it into my ESS. Sounds like a no-brainer for what I have going in my hobby shop.

Thanks again for all your input to my original post.

Chuck.
Title: Re: Mach4 Post Processor for Plasma in Fusion 360 and a ESS motion - Cant Find One
Post by: chuck767 on May 18, 2023, 10:43:44 AM
Craig,

One more question  :) ,any insight on doing this BOB/ESS hookup?

I looked on Warp9 site and only found info on setting up with THC.

You wrote;
“If previously you've had successes without THC, then you can again have that success without it, but you do need to hook up your plasma to your
breakout board/motion control combination to take advantage of the Mach4Hobby Plasma screen and the features it includes. “

Thanks,
Chuck