On 03/05/2018 10:33 AM, John Kasunich wrote:

Example:

The error between X=0 and X=4 is zero, then it ramps up to 0.002 at X=5,
hits 0.003 at X=6, then remains at 0.003 for the next 8", until X=13.  Then
it ramps back down to zero at X=14, and hits -0.001 at X=15, where it stays
until X=21.

So you would use the following X,Y pairs:

0, 0.000
4, 0.000
5, -0.002
6, -0.003
13, -0.003
14, 0.000
15, 0.001
21, 0.001

You can use up to 16 pairs.  Best approach is to plot your measured errors
on a piece of paper or in a spreadsheet, then find the set of 16 (or fewer)
straight line segments that best matches your measured error plot.


Okay, upgraded the OS and got linuxcnc up to v2.7 over the last few days.  Some minor hiccups after the build that have taken me a few days to fix as well as having to update other software to work with the software I use to design cane fly rods and such.  Most everything cleaned up and running with a minor glitch or two that will be fixed in the coming days.  Upgrade went smoothly and linuxcnc install works like a champ.

So, today I decided to start working on the lincurve hal file that will hopefully map the errors on the table to the height of the Z axis as it's cutting down the length of the X axis.  I'm using John's example above (I'll update that once I get all this figured out to the actual values from the calibration run I've done on my table).  Got a few questions as I build this hal file, but here's what I've worked out so far:

loadrt lincurve count=(1?) personality=(?)

setp lincurve.0.x-val-00 0
setp lincurve.0.y-val-00 0
setp lincurve.0.x-val-01 4
setp lincurve.0.y-val-01 0
setp lincurve.0.x-val-02 5
setp lincurve.0.y-val-02 -0.002
setp lincurve.0.x-val-03 6
setp lincurve.0.y-val-03 -0.003
setp lincurve.0.x-val-04 13
setp lincurve.0.y-val-04 -0.003
setp lincurve.0.x-val-05 14
setp lincurve.0.y-val-05 0.000
setp lincurve.0.x-val-06 15
setp lincurve.0.y-val-06 0.001
setp lincurve.0.x-val-07 21
setp lincurve.0.y-val-07 0.001

net lincurve.0.in (what pin do I net it to that gets the X axis position?)
net lincurve.0.out  (what pin do I net this to push the correction to the Z axis?)


To the questions.

1) If I'm only using one graph, does "count" in the loadrt statement have to be there, and if so, is "1" the correct count? 2) Does "personality" in the loadrt statement have to be included with the number of elements in the graph? 3) What pins to I need to net the lincurve.0.in to get the position of the X axis and lincurve.0.out to feed the correction to the Z axis? 4) If I use something other than "1" in the counts, say "2" does that mean I have 2 - 16 pair graphs available? 5) The lincurve man page lists this under the "Parameters": lincurve.N.x-val-MM float rw - what does the rw mean?  I'm presuming read/write but what is read/written?

I'm sure I'll have more questions.  It's been ages since I've had to write an hal code, and I spent most of yesterday afternoon reading the hal docs.  I've refreshed some things in my mind, but there are still a few things that are unclear to me like the above.

Thanks for the help so far fellas,
Mark

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to