Possible to automatically compensate for irreguarities on the XY plane?

More
3 years 4 weeks ago #282121 by bhowiebkr
Hey, does LinuxCNC have the functionality to correct for irregularities on an axis surface plane like the XY on a gantry/router CNC? If I make a surface map file of offsets in the Z direction of the XY plane is it possible to have LinuxCNC automatically compensate for them? I’ve been doing a project involving a laser line projection onto a webcam sensor that is attached to a W axis and spring loaded so it can touch a surface It acts kinda like a CMM but only gives me about 2.5mm of range in Z to work with but does allow me to get down to a couple microns of measurement. I’ve still got some problems with it to work out but here a recent video on it’s progress
 And here is how it operates www.youtube.com/shorts/vuXR8RIW44o  What I’d like to do is generate an offset map of the XY plane by taking a grid of measurements with the sensor in the air (not touching anything) and then feed that data back into LinuxCNC to automatically compensate when running gcode. 

Please Log in or Create an account to join the conversation.

More
3 years 4 weeks ago #282129 by Aciera
Have a look at this:
forum.linuxcnc.org/10-advanced-configura...nting?start=0#167181

I think this is still python 2 which runs on linuxcnc version 2.8.x while version 2.9 and higher would require updating the code to python 3.

Please Log in or Create an account to join the conversation.

More
3 years 4 weeks ago #282151 by andypugh
I would argue (strongly) that the compensation should be a realtime HAL component.
This does make things more difficult as there is no file access from a realtime HAL component.
However, it would not be too unmanageable to pass a set of XYZ probe points in as a parameter array (max 4096 characters)
The main INI file could #INCLUDE a fixed filename for the height map
This file would be of the format
Code:
[HEIGHTMAP]=12,5,20 15,25,30....
Then the HAL file could use
loadrt height_compensation map=[HEIGHTMAP]
Which would (I think) pass the ile contents in at load time.

This is all a bit clunky, but it saves coding and setting up a shared memory area.

A better way would be to have a pair of components, userspace (probably C for data representation reasons, but Python could probably work too) and realtime which used a private shared memory area for the height data.
I think that the latter approach is what Probekins used. (but Probekins didn't really work, for other reasons)

Please Log in or Create an account to join the conversation.

More
3 years 4 weeks ago #282153 by andypugh
Hmmm..... Now we have 64 bit HAL pins, I wonder if the userspace component would be able to rtapi_kmalloc a C struct of height date, then populate it, and just pass a pointer to that struct to the realtime code?
Though this is really just a rather bad way of spoofing a shared mamery region.

Please Log in or Create an account to join the conversation.

More
More
3 years 4 weeks ago #282221 by rodw
I wonder if somehow a hal_port could be used to pass a point array, much like a survey grid format
The component could extrapolate the height at a given point as you would plot a contour line and adjust the height using external offsets in real time.

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum