Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: mpoling on January 15, 2019, 05:19:56 PM

Title: Mach4 Hobby Autotouchplate function
Post by: mpoling on January 15, 2019, 05:19:56 PM
Hi everyone.  I have a CNC Router Parts 4896 Pro machine with the Plug and Play ESS electronics package.
I have everything working wonderfully in Mach3, including the touchplate and a diode laser for engraving.  I run Windows 7 and no issues whatsoever with Mach3.
I am trying to move to Mach4 for the improved laser functions. 
I am running into a few issues, the current main issue being Auto Zero functioning with edge finding.
In Mach3, the script will find the top of the material and the corner automatically (although it only uses the X+ and Y+ sides rather than finding the actual centre, as it has the width of the plate programmed in the script.)
However, in Mach 4, it will not work properly.  If I do a Z only, it works fine.  If I find the centre of the touchplate only, it works fine.
But when I try to find the bottom/left corner with Z, it will do a Z probe, retract, do a Y- move, make contact, then move Z to the touchplate and stop with an Error: Unexpected Probe Touch message.  The history file reports:
" Z axis is performing a touch move.ESS: Successful Probe0 Strike.  Probing finished.Z Axis Offset Set to: -1.1236220472441.RetractingY axis is performing a Level 2 prep move.ESS: Successful Probe0 Strike.  Probing finished.Z axis is performing a Level 1 prep move.ESS: Successful Probe0 Strike.  Probing finished.ERROR: Unexpected probe touch".
Given that the single functions work fine, I'm guessing there is some sort of error in the script, but I am not a programmer. 
Any help please?
Thanks
Mike Poling
Title: Re: Mach4 Hobby Autotouchplate function
Post by: N45CNC on March 24, 2019, 09:40:58 PM
 Due to the age of your post, I assume you figured out the script? Would you share your resolution? I’m having the same issue.
Have a CNC Router Parts touch plate, their newest model. I’m able to do the Z zero no issues. But their Web site has yet to support any Mach 4 script, just Mach 3. Maybe someone can point me toward a thread that will get flying straight.
 
Thanks, Larry
Title: Re: Mach4 Hobby Autotouchplate function
Post by: mpoling on March 24, 2019, 10:21:52 PM
Nope, all I got was crickets after this post.  The issue still remains.
Title: Re: Mach4 Hobby Autotouchplate function
Post by: N45CNC on March 24, 2019, 10:39:38 PM
Have you reached out to CNC ROUTER PARTS?  Mach 4 has been out awhile, they need to get with it. Update the script!
Have been searching some other post on Mach 4 auto zero touch plates. Have no tried any yet.

Thanks, Larry
Title: Re: Mach4 Hobby Autotouchplate function
Post by: mpoling on March 24, 2019, 10:41:36 PM
I have.  Their last statement to me was that there would be Mach4 support “soon.”
That was 3 months ago.
Title: Re: Mach4 Hobby Autotouchplate function
Post by: Chaoticone on March 25, 2019, 09:27:02 AM
Are you two talking about the mcTouchOff module (as in the attached screenshot)?

If so, you need to make sure it is tuned (Retract distance, prep feed rate, Prep Distance, etc.) for your machine and touch plate. Also, it is a given that the distance from work Z, X and Y are all equal thicknesses (touch plate height) on your touch plate. Another thing to check is make sure your input is not noisy/bouncy. If you had debounce set it Mach3 then your probe input likely needs some filtering in Mach4 as well. I know filtering can be configured for each input on the ESS.
Title: Re: Mach4 Hobby Autotouchplate function
Post by: dws on March 25, 2019, 01:52:09 PM
I don't think that the Mach4 TouchOff module is compatible with the CNC Router Parts Corner Finding Touch Plate. https://www.youtube.com/watch?v=XsoHyPgaDzo (ftp://www.youtube.com/watch?v=XsoHyPgaDzo) Is there a way to configure the TouchOff module for this touchplate?

I made a coroutine for finding the lower left corner of the work with a 1/4" diameter bit with the Corner Finding Touch Plate. It works great for me. I then follow with a second coroutine that sets the Z height to zero at the spoil board with another fixed touch probe with each tool.

It would make the TouchOff module a little more useful if it could be made to work with the Corner Finding Touch Plate.
Title: Re: Mach4 Hobby Autotouchplate function
Post by: Chaoticone on March 26, 2019, 12:55:05 PM
I don't think that the Mach4 TouchOff module is compatible with the CNC Router Parts Corner Finding Touch Plate. https://www.youtube.com/watch?v=XsoHyPgaDzo (ftp://www.youtube.com/watch?v=XsoHyPgaDzo) Is there a way to configure the TouchOff module for this touchplate?

