Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: JTulley on July 29, 2008, 09:24:30 AM

Title: Set Tormach Mach3 to metric
Post by: JTulley on July 29, 2008, 09:24:30 AM
Hi all,
I'd like my new Tormach PCNC running Mach3 to default to metric units on power up. A thread on this forum indicates that you can do this by using the config.. native units selection on the main menu. But the Tormach variant of Mach3 doesn't seem to have this option.
Does anyone have any experience of setting to metric by default any other way ?
Title: Re: Set Tormach Mach3 to metric
Post by: Hood on July 29, 2008, 09:52:43 AM
You can put G21 in your initialisation line and that will make the DROs etc be in metric but not sure if the tooltables are still imperial or not, seem to remember something about that.
  Email Tormach and ask them if they can send you a metric xml.
 You could also install another revision of Mach and set it up yourself but that may void your warranty with Tormach so I would ask before you did that.
Hood
Title: Re: Set Tormach Mach3 to metric
Post by: JTulley on July 29, 2008, 11:36:54 AM
Is there an initialisation file that has reckonisable Gcodes in it? I've looked through the obvious directories on my PC but haven't found a likely candidate yet. I can what looks like a suitable xml file which currently has units set=1 so I could try changing that to 0 or 2.
Title: Re: Set Tormach Mach3 to metric
Post by: Hood on July 29, 2008, 11:46:16 AM
If you go to the Config menu then down to General config you will see an initialisation string, enter G21 into that and each time you start Mach will be showing metric units.

As for the xml, think it will be Units set to 0 for metric.
However remember if you do that you will need to set up your steps per unit as metric and also retune your motors.
Hood
Title: Re: Set Tormach Mach3 to metric
Post by: JTulley on July 29, 2008, 11:54:39 AM
Thanks for the tips Hood, but I think I'll have to wait for Tormach to come up with a solution as I don't have the config..general config option.
All I have is config.. fixtures, tooltables or config plugins.
Title: Re: Set Tormach Mach3 to metric
Post by: Hood on July 29, 2008, 11:58:20 AM
Ah ok, sure Torrmach must have a metric xml, is there definitely not one supplied? have a look in the Mach3 folder and see what xml's are there.
 In the mean time you could MDI a G21 everytime you start Mach or make sure you have G21 at the start of all your Gcode, its not ideal if like me you will use metric all the time with only very occasional imperial code.

Hood
Title: Re: Set Tormach Mach3 to metric
Post by: JTulley on July 29, 2008, 12:11:07 PM
There's only the one .xml file unfortunately, and I suspect that if I modify the units value I'll have to go through all the other motion related parameters and scale them appropriately.
It's a shame there doesn't appear to be a way of autorunning a G21 command.
Hopefully Tormach will come up with something.
Title: Re: Set Tormach Mach3 to metric
Post by: Hood on July 29, 2008, 01:36:54 PM
As I said G21 isnt really what you are wanting if you will be running your machine predomantly in metric units.
 I will  ask John P if he knows of a metric xml. for the Tormach.

Hood
Title: Re: Set Tormach Mach3 to metric
Post by: JTulley on July 29, 2008, 02:28:21 PM
Thanks Hood, that would be very useful
Title: Re: Set Tormach Mach3 to metric
Post by: Hood on July 29, 2008, 02:36:52 PM
Seems there is not a metric xml for the Tormach due to support reasons and I see why that is so, there is however a way to force a G21 on every reset, it is as follows.
In C:\PCNC3\Macros\PCNC-M3 there is a macro M990.m1s

You need to edit the text in the macro similar to the lines shown in bold (ie delete the Rem from the front of G21 and put Rem in front of G20)

' This macro iimplements PCNC INIT actions
' Add G21/G20 change if needed 
 
' Uses UserLabel 2, UserDRO 1209
 
Rem Code "G20"  ' uncomment this to force G20 every Reset
    Code "G21"  ' uncomment this to force G21 every Reset

 
Metric = GetUserDRO (1209)
If Metric <> 0 Then
    SetUserLabel 2, "millimeters"


It is probably best to make a copy of the macro to your desktop (or wherever you wish) before you edit it just in case it goes wrong ;)
There is also a Yahoo group that John pointed me to for Tormach, here is the link http://groups.yahoo.com/group/tormach1100/

Hood
Title: Re: Set Tormach Mach3 to metric
Post by: JTulley on July 29, 2008, 02:59:08 PM
Thanks again Hood.
Why did you say that the G21 is not really what I want if I'm running metric all the time ?
Title: Re: Set Tormach Mach3 to metric
Post by: Hood on July 29, 2008, 03:03:28 PM
Just simply that it is better to have the whole setup as either Metric or Imperial. As I said earlier I thought the tooltables will always be set in the native units no matter whether you are in G20 or G21 mode, this is correct. So when you run under the G21 your tooltables will still need set up with imperial units. If you touch off and use the auto toolsetting features then its not an issue but if you manually enter dimensions into the offset tables then you will need to remember to do it in imperial units.
 Other than that it should be fine :)

Hood
Title: Re: Set Tormach Mach3 to metric
Post by: JTulley on July 29, 2008, 03:31:01 PM
Ahh, that sounds like a bit of a pain. I'll maybe ask Tormach if there's a fundamental reason why a metric setup couldn't be created. I guess it can't be as simple as converting the xml file as that looks like a pretty straightforward if tedious task.
Title: Re: Set Tormach Mach3 to metric
Post by: Hood on July 29, 2008, 03:40:48 PM
I think the main reason will be for support, much easier to support a product if everyone has the same initial settings, also I think John mentioned the resolution was 1/10th thou exactly so again that would make for easier setup and support.
 Would be good if they would make a metric xml for you but wouldnt hold out too much hope, but hey you never know maybe they will :)

Hood
Title: Re: Set Tormach Mach3 to metric
Post by: japrenticeuk on July 30, 2008, 02:26:11 PM
I think if you give the suggested route a try you will find it works well.

There are of course other options you can request from Tormach. You can weigh the advantages and disadvantages.

John Prentice
Title: Re: Set Tormach Mach3 to metric
Post by: JTulley on July 30, 2008, 03:16:57 PM
I've made the G21 change to the init file, and it behaves as you've all described.
Thanks for the tips.
Now I just have to find out while my coolant reservoir is leaking...