Hello Guest it is March 28, 2024, 08:49:54 AM

Author Topic: Linear axis error compensation  (Read 1806 times)

0 Members and 1 Guest are viewing this topic.

Linear axis error compensation
« on: September 07, 2019, 08:41:55 AM »
Hi all,

I am sure i am not the first one who get to this idea about fixing the error of a linear axis but i couldnt find the topic related with it in the forums and couldnt find what u guys call it so i posted it in here, if u have a knowledge related with the matter please direct me to the related post, thanks.

The idea is simple;

If there is a fixed and measured error of a linear axis(lets say, up and down error for the X axis), u should be able to compensate it with the Zth axis(by moving the Zth axis up and down in predefined positions of the X axis).

U can understand what i mean in the attached image better, in this image there is a graph which illustrates the up and down error of the X axis and the movement required to fix that error by the Zth axis. This is an interface illustration for this compensation so that user can enter the measured error in means of distance according to the machine coordinates and the error measured by the straight edge-micrometer or laser interferometer. For example, X axis length is 1300mm and the total error is 60 microns.

We are assuming that the error is fixed and repeating in every X axis movement, body of the machine is rigid and we have ability to move the axises to exact positions, they can be precisely controlled.

This error fixing can be adapted to gcode or by manually to MDI but better then that if u can find a way to adapt it directly to the controller(Mach4) there wont be any user activity needed to fix it in each time, machine will automatically move the Zth axis incrementally according to the reached predefined machine coordinate and the error will be compensated automatically.

The main idea in here is to fix the physical error of the machine bed by means of programming the controller to avoid that error without the need of disassembling the machine and fixing the error physically.

So i am looking for help to adapt this directly to Mach4, is there a way to do this by scripting? or a plugin is necessary?

Thanks in advance.
Re: Linear axis error compensation
« Reply #1 on: September 07, 2019, 02:29:52 PM »
Hi,
there is a formula correction that you can use in Mach3. It requires that you can match a mathmatic equation to
the graph. I have attached an example where I assumed that the Z axis required an additional 0.01x2
be added to Z. The formula is applied in  a somewhat hit and miss fashion and was never hugely successful.
The biggest problem was that if Mach calculated a correction it would apply it but that would require your Z axis to move
a small amount (the correction) but Mach would apply it and assume that the Z axis were able to move that small amount
instantly. Steppers motors have a definite maximum acceleration beyond which they stall, and stall is exactly what they do
unless the correction is miniscule. To my knowledge no-one has really gotten it to work properly.

There is a new development in Mach4 in the form of a wizard called mcMapSurface. The essential idea is that you probe
the bed or table of your mill (X and Y axes) and record the variance of the height (Z axis). Mach stores those values
and thereafter automatically compensates the Z axis where and whenever the machine is at any particular X,Y location,
no formula required, no tricky Gcode.

Mach3 has no similar feature.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Linear axis error compensation
« Reply #2 on: September 07, 2019, 05:13:13 PM »

There is a new development in Mach4 in the form of a wizard called mcMapSurface. The essential idea is that you probe
the bed or table of your mill (X and Y axes) and record the variance of the height (Z axis). Mach stores those values
and thereafter automatically compensates the Z axis where and whenever the machine is at any particular X,Y location,
no formula required, no tricky Gcode.

Mach3 has no similar feature.

Craig

This is what i am looking for, my illustration includes a graph thats the only difference if i understand the Mach4 image u attached correctly, so i assume that i can do the measuring with a granite straight edge-micrometer and enter the error value so it will compensate automatically on the fly.

Can u add it to Mach4 anytime soon and include it in to manual? Because there is too many boxes in there ;-)

Also, probing the bed or table is useful for making the guideways parallel to table, but this is good only if the table manufactured correctly. I was aiming to get rid of the guideway errors(which is under 20microns in my case) when i connect a long part to table on 3-4 points. So compensating the X and Y axis movement of the machine close to true 0 can only be done by measuring manually a 000 granite straight edge or make the measurement by a laser. What i mean is; it would be better if u can enter the error values manually and see the pattern on a simple graph(like motor graph), because by that way u can also see how much Mach4 can compensate the error. Then u can prove it by making the physical measurements.

Regards.


Thanks
Re: Linear axis error compensation
« Reply #3 on: September 07, 2019, 05:43:59 PM »
Hi Hakan,
mcMapSurface is fairly new to Mach4, about three months or so. If you update to the latest stable release 4162 you will get it.

What happens in practice is that you set up the Wizard panel with the extents of your table. The Wizard generates and then
executes code to probe the table on a grid pattern recording the results. The intention was to correct a surface that is
nominally flat but in fact had a slight bow or warp. It was also intended that you do it once and thereafter Mach4 would compensate
the Z axis at any location within the machine bounds.

It does not compensate for X or Y axis lack of straightness nor squareness between them.

I use a software utility called Autoleveller (freeware) that probes a circuit board blank on a grid pattern and then modifies
the Z coordinate of the Gcode program to accommodate any slight bow or warp in the circuit board material. AutolevllerAE
has a visualization of the surface as measured, quite handy.

This achieves a similar result to mcMapSurface  but in a different manner. Firstly it probes the area of the circuit board
alone, not the full extent of the bed. Secondly it modifies the Gcode to suit whereas mcMapSurface applies the Z axis
correction automatically at all times. Thirdly it is intended that you run Autloveller with each new piece of circuit board
material you put in the machine cf mcMapSurface which assumes the underlying Z axis correction applies to ALL subsequent
Mach operation.

I mention Autoleveller because it may have some valuable ideas that you could use. Its written in Java and its source is available.
mcMapSurface, it appears, is only available as a compiled Lua file. If you desperately needed the Lua source you could ask
NFS and if you were prepared to sign a non disclosure agreement (NDA) then you could probably get it.

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