Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Jmorris on April 04, 2014, 12:18:35 AM

Title: Changing the units of the "DRO"
Post by: Jmorris on April 04, 2014, 12:18:35 AM
I can change the machine using G20/21 from metric to inch but the " DRO" remains in mm.  Have tired everything that I have read in the manual I have and from the search function here but can't find the fix.

It's just a flip of a switch on my manual machines DRO, doesn't seem like it should be too hard...just need 25.4 to display 1.000.

Title: Re: Changing the units of the "DRO"
Post by: Tweakie.CNC on April 04, 2014, 02:34:17 AM
The DRO’s only indicate UNITS.  For example a DRO of 10.0000 will be 10 millimetres when G21 is in operation and 10 inches when G20 is in operation.

There are a number of stand alone programs which will convert the units in your GCode between metric / imperial and imperial / metric – that way the DRO’s will then show your chosen units of measurement.

Tweakie.
Title: Re: Changing the units of the "DRO"
Post by: Hood on April 04, 2014, 02:47:03 AM
Config menu then General Config. Very first option is to lock DROs to setup units.
Hood
Title: Re: Changing the units of the "DRO"
Post by: Tweakie.CNC on April 04, 2014, 05:19:13 AM
Config menu then General Config. Very first option is to lock DROs to setup units.
Hood

The perfect solution, something I had overlooked, thanks Hood.  ;)

Tweakie.
Title: Re: Changing the units of the "DRO"
Post by: Jmorris on April 04, 2014, 08:47:10 PM
Lock DRO's to setup units checked.

If I jog 1 inch (G21) the DRO is ~25.4, same thing with (G20)

If I unlock them and jog the inch (G21) the DRO is ~648.8 but switches to 25. with G20 entered in MDI.
Title: Re: Changing the units of the "DRO"
Post by: Overloaded on April 04, 2014, 10:40:07 PM

It's just a flip of a switch on my manual machines DRO, doesn't seem like it should be too hard...just need 25.4 to display 1.000.


Make sure Lock DRO's is NOT checked.
Leave your Native Units where they are (mm I presume).
MDI G20 and whatever metric value you have displayed (25.4) will be converted and shown as 1.0000 (inch).
MDI G0 X10 and the machine will move to X10 (inches).
MDI G21 and that will be converted and shown as 254 mm.
MDI X 25.4 and it will move to 25.4 mm
MDI G20 and that will convert and display as 1.0000 (inch)
JOG where ever you want, MDI G20 or G21 to display the moves in Inches or MM respectively.

G20 (inch) and G21 (mm) are modal of course so be sure to put it back where you need it.

I had a button to toggle the DRO's on a mill screen but never used it much so I removed it.

If I understand your question correctly.
Regards,
Russ
Title: Re: Changing the units of the "DRO"
Post by: Overloaded on April 04, 2014, 10:55:51 PM
I found that old screen.
It's actually 2 VB buttons.
"I" = Code"G20"   and "M" = Code"G21"
You can monitor the current state up above. (pic)
Does exactly what you want .... I think.
Russ
 :)
Title: Re: Changing the units of the "DRO"
Post by: Jmorris on April 05, 2014, 03:55:21 PM
That is it, in my messing around I had changed the native units and that is why I was getting the 648.xx number.

Put it back where I started and it's working now.

Not sure what I was doing wrong from the beginning but thanks for the help.
Title: Re: Changing the units of the "DRO"
Post by: Overloaded on April 05, 2014, 04:52:15 PM
Good to go now, that's what matters.
Regards,
Russ
Title: Re: Changing the units of the "DRO"
Post by: BOB88 on May 20, 2014, 02:04:50 PM
I have  a problem with Mach3 always switching to G21 even thought original setup is in inches, I have a G20 in the General settings Startup string.

When MACH3 is launched, G20 comes up in the long line of G-Codes at the top right side of the screen.  If we go to MDI and enter anything it immediately switches to G21.

Does anyone know why it switches by itself to G21.  Yes, we can enter a G20 in the MDI Line and it will then stay in G20 until restarting Mach3.  Has anyone figured out what has to be done to make it stay in G20 (inch) mode after startup.

Thank you for your help.



Title: Re: Changing the units of the "DRO"
Post by: Hood on May 21, 2014, 05:51:38 AM
Can you attach your xml please as that is certainly not normal.
Hood
Title: Re: Changing the units of the "DRO"
Post by: BOB88 on May 21, 2014, 05:47:15 PM
Hello Hood,  Thank you for the reply.

I have a few more observations that lead me to believe the XML file is probably OK.  The problem can be seen by two things:  Having the "USE INIT STRING on RESET" in General Config. Checked, and the other is when Limit Switches are set to active high in P and P when no switches are attached.  That is when hitting the reset button, it remains flashing and says limit switch triggered.  Then when the reset button is hit again, the reset stops flashing and the top right g-code line still says G20 and G17 as it should. But then any MDI command like g0 X2 followed by the enter key immediately changes g20 to g21, and G17 to G19.  

If the "USE INIT STRING on RESET" is UNCHECKED,  the G20 stays G20 but the G17 changes to G19.  If the Limit switches active is changed so that there is no error, hitting Reset button just once then resets fine and the button stops flashing without any limit errors.  In this case the G20 and G17 remain as they should.

If you put in your own INIT string in gen. config. , you'll notice on the run auto screen upper right corner there are other G-Codes that you did not put in your INIT string.  I don't know where they come from but suspect that they are interfering with the desired init string you enter.  

Again, thank you Hood for replying to this post.
BOB88

It appears like MACH3 will reset even if there are no limit switches.  It seems to fix the active high/low when pressing reset twice. (Probably to make it easier it to run in demo mode.)
 

Title: Re: Changing the units of the "DRO"
Post by: Hood on May 21, 2014, 06:39:10 PM
Your xml will make it easier for me to see if I can find the problem as I will be able to load your exact settings.
Regarding your units, what are your native units set to? Again I would be able to see that if I had your xml.
Limits, if you dont have any limits then dont have the limits enabled in Ports and Pins, Inputs, they are not required. The only input required is an E-Stop and you can get round that by changing the active state of it. If however you are running a machine then I would advise you do have a real E-Stop, purely for safety reasons.

Hood