03-14-2017 11:29 PM
Hello All,
I have a Linear Motor Positioning xy stage which has travel range of 25mm (max). I wrote a G-code for xy stage movement. I want to interpolate (linear interpolation) those G-code movements to insure a perfectly straight and smooth axis movement.
the output generated by interpolation vi is having many number of possible combinations..say for eg.. my starting value is 0.0 and final value is 30.0 (my stage max travel range is 25 mm) and increment value of 0.01. the interpolated values of xi and yi is about 300 values..
Do i have to use all those 300 values for xy movement???? Pls suggest... VI attached for your reference.
03-15-2017 12:06 AM
In answer to your question, I suspect it depends on your stage - but I would guess that the stage has its own interpolation routines in many (most?) cases (in which case, probably not!)
Some comments related to your VI:
03-15-2017 03:15 AM
Hi cbutcher,,
thanks for your reply... but can u pls elaborate it more.
03-15-2017 03:55 AM
hi cbutcher,
did the final value should be final coordinate value in the G-code file or the max travel range of my positioning stage
03-15-2017 04:45 AM
With regards to my first point, I just mean using an Event Structure with a value change event will cut down on the load on your computer while the VI is running - most of the time your loop is going round and round doing the exact same calculation over and over.
With regards to my second point, I mean that when only your Y value changes between two of your input values (and X is constant) the interpolation returns strange results. You should consider interpolating between each pair of points separately and handling the case where X is constant (for example, by using a for loop with a dy value multiplied by the index and added to the starting y value). An example VI is attached below, but it's quite messy and you should definitely check what you want to do with it. As I said in my first post, it wouldn't surprise me if this manual interpolation is entirely unnecessary (but it might depend on your translation stage!)
03-15-2017 05:21 AM
dear cbutcher,
pls save your vi in version11.0
03-15-2017 08:46 AM