I made a coroutine for finding the lower left corner of the work with a 1/4" diameter bit with the Corner Finding Touch Plate. It works great for me. I then follow with a second coroutine that sets the Z height to zero at the spoil board with another fixed touch probe with each tool.

It would make the TouchOff module a little more useful if it could be made to work with the Corner Finding Touch Plate.

The TouchOff module could be adapted to work with pretty much anything. Or someone could write a module from scratch specifically for any touch plate or probe or combination of. But the TouchOff module was never intended to be a do all, throw anything at it anyone can dream up and it just works kind of thing. It was written to use as is and/or as a known good working example others can review when writing their own custom module.
Title: Re: Mach4 Hobby Autotouchplate function
Post by: mpoling on March 26, 2019, 09:08:41 PM
I have configured it to the specs of the touchplate.  I know the touchplate can be made to work, as it is simply accepting input from touching each side of the plate and reading the input signal.  Heck, a homemade touch plate would work if you had exact spec on it. 
The issue is the script self terminates with the error I mentioned above.  If it can find the centre of the touchplate and the Z individually, but fails on the combined part of the script, wouldn't that suggest the error is in the script itself?
Mike
Title: Re: Mach4 Hobby Autotouchplate function
Post by: Chaoticone on March 26, 2019, 09:52:53 PM
I have configured it to the specs of the touchplate.  I know the touchplate can be made to work, as it is simply accepting input from touching each side of the plate and reading the input signal.  Heck, a homemade touch plate would work if you had exact spec on it. 
The issue is the script self terminates with the error I mentioned above.  If it can find the centre of the touchplate and the Z individually, but fails on the combined part of the script, wouldn't that suggest the error is in the script itself?
Mike

Nope, "Unexpected probe touch" means the probe touched when it shouldn't. Or more accurately, the probe input changed to active state during a non-probing move. If the probe is actually touching something when this error occurs you might need to adjust the touch off settings. If it's not touching something you need to check your probe. Could be an electrical noise problem or bouncy contacts in the probe. Clicking help in the touch off dialog will open the related doc. At the end of the doc there is a link to a video. Both the doc and video may help.
Title: Re: Mach4 Hobby Autotouchplate function
Post by: N45CNC on March 27, 2019, 08:04:05 AM
Update, received responce from CNC ROUTER PARTS! I have tried this all seems to work. Did get and error on the conclusion of zeroing, however when I entered the MDI G0 x0 y0 z0 it went right to the corner that I zero'd.

Thanks to CNC Router Parts for the Help.

We aren't officially supporting Mach4 yet but this will allow use of our touch plate in the interim. Instructions for installation and use are below.

1. In the C:/Mach4Hobby/Modules folder, there is a file named mcTouchOff.lua. Rename this to mcTouchOff.lua.bak so there is a backup of the original file.

2. Download the attached mcTouchOff.lua file and place in the C:/Mach4Hobby/Modules folder

3. Start Mach4, open the Touch GUI ("Touch" button)

Notes for use:
-In the "Settings/Options" column, those options not applicable for CNCRP's touch plate have been disabled. The Touch Plate Height should be set to 1.
-Under "Functions" the Center and Angle buttons are disabled as they are also not applicable for our touch plate.
-The "Z Only" and corner buttons work as they do in Mach3.
-To use the edge buttons (Top, Bottom, Left, & Right), set the touch plate against the work piece. Pressing the button, it will first probe in the Z direction (but WILL NOT set Z height, it's only used to position the tool for the next probe move) and then probe in the X (for Left / Right) or Y (for Top / Bottom) direction.

Let us know how this goes for you.
Best regards,

Kerri L.  |   Sales and Support


Thanks for the Support,
Larry
Title: Re: Mach4 Hobby Autotouchplate function
Post by: N45CNC on March 27, 2019, 08:41:21 AM
Didn't see the mc.touchoff.lua, so I'll have another go at it. You will need to rename file.

Good Luck,
Larry
Title: Re: Mach4 Hobby Autotouchplate function
Post by: Chaoticone on March 27, 2019, 10:33:07 AM
Way to go CNC ROUTER PARTS!  :)

This is using it exactly the way it was intended to be used. Well, with one tiny flaw. If you customize a module (or anything that ships with Mach, especially screens and profiles) it should not be the same name as default. If it is when Mach is updated the installer will overwrite the customized module and the user will wonder what broke it.
Title: Re: Mach4 Hobby Autotouchplate function
Post by: jbuehn on March 28, 2019, 11:03:41 AM
Yup, very good point about renaming the file! Just make sure to edit the button script with the new module name.

Larry- That error message you saw was most likely because that final Z retract move was done with a G31 probing command. The error message was just telling you there was no probe strike.
Title: Re: Mach4 Hobby Autotouchplate function
Post by: mpoling on March 28, 2019, 03:30:57 PM
Works perfectly for me.