Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: SailFl on December 28, 2009, 01:49:11 PM

Title: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: SailFl on December 28, 2009, 01:49:11 PM
I have been using a Zero Touch Plate and Laser move to X, Y position macros.  There is a macro for each.

If I run the Zero Touch Plate macro before I run the laser mover macro, my ZTP macro works fine.  Once I run the laser move x, y position macro, the ZTP does not work properly.  Problem with ZTP macro, when the bit touches the plate, it move down before moving up.  

Can some one help me with my code or do I have mach configure incorrectly.

I have attached both macros.

Thanks
Title: Re: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: Graham Waterworth on December 28, 2009, 02:16:52 PM
From a new start of Mach3 what happens when you run the ZTP macro 2 or 3 time in a row without the laser macro?

Graham
Title: Re: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: SailFl on December 28, 2009, 02:36:12 PM
The ZTP works perfectly.  But once I run the laser x,y macro, the ZTP macro does not work correctly.
Title: Re: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: Graham Waterworth on December 28, 2009, 02:46:19 PM
Only thing I can see is the laser macro exits with a G90, most probing routines use G91, yours selects nether as an operating mode.

Graham
Title: Re: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: SailFl on December 28, 2009, 03:42:19 PM
Graham,

The laser macro moves to the place that the laser is pointing at in the X, Y direction.  There is no probing.  

I don't think I understand what you are telling me.  What should I be using to move from one location to another because that basically what I am doing.

May be I don't need the G90 but only the M9 to turn off the laser?

Why does affect the way the touch plate macro works?

Thanks
Title: Re: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: Overloaded on December 28, 2009, 04:21:04 PM
Changed it from 801C to 801, uncommented the feedrate line, syntax error at the bottom commented line and it works good here.
Title: Re: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: SailFl on December 28, 2009, 05:53:46 PM
Overloaded,

Please forgive me for uploading a file that was not correct.  I had personal information in the file so I made a copy and forgot to check it.  The 2nd routine is 801.  I removed the CurrentFeed  variables at the top and bottom and I fixed the comment error.

If you run 801 on my computer and CNC machine, it will work perfectly every time you run it.  But run 800 and then run 801, 801 does not function properly.  801 will touch the plate and then drive downward right into the plate.  It will continue to work that way until you restart Mach.  After you restart Mach, 801 will run right until you run 800.

Please how do I fix this problem.

Thanks
Title: Re: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: Overloaded on December 28, 2009, 08:15:14 PM
Not sure of this, but your 800 has  "G90 M9" towards the end and leaves Mach in G91.
changed it to (pic) and it goes to G90 as it should. Maybe G and M cannot be together.

Or...You may need a "G90" at the beginning of 801.
Graham was on the right track.....as usual lol.
I'm just spinning about with his suggestion.
Russ

Try it in air first, I take no credit as I'm just guessing.

EDIT: ooops ..forgot pic
Title: Re: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: SailFl on December 29, 2009, 08:34:26 AM
Overloaded,

Thanks for the suggestion to seperating the G90 and M9 commands.  I reversed your suggestion and placed the G90 first and finished with M9 to turn off the laser.

Now both of my macros are working.  I just have to replace my touch plate with a new one so it doesn't look like a war zone from the bits being driven into the thin copper.

Thanks
Title: Re: Conflict between my Zero Touch Plate and Laser move to X, Y position macros
Post by: Overloaded on December 29, 2009, 09:06:03 AM
Glad you're OK now.
Thanks Graham.
Russ