On 5 March 2018 at 14:17, Mark <wendt.m...@gmail.com> wrote: >> You set the curve up (rather clunkily) in HAL. If X = 0 is nominal and >> X = 3" is 5 thou high: >> setp lincurve.0.x-val-00 0 >> setp lincurve.0.y-val-00 0 >> setp lincurve.0.x-val-01 3 >> setp lincurve.0.y-val-01 -0.005 >> >> and so-on. > > > Okay, so how do I translate the 'y-val' to the Z axis position? I may have > mentioned I'm a tad weak on hal coding since I haven't done it in ages. > Looking at those lines above, I'm guessing that the Z axis would "curve" > between station 0 to station 1 to accommodate the -0.005 difference?
As I wrote the lincurve component its operation is so obvious to me that I don't even understand the question. lincurve just maps an input value to an output value, using an imaginary graph of points linked by straight lines. So for an X value between two X points it linearly interpolates between the two corresponding Y values. > If that is true, how would I map say something like this: stations 0 - 5 > are the median height. Stations 6 through 15 are .003" high. Stations 16 > through 25 are .002" low and so on. If you have 25 points to map then it is a bit tricky as lincurve only has 16 points. You can skip some, though, if they all have the same offset. >> You might want to keep the curve definition in a separate HAL file for >> convenience. > You lost me on this one. What is the curve definition? The set of "setp" commands that define the (x,y) pairs. > Speaking of HAL, is > the placement order in the main HAL file for something like this going to > bite me If the curve definition HAL file is separate then it needs to be loaded after the file that loads the lincurve component, or there won't be any parameters to setp. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1916 ------------------------------------------------------------------------------ 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