Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: cjlocey on May 20, 2020, 08:39:54 PM

Title: How to enable M6 script
Post by: cjlocey on May 20, 2020, 08:39:54 PM
I am new to Mach and the CNC world.  I have my machine set up with a touch plate and I want to enable the manual tool change feature featured in one of the Artsoft videos.  I copied the m6 script and placed it in my empty macros folder. 
What do I need to do to enable this macro so when the M6 command comes up in my GCODE the script executes like in the video?
Title: Re: How to enable M6 script
Post by: Graham Waterworth on May 24, 2020, 08:35:46 PM
General config
Title: Re: How to enable M6 script
Post by: cjlocey on May 25, 2020, 12:57:32 AM
When the GCODE reaches a M6 command, the CNC stops and does wait for a cycle start but I am not able to get the macro/script to run that allows me to use my touch plate and set a new tools offset for the new tool.
Title: Re: How to enable M6 script
Post by: Graham Waterworth on May 25, 2020, 03:42:27 PM
I think you need to put your macro on here so we can see how its working.  Zip it up and give it a new name or you will get a already exists error, date and time is usually good.
Title: Re: How to enable M6 script
Post by: cjlocey on May 25, 2020, 05:16:04 PM
The macro was copied from the test with this video.  I think the macro is fine, I think the issue is Mach4 does not know I put the file in the macro folder. 
I created a custom profile for my CNC and there are not any "default" macros in the macro folder...in fact it was empty when I put this macro in the folder.
I do not know what I need to do to "activate" the macro
https://www.youtube.com/watch?v=6-4JkDv9AgM
Title: Re: How to enable M6 script
Post by: joeaverage on May 25, 2020, 06:19:57 PM
Hi,
how did you name your macro?

It should be named 'm6.msc' and note that lowercase is important.

When a macro is called Mach in the first instance searches the macros folder of the current profile, if it does not find it there it searches further
up the directory tree until it finds the default m6 macro built into Mach.

I think Mach is ignoring your macro because its not named correctly.

Craig
Title: Re: How to enable M6 script
Post by: cjlocey on May 25, 2020, 08:09:12 PM
I did name it as you stated and after Mach ran the firs time a m6.mcc was created alone with another lua file.  (sorry, but I am not near the PC I use with Mach)
Title: Re: How to enable M6 script
Post by: cjlocey on May 25, 2020, 09:29:10 PM
Craig
You were spot on.  My files were names M6.msc not m6.msc.  After i corrected this I and finally getting a response.  Now I need to get my inputs set up right...active high or low.
THANK YOU
Title: Re: How to enable M6 script
Post by: joeaverage on May 25, 2020, 11:01:41 PM
Hi,
Mach4 converts all uppercase to lowercase. In most circumstances Windows is not case sensitive however there are situations
where that is not the case....and they can be real hard faults to track.

When Mach was searching it was searching for 'm6....' and it did not find 'M6....'.

The recommendation is to render all Gcode and filenames as lowercase.....it prevents faults.

Craig
Title: Re: How to enable M6 script
Post by: cjlocey on May 26, 2020, 10:28:32 PM
You all dd a great job of helping me get the code set up for my probe to work.  Now can someone tell me where I set the thickness of my touch plate?  I have a cheap Amazon special touch plate that is .75" thick.