Hello Guest it is April 25, 2024, 12:50:53 AM

Author Topic: mc.mc.JogIncstart always using metric  (Read 348 times)

0 Members and 1 Guest are viewing this topic.

mc.mc.JogIncstart always using metric
« on: October 11, 2022, 02:51:51 PM »
I have the control set to inches. yet

mc.mcJogIncStart(Inst,mc.Z_AXIS,0.001) does not move the z axis .001

changing it to

mc.mcJogIncStart(Inst,mc.Z_AXIS,0.026) moves the axis .0009  which leads me to believe the axis is being commanded by the lua in metric units.  Is there a command to change the units used in the lua to inches that I need to call first, or a setting I might need to change?
Re: mc.mc.JogIncstart always using metric
« Reply #1 on: October 11, 2022, 04:30:45 PM »
Hi,
when you say to have set the machine to inches....can you confirm that the 'native units' on Machs Control Defaults tab are inches.
Note there are two settings, the first is 'Machine Setup Units'. These are the units for motor tuning, Homing/SoftLimts etc.
The second setting is 'Units Mode'. This setting will determine which mode (g20/g21) the machine starts in, and most particularly will place
a g20 (or alternately a g21) in the Gcode setup string.

It is possible to have the Machine units in inches, say you have 0.2mm pitch leadscrews for instance, but have the machine in metric mode
because you make parts from metric based Gcode, ie a g21 is in effect, for a particular customer.

If you are of the opinion that the units mode is wrong then MDI a g20 (inch) or a g21 (metric), and try again.

Mach4Hobby is a US made product and while it should be unit agnostic, it in fact favours inch units. Try a g20.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'