Hello Guest it is March 29, 2024, 07:38:41 AM

Author Topic: Edits to M6End not being seen?  (Read 5769 times)

0 Members and 1 Guest are viewing this topic.

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Edits to M6End not being seen?
« on: January 02, 2012, 01:03:51 AM »
Hi all

I will cheerfully admit to all sorts of incompetence, but ...

I have been trying to edit the basic M6End macro (in Mill) to get it to lift the Z axis up clear of the job before making any XY moves. Saves on broken cutters that way.

But despite stopping and reloading Mach many times, it still does not see the modified macro. I've got a M100 message macro inside it as a check; it does not appear and there is no Z-axis movement anyhow. No XY axis movement either, for that matter. Old position is not being restored.

I looked in the Operator pull-down list for the 'view what macros you have loadd' option, but it wasn't there either.

Um ... Help?
And is it OK to use Notepad to edit the m1s files?

Cheers

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Edits to M6End not being seen?
« Reply #1 on: January 02, 2012, 03:51:59 AM »
Is it definitely the correct one you are editing? ie the m6end.m1s you re editing is in the macro folder of the profile you are using?
Probably bet to use the editor in Mach itself to edit but I have used notepad as well.
Hood

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: Edits to M6End not being seen?
« Reply #2 on: January 02, 2012, 04:20:54 AM »
Hi Hood

Yes, I am definitely editing the right one.
How do I know? Because when I tried to use the edited version the system did not 'behave itself'; when I restored the old version (file name change) the system did behave itself (after I had posted). So Mach was seeing the file anyhow. Fortunately I was testing with soft plastic ...

From this I conclude that whatever edits I made caused Mach to reject the modified code ... OK, some progress.
Mind you, while I have been writing Basic for the last ... 30+ years, the inconsistencies in the doco leave me really wondering.

First of all, the M6End.m1s file seems to be written maybe on a Linux machine as it does not use <CR><LF> between the lines. So the file looks a trifle wrong in NotePad, although WordPad manages OK. Read ansd save in Wordpad without any edits and the record terminator changes so that Notepad can handle it. Ah, but can Mach handle both formats? Dunno.

The 'else' clause in M6End.m1s contains this: Code"G00 X" & x & "Y" & y - withOUT any brackets. That is hardly 'Basic'. The example in the Macro Programming Reference doc (Draft rev 0.18) shows (for example) Code(“G00 X-4.000 Y1.000 Z1.000”), with brackets. Conventional basic. I have tried both.

What I did was change the else clause to restore the starting Z position first. So it went from this:
else
Code"G00 X" & x & "Y" & y
end if

to this:
else
code("G0 z" & z)
Code("G00 X" & x & "Y" & y)
end if

In the event, neither G0 instruction seems to have been acted upon.

It's evening here. I will try all this again in the morning using the Mach VB editor, to see whether that makes any difference.

Cheers


Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Edits to M6End not being seen?
« Reply #3 on: January 02, 2012, 07:46:17 AM »
In General Config, do you have "Stop Spindle, Wait for Cycle Start" selected?
If not, then M6End is not used.

Personally, I use Wordpad for the reasons you stated.

Also note that the current lockdown, 3.43.022, has a nasty M6End bug that can lock up your PC under certain circumstances
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Edits to M6End not being seen?
« Reply #4 on: January 02, 2012, 09:46:15 AM »
Easy test is to just send yourself a message in the M6end macro

Message"YEP"

Tha way you KNOW it is being seen at tool change and you have the correct macro.

Just a thought, (;-) TP

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: Edits to M6End not being seen?
« Reply #5 on: January 02, 2012, 03:38:58 PM »
In General Config, do you have "Stop Spindle, Wait for Cycle Start" selected?
Oh yes, for sure.

Quote
3.43.022, has a nasty M6End bug that can lock up your PC under certain circumstances
Not seen that (yet). Details?

Cheers
(More testing after breakfast.)

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: Edits to M6End not being seen?
« Reply #6 on: January 02, 2012, 03:40:09 PM »
Easy test is to just send yourself a message in the M6end macro
I tried using M100, to no avail. I'll try Message shortly, after breakfast.

Cheers

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Edits to M6End not being seen?
« Reply #7 on: January 02, 2012, 05:25:42 PM »
Quote
3.43.022, has a nasty M6End bug that can lock up your PC under certain circumstances
Not seen that (yet). Details?


I reported it on the Yahoo group back in March I think, and it was fixed in  development version 3.43.028. But the lockdown hasn't changed for about a year so it's still in it I think.
Many different code combinations could cause it. Someone tested and found that if the M6End just contained one line of code with MsgBox() in it it would crash.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: Edits to M6End not being seen?
« Reply #8 on: January 03, 2012, 01:46:09 AM »
Progress report.

I saw an error message at one stage saying the Mach had encountered a script syntax error in M6End. It was quickly replaced by other messages, but AHA! Could I see what the syntax error was in M6End? Not  chance!

I rewrote the M6End macro from scratch using the Mach VB editor and/or Wordpad and omitting stuff I don't need right now. It now works fine, using either editor. All very strange!

However, attempting to invoke the M100 macro does not work, but maybe that was where one syntax error was.
Code"G00 X" & x & "Y" & y - without any brackets does work (irregular, to say the least!)
Code("G00 X" & x & "Y" & y) - with brackets does work.
Code"g0 x" & x & "y" & y - with or without brackets but with lower case does work.

Can I explain what was going on before? Nope. But I have a working M6 system now (Z lift before XY movement).

Can I find the operator/macros menu item? Nope. Perhaps the manual and the current version differ?

Thanks to all for help.

Cheers
Re: Edits to M6End not being seen?
« Reply #9 on: January 03, 2012, 02:30:18 AM »
What is this M100 macro you keep mentioning?  I don't think it's a standard part of Mach3....

Regards,
Ray L.
Regards,
Ray L.