bebob1
Just convert the imperial number to metric it's just a number that would then be metric that would match the units your control is running in
I am retrofitting a lathe whereby the crossslide is imperial and the Z axis I am putting in is metric. I do not want to change the cross slide as it is unnecessary.
I was wondering how to set up EMC2 so that it knows one axis has metric leadscrews and another with imperial leadscrews. Furthermore, that the units displayed and accepted from Gcode remains metric. That is, if one were to be insist on avoiding simply dividing the imperial units by the conversion factor of 25.4 if possible even though its the same thing.
I see on hal that there is one setting for linear units and that sets everybody?
bebob1
Just convert the imperial number to metric it's just a number that would then be metric that would match the units your control is running in
Mactec54
I was looking at the stepconfig generated hal file and there seems to be only one statement for all linear axis movement units. I cant individually define the units for each axis independently it seems. But yeah the most hastle free method may be to just do conversion since it is defined as a conversion of inch to mm as 25.4, but still I'd think it can do independently.
Sure the machine units are common for the whole machine, but the per axis scaling is independent (on a step driven machine this is set with the per axis OUTPUT_SCALE parameter) . So regardless of the number of steps per inch or steps per mm, you can setup each axis scale to be correct for any type of units
you choose. That is it, makes no difference whatsoever that you have mixed metric and inch pitch drive screws. For example if you had a 5MM pitch ballscrew on an "inch" machine, you just specify its leasdscrew pitch as 5.08 (turns per inch)
Oh my stepconfig file generated by the wizard doesnt have units per axis, I suppose you can add that the same way you can add in backlash compensation?
So under each axis, say [AXIS 0] you add in OUTPUT_SCALE = metric? for example?
Its not units per axis (machine inits are global as you noted), but rather the scale per axis that is individually settable. So by using the right number in stepconf for leadscrew pitch for each axis you can setup your lathe to have all axis in inches or all axis in mm. You can of course change the units with a single G20 or G21 code at the beginning of your gcode file
Think about "scale" What is it?
Scale is the number of "motor inputs" required to move the "object" a certain distance. That is, how many revolutions of the motor shaft does it take to move the "object" some distance. (read "UNITS")
How many motor shaft revolutions does it take to move a mm, a cm, an inch, or a mile. It's all the same, just different numbers.
What effects the scaling?
The lead screw (if used, for rack and pinion has it's values as well.) is one thing.
a five threads per inch lead screw would need five motor turns to move 1 inch.
A 4 mm pitch lead screw would need 6.35 turns to move that same inch.
The set up file would have a scaling of 1/5 for the imperial axis, and 1/6.35 for the metric axis. You must determine and use the correct ratio for your machines.
The important point is that the UNITS are set in one data line, and this unit assignment is global for all axis.
The drive ratio to achieve the unit motion is set in other lines, and is set for each axis uniquely. After the ratio is set, you could change the units from imperial to metric and the axis would still move in proper coordination. Your move distance values would need to also be in the correct units in order to correctly size the moves produced however. Mixing machine units and drawing units would make for an out of scale result.
No different from having all imperial or all metric drive mechanics, and then coupling the motors to the drive hardware with different ratio belt drives.
An analogy would be the set up for thread cutting on a manual lathe. Imperial threads take one set of gears for each thread count. Metric threads can be cut on that same machine with suitable "transposing gears".
In the case of LinuxCNC, the scaling entry takes the place of the extra gearing. You just need to tell the program what gears you actually have.