Hello Guest it is April 26, 2024, 08:27:31 PM

Author Topic: When changing from mm to inch unit  (Read 2975 times)

0 Members and 1 Guest are viewing this topic.

When changing from mm to inch unit
« on: June 17, 2022, 07:10:04 PM »
When changing from mm to inch unit

I bought a machine4 and have been working only with mm units from the beginning
I'm going to work on the inch unit this time.

Can't we just change from Mach4 configuration-control to inch?
After changing it like that, if you restart and go 1", it only goes 1mm.
What is this phenomenon? What's the solution?

Win10
Mach4 Ver.4809 + ESS
Re: When changing from mm to inch unit
« Reply #1 on: June 18, 2022, 10:13:54 AM »
To work in alternate inch and metric systems, you do not need to change the configuration of Mach itself.

Indeed the configuration setting only affects how the steps per unit parameter in the configuration is understood by Mach while doing the initial axis configuration.

To work in alternate measurement systems you should insert a G20 command in your-G code file to tell Mach to treat dimensions as inches, or insert a G21 command in your G-code file to tell Mach to treat dimensions as millimeters.

Mach does have a group of startup settings to select the default mode. It sounds like your default is millimeters. The startup settings are one line of G-code that is automatically run before starting any job.
Steve Stallings
www.PMDX.com
Re: When changing from mm to inch unit
« Reply #2 on: June 18, 2022, 10:21:31 PM »
Hi, Steve

Thank you for the detailed explanation.

However, I posted it because I tried as you explained.
Eventually, we had to change the counters/nuit value of the motor by changing it in inches.

If it works just as you say, is there a problem with my CNC configuration (Mach4+ESS+MB3)?
Is your explanation not working only on Mach3?

Thank you for your interest.
Re: When changing from mm to inch unit
« Reply #3 on: June 19, 2022, 08:26:29 AM »
The G20 and G21 commands are supported in both Mach3 and Mach4.

Have you confirmed that the Inch mode file that you are running actually contains a G20 command line at the beginning?

If you are trying to be in Inch mode while jogging you may need to use an MDI command to execute the G20 command before jogging.
Steve Stallings
www.PMDX.com
Re: When changing from mm to inch unit
« Reply #4 on: June 19, 2022, 06:22:28 PM »
Hi Steve

I'm sorry, but have you changed the unit and implemented it yourself?

Don't you have to change the value of the motor adjustment according to the unit?

It is common sense to insert G20 or G21 depending on the unit.

* Just in case, I also tried to run it on Mach3. It's the same.
I don't want to confuse others who read this.

Simply changing the unit in the unit change column of Mach3 or Mach4 only goes to the value of the previous distance in the XYZ direction.

Thank you for your interested reply
Re: When changing from mm to inch unit
« Reply #5 on: June 20, 2022, 01:03:08 AM »
Hi,

Quote
Don't you have to change the value of the motor adjustment according to the unit?

No, you do not change the motor settings with a change in units of a job.

Choose your machines native units. These units will be what Mach uses internally. You adjust the steps  per unit value to suit your chosen unit....and then leave it alone
for the life of the machine. You should never need touch them again.

The ancient Greeks used a unit called a cubit, approximatelty the length of your arm from elbow to wrist. Not very scientific but it might help to illustrate how Mach works.

Lets say that Mach had the opportunity to use cubits as native units. Further lets say that the machine takes 3427 steps to travel one cubit. Thats what you would enter in
the motor tuning page.

Lets also assume that mach knows there are 300mm in a cubit or 11.811 inches in a cubit.

When someone gives you a job say in millimeters then put a G21 at the top of the code. Mach now knows to machine a straight line of 78.4mm say, but it also knows there
are 300mm in a cubit, its native unit, so 78.4mm/300=.261333 cubits and so the trajectory planner knows to issue 0.2613333 x 3427 =895.589 steps. As the trajectory planner output is integer
it will be rounded to 896 steps.

Now let guess the same job was given to you but in inches, so 78.4mm becomes 3.0866 inches. Mach calculates 3.0866/11.811=0.261333 cubits or 0.26133 x 3427= 895.589 steps just as before.

