Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Motion Assistant Contour Array Points - Optimal Array Size?

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.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 1 of 4
(6,015 Views)

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.

 

Matt J - NI Tools Network
0 Kudos
Message 2 of 4
(6,007 Views)

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.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 3 of 4
(5,994 Views)

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

 

  1. You always have a fixed sized array of setpoints. If you are using a 73xx card, this simplifies setting up your contour buffer. It also avoids using a lot of memory.

Cons

 

  1. For long moves, you could have a long time and large distance between position setpoints. The motion card will do a spline interpolation to smooth the move, but the splining algorithm is only so good.
  2. If you are sending the contour setpoints to a motion card, you don't know the interval between setpoints (although this isn't difficult to obtain).

Constraint Type: Sampling Time

 

Pros

 

  1. Regardless of the move, you always have a fixed time between setpoints. As long as your sampling time isn't too large, even fast moves should execute accurately.

Cons

 

  1. For a long move, you could generate a lot of setpoints that consume a lot of memory.
  2. Setting up contouring buffers can be trickier.

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,

0 Kudos
Message 4 of 4
(5,983 Views)