Question about M codes

mike_irving

Mike_Irving
On the Masso cheat sheet M8 is listed as flood coolant ON and M9 as coolant OFF.

When I look at my machine code I see no M8 or M9 but I do see M10 and M11 which is a clamp on and off.

I am not running coolant now but have a laser cutter hooked up thru a relay to turn on and off with the M8/9 code.

The weird thing is it will turn on the first time through the program but if I try to run through it again it doesn't turn on.

Is this a Masso thing or Fusion360? I am using their Masso code generator.



Mike
 

cncnutz

CNCnutz
Staff member
Hi @mike_irving

You can use the M8, M9, M10 & M11 for anything that you like. Clamps, coolant or laser.

Without seeing the Gcode file it is very hard to know what is going on one way or another. You would need to provide a file for us to look at.

Cheers

Peter
 

mike_irving

Mike_Irving
Peter,

I understand that M codes vary by machine but I thought it odd that Fusion wouldn't use the standard codes. In the masso.cps file it gives a list of coolant codes:

var coolants = [
{id: COOLANT_FLOOD, on: 8},
{id: COOLANT_MIST, on: 7},
{id: COOLANT_THROUGH_TOOL},
{id: COOLANT_AIR},
{id: COOLANT_AIR_THROUGH_TOOL},
{id: COOLANT_SUCTION},
{id: COOLANT_FLOOD_MIST},
{id: COOLANT_FLOOD_THROUGH_TOOL},
{id: COOLANT_OFF, off: 9}
];

Just wondered how the heck it could get a M10/11 out of that.

I have a really stupid question is the Z axis supposed to start at the upper limit/home switch and go up.

Like I have about 11 inches in Z it homes all the way up at 0 and is at about 10/11 at the part.

Is that correct? Also how do you use the offset tables?

Thanks,

Mike

Last time I was running a CNC machine was 1984 so I must have forgotten everything.
 

breezy

Moderator
@mike_irving

If you look at the coolant list you will notice those with a number are structured as such
  • Coolant_Name
  • Comma
  • State
  • Colon
  • Number

So if you wish to have other "coolants" working just edit list to provide state & number.

Z axis is usually Zero at top and goes negative downwards. So in your case your Z range is 0 to -10/11.

Offset tables set WCS at the defined MCS from the home position and you call them up in your Gcode.

As you are using Fusion, in job setup, in the WCS tab enter a number 0 - 6 for G54 to G59. Default is 0 and 1 = G54, 2 = G55, 3 = G56, etc.

Regards,

Arie.
 

mike_irving

Mike_Irving
Thanks Arie,

That clears up some of my questions, I will try changing the direction of my Z axis in the setup and see how that works.

"Offset tables set WCS at the defined MCS from the home position " does MCS mean manual coordinate system?

In Fusion when you set the Z should the arrow be facing up or down?

Mike
 

Attachments

  • z-axis.png
    z-axis.png
    1.2 MB · Views: 29

mike_irving

Mike_Irving
I did get the axis changed and now the automatic tool setting works fine.

Peter -CNCnutz does your g-code rewind button work? Mine doesn't - cycle start and start work fine though.

On my push buttons, works with the mouse on the screen.

Mike
 

breezy

Moderator
Mike,

MCS = Machine Coordinate System. XYZ zero is the home position.

WCS = Work Coordinate System. XYZ zero can be anywhere in the MCS.

You will notice on the MASSO screen it shows two sets of coordinates, top set is the WCS and the smaller set is the MCS.

Fusion Z axis is pointing up.

Regards,

Arie.
 

cncnutz

CNCnutz
Staff member
Hi @mike_irving


Quote from Mike_Irving on January 2, 2020, 2:57 am

Peter -CNCnutz does your g-code rewind button work? Mine doesn't - cycle start and start work fine though

Yes my Gcode rewind works fine.

Go to the F1 screen and make sure it changes from low to high when you press the button and when you use it press and hold the rewind button to rewind the gcode. A quick press will not work.

Cheers

Peter
 

mike_irving

Mike_Irving
Peter,

That was it, I wasn't holding it down long enough.

While you are answering questions....

How do the load G code 1-6 buttons work, naming of programs ?

And what triggers those bar lights red, yellow, green. I know about the outputs, but how does the machine controller know which to turn on?

Thanks,

Mike
 

breezy

Moderator
Autoload buttons will load files that are named Autoloadx.nc where x is a number 1 - 6. The file loaded corresponds to the button number.

Regards,

Arie.
 
Top