12-13-2011 11:36 AM
I am working with the NI Motion Assistant API and plyaing around with the Contour Move generation where I feed a set of X, Y target points to the Set Contour Move Properties.
One of the inputs is Profile Calculation Constraint - Array Size, Constraint Value (which would be the array size to use).
I am wondering if there is a way to calculate the "optimal" array size for any particular move? I know I can have too few - can I have too many points in an array (being reasonable here and not planning to use the whole 2^32 size allowed).
Thanks.
12-14-2011 05:47 PM
Hi Ryan,
In general, it would seem that more points are always better. However, can you describe the move you are trying to create and if there are any guidelines to how tightly it must fit this movement line? LabVIEW's description of these constraints is a bit lacking, so it may come down to trial & error.
12-20-2011 11:43 AM
There is no one move that is going to be made that is awlays followed. It could be a stright line one one axis, it could be an arc, it could be a straight line in x-y - the shape is determined by the user. I was wondering if there is a mathematical recommended way to calculate based on distance/time or something else that could be applied.
12-21-2011 06:21 PM
Hi Ryan,
Unfortunately, I'm not so sure I have a good answer for you. I'll evaluate some of the pros and cons below and then ultimately make a recommendation:
Constraint Type: Array Size
Pros
Cons
Constraint Type: Sampling Time
Pros
Cons
Conclusion
It depends on what you expect the end customer to be doing. I prefer using the sampling time constraint since it is more robust for fast, long moves (and still good for slow, short moves). It will make creating contour buffers more difficult, but there is an example (Two-Axis Smart Contouring.vi) that shows how to dynamically update the buffer. Ultimately, I think it is better to focus on accurate moves than minimizing memory consumption.
If you decide to go with the sampling time method, I would start with a constraint value of .01, since 10msec is the shortest interval when configuring a contour buffer. Try and generate some position profiles to see how big the arrays are. For optimizing, it is just a tradeoff between array size and the accuracy of the generated motion profile.
Thanks,