LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interpolation of xy stage

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.

 

0 Kudos
Message 1 of 7
(3,088 Views)

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:

  1. You're looping through the While loop every 50ms. As far as I can see, this is only to update the value held by 'Generate Params'? If so, consider using an Event Structure with the event being 'Generate Params:Value Change' and removing the Wait(ms) node.
  2. You carefully construct an interpolation from your X2, Y2 values then use the values of the 'Ramp' VI (I don't have this example - I suppose it might have been removed from LabVIEW between 2011 and 2016 - but 'Ramp Pattern - Ramp by Delta' I'd guess is similar) to get interpolation points. However, this doesn't seem to help when it comes to points where only your Y coordinate changes. It seems likely in this case you'd want to keep X constant and change Y only, but instead X increases and gives strange results. Consequently, you might want to put your arrays of points into a For loop with N-1 iterations and use elements n, n+1 to calculate a start and end point and then generate points on each segment.

GCentral
0 Kudos
Message 2 of 7
(3,067 Views)

Hi cbutcher,,

thanks for your reply... but can u pls elaborate it more.

 

0 Kudos
Message 3 of 7
(3,050 Views)

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

0 Kudos
Message 4 of 7
(3,042 Views)

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!)

 

 


GCentral
0 Kudos
Message 5 of 7
(3,028 Views)

dear cbutcher,

 

pls save your vi in version11.0

0 Kudos
Message 6 of 7
(3,020 Views)

Oops! Sorry.

 

Try this one.


GCentral
0 Kudos
Message 7 of 7
(3,011 Views)