Mach converted whatever number its was given to its native units, and then calculates the number of steps required. It does this internally.....so really it does not matter what native units you use.
My machine has metric ballscrews, 5mm pitch, so it makes sense to use metric native units. My servos are set up to require 5000 steps to rotate precisely on turn, and the axis would move precisely 5mm.
My steps per unit is 5000/5 =1000 steps per unit. So easy. If you had inch ballscrews, say 0.200/rev or 0.25/rev then using inch units would make sense. Does not matter to Mach, it does not get
confused like you or I.

Craig

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: When changing from mm to inch unit
« Reply #6 on: June 20, 2022, 03:39:10 AM »
dear craig

First of all, I am always grateful to know a lot about Mach4 through you.

Especially this time, it was very good to know interesting knowledge about cubit units.

The question about this unit change, as I mentioned at the beginning, I thought that the measurements were automatically substituted.

I'm not used to this job because I haven't had to work in inches at all.

So I thought I just had to change the unit and restart it in the mach4-configure-control-machine setup modes. In this age of technology, it seemed to have to be that much again.

However, that is not the case. I thought I missed checking somewhere else at first.

Therefore, after changing the unit to inch, the step of the motor was inevitably modified to fit inch.

Of course, after that, of course, the dimensions fit well, so I worked on it.

By the way, I don't know if you two didn't understand what I meant or if it would work.

I've actually done it several times and posted it on the forum. I even tried it on Mach3.

It is difficult because the advice of experienced people does not fit my reality.

So I copy and use the folder separately for each unit.

We can only use it as it is now, right?

Thank you for your advice.
« Last Edit: June 20, 2022, 03:44:05 AM by Chul Kim »
Re: When changing from mm to inch unit
« Reply #7 on: June 20, 2022, 04:08:33 AM »
Hi,

Quote
So I thought I just had to change the unit and restart it in the mach4-configure-control-machine setup modes.

No need, leave the machine setup units alone, do not adjust the steps/unit value....just apply a G20 or G21 and run the code.

I really only used cubits to demonstrate that Machs underlying units do not matter, Mach converts whatever Gcode, inch or millimeters,
you feed it to those underlying units. They could be cubits, or parsecs, or Astronomic Units, or mile-o-meters or the length of you know what!
All that is required is that you establish the correct steps/unit value, and you need never go back there again.

Mach, being US made, has always tended to be in inches. Over the years there have been a number of bugs where say the machine behaves
normally in millimeters but when jogging in moves in inches....and faults of that nature. I have not seen that bug occur in Mach4 for at least
five years.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: When changing from mm to inch unit
« Reply #8 on: June 20, 2022, 07:19:30 AM »
Dear Craig


I'm sorry to you who will be frustrated with me.

The attached photo was implemented immediately after receiving a reply.

As you can see, the unit was changed, restarted, and the G20 was inserted from the MDI (this part is already supported under the screen of the mach4) to draw a 2-inch square.

However, only 2mm squares are drawn very quickly.
When looking at the motor state in inches, it is the same as in mm.

Is there something in the ESS or in the BOB MB3 that is preventing the conversion of mm and inch for some reason?

I'm just frustrated, too.

« Last Edit: June 20, 2022, 07:31:10 AM by Chul Kim »

Offline Stuart

*
  •  311 311
    • View Profile
Re: When changing from mm to inch unit
« Reply #9 on: June 20, 2022, 07:23:21 AM »
Tonge firmly in cheek , I thought the USA used bananas for measuring at least that's what Kurtis at CEE thinks
anyway my thoughts on mach 4 setup and mach3 for that matter

1 what are the ball screws imperial or metric
2 if metric set the machine up in metric on the setup page the calls are easy
3 ditto for imperial

then use the Gcode 20/21 to tell mach4/3 how to interpret the code

my cnc mill has metric screws therefore its set up in metric ( as are the rest of my machines and my head )
I have do not have any problem with other people  Gcode I just hand code it to suit my setup

just seen your comment the machine DRO will always display the machine setup unit not the Gcode preference
« Last Edit: June 20, 2022, 07:25:25 AM by Stuart »