Hello Guest it is March 28, 2024, 09:44:03 PM

Author Topic: Autozero and Coordinate issues are loading G-Code  (Read 11320 times)

0 Members and 1 Guest are viewing this topic.

Re: Autozero and Coordinate issues are loading G-Code
« Reply #10 on: November 07, 2014, 08:08:36 AM »
What are your Native Units set to?

Your auto zero script is set up to work in metric, but your G-code puts Mach3 in Inch mode.

Is there a way that the auto zero script can determine the current mode (inch or mm)
and use an IF statement to adjust the zero script to match?

I am new... and like Linux it seems that the lone user has to hope that they find
the right solution out of thousands of post scattered around the net.


Sorry for sounding a bit negative; I really am not, it is just that I have struggled with my very first part for a very long time as my first part has tool changes and I have a hobby cnc that doesn't have a tool changer... and too many expensive
peaces of wood have been tossed in the garbage due to the Z randomly loosing consistency after many hours of operation. Again thank you for your kind words and your helpful tips and tricks.. you are appreciated
more than you will ever know during our struggle with the start-up learning curve.

« Last Edit: November 07, 2014, 09:57:22 AM by ger21 »
Again thank you for your kind words and your helpful tips and tricks.. you are appreciated
more than you will ever know during our struggle with the start-up learning curve.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Autozero and Coordinate issues are loading G-Code
« Reply #11 on: November 07, 2014, 08:44:16 AM »
Quote
Is there a way that the auto zero script can determine the current mode (inch or mm)
and use an IF statement to adjust the zero script to match?

Yes, A good reliable auto zero macro will check for inch/metric (and many other program states) and use the appropriate values. When the macro is finished, it should return Mach3 to the state it was in when the macro started.
If you don't do this, sooner or later you will run into problems.

Shameless plug - my 2010 screenset includes macros that work with both inch and mm's, and automatically zero's the tools after tool changes. All you need to do is change the tool, and click cycle start. It uses a separate fixed plate mounted to your machine for a reference position.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Autozero and Coordinate issues are loading G-Code
« Reply #12 on: November 07, 2014, 09:01:29 AM »
Shameless plug - my 2010 screenset includes macros that work with both inch and mm's, and automatically zero's the tools after tool changes. All you need to do is change the tool, and click cycle start. It uses a separate fixed plate mounted to your machine for a reference position.

LOL Thanks for your Shameless plug and the link to it within yours signature ;-)

Please correct me if I am wrong:
Are new Mach 3 users suppose to pick a Screenset such as yours or
the one found at kd-dietz.com to get started with Mach 3

I ask because I am afraid to install a Screenset as I do not know if
they change the Mach 3 install and will force me to do a reinstall of Mach 3
should I decide that I don't like the color choices etc..

That said, how would one determine what is the best Screenset for
a manual tool change cnc such as mine?

I have changed the properties on my Mach3Mill icon on my desktop

I right clicked on the Mach3Mill icon and chose Properties and
Changed the line that says
C:\Mach3\Mach3.exe /p Mach3Mill
to
C:\Mach3\Mach3.exe /p MyProfileName
Then clicked on OK to save

Can this method also be used to change Screensets?

Lastly, where do I get the white papers for the auto zero macro to learn how to
answer the following question:

Is there a way that the auto zero script can determine the current mode (inch or mm)
and use an IF statement to adjust the zero script to match?
« Last Edit: November 07, 2014, 09:11:17 AM by edoctoor »
Again thank you for your kind words and your helpful tips and tricks.. you are appreciated
more than you will ever know during our struggle with the start-up learning curve.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Autozero and Coordinate issues are loading G-Code
« Reply #13 on: November 07, 2014, 09:13:07 AM »
To be honest, I would recommend using the default screenset until you're comfortable working with Mach3. Trying to learn mach3 with a custom screenset can be more difficult, as controls may be not where you'd expect them.

There are no screensets at kd-dietz.com. He has a screenset designer for creating your own screensets.

No, a screenset should not change your Mach3 install. However, my 2010 Screenset will replace your default M6 macros, as those are what handles the auto zero during toolchanges in my screenset.

Most screensets are just different graphics and layouts, and have no effect on Mach3 operation. Choosing one is a matter of personal choice. A few, like mine, have added functionality (auto zero).

What you've changed is your Profile, which is an .xml file that stores your settings. While the .xml file contains the current screenset associated with that profile, the screenset is changed from within Mach3, using the View menu, and Load Screenset option.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Autozero and Coordinate issues are loading G-Code
« Reply #14 on: November 07, 2014, 09:35:18 AM »
Since I can not edit/del my post that had the Auto-Zero script can someone please
remove that post due to that Auto-Zero script not working and I don't want someone
to use it thinking that there is something wrong with their cnc.. when in fact I posted
a script that needs much work.

Thank you for your very informative and honest reply.

If I understand you; I can create a profile called Ger21 and then somehow install your screenset
to that profile and try your screenset without risk or cost?

Due to the lack of funds, may I please ask one more time.

Where do I get the white papers for the auto zero macro to learn how to
answer the following question:

Is there a way that the auto zero script can determine the current mode (inch or mm)
and use an IF statement to adjust the zero script to match?

« Last Edit: November 07, 2014, 09:47:25 AM by edoctoor »
Again thank you for your kind words and your helpful tips and tricks.. you are appreciated
more than you will ever know during our struggle with the start-up learning curve.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Autozero and Coordinate issues are loading G-Code
« Reply #15 on: November 07, 2014, 09:55:40 AM »
Something like this is what I use:


CurrentFeed = GetOemDRO(818)  ' Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48)   ' Get the current G90/G91 state


'//////// the block below will set all your reusable vars depending on Inch or mm.
'//////// this sets the vars so you only need ONE large block of probing code.

If GetOEMLED(801) Then  ' On = English Measure INCH

FirstProbeDist = 6.0 ' Probe down 6 inches
FirstRetractDist = 0.05 ' Then retract .05 inch
SecProbeDist = 0.25 ' Then probe down .25 inches
FirstProbeFeed = 10.0 ' First probe feed @ 10 ipm
SecondProbeFeed = 1.0 ' Second probe feed @ 1 ipm
ClearAllow = 0.125 ' Max Allowable Clearance = Z Machine Zero - .125in

Else ' Off = Metric Measure MM

FirstProbeDist = 150.0 ' Probe down 150mm
FirstRetractDist = 1.0 ' Then retract 1mm
SecProbeDist = 6.0 ' Then probe down 6mm
FirstProbeFeed = 250.0 ' First probe feed @ 250 mm/min
SecondProbeFeed = 25.0 ' Second probe feed @ 25 mm/min
ClearAllow = 2.0 ' Max Allowable Clearance = Z Machine Zero - 2mm

End If

'//////// Error Condition checking code

If GetOemLED(16)<>0 Then ' Check for Machine Coordinates
Code "(Please change to working coordinates)"
Exit Sub ' Exit if in Machine Coordinates
End If

If GetOemLED(825)<>0 Then
Code "(Z-Plate Grounded Check connection and try again)"
Exit Sub ' Exit if probe is tripped
End If

Gerry

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

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

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Autozero and Coordinate issues are loading G-Code
« Reply #16 on: November 07, 2014, 09:56:55 AM »
This thread has a lot of information that you may find useful.
http://www.cnczone.com/forums/cnc-wood-router-project-log/36099-another-aussie-auto-tool-zero-setter.html

Also look through the Mach3 programmer's reference manual.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Autozero and Coordinate issues are loading G-Code
« Reply #17 on: November 07, 2014, 10:06:41 AM »
Thanks... I knew your ger21 looked familiar as I have read a lot of your posts on cnczone ;-)
 
Many thanks

Edoctoor
Again thank you for your kind words and your helpful tips and tricks.. you are appreciated
more than you will ever know during our struggle with the start-up learning curve.
Re: Autozero and Coordinate issues are loading G-Code
« Reply #18 on: November 07, 2014, 10:28:23 AM »
I have found the white papers at www.machsupport.com/help-learning/product-manuals/

http://www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf

It looks like 137 pages of very well written documentation; I shall have some fun and see if I am able
to patch your snippet of code to what I have already found and come up with a solution.
Again thank you for your kind words and your helpful tips and tricks.. you are appreciated
more than you will ever know during our struggle with the start-up learning curve.
Re: Autozero and Coordinate issues are loading G-Code
« Reply #19 on: November 08, 2014, 11:19:00 AM »
So I have fixed the issue it seems. With my original zero code I simply just generated the gcode in mm. Didn't mess anything up and the computer is running well after a fresh install. Thanks for all the help. I'm embarresed it was so easy