Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

irregular motion

Dear all
I konw we can use function of circular_arc to control the  velocity profile of 1 axis doing sine motion.
But if I want to control my axis doing irregular motion,like x=sin(r)+cos(r),is it possible?
How should I do?
Thank you very much.
 
yoan
0 Kudos
Message 1 of 6
(4,582 Views)
Yoan,

Irregular motion like you described is best performed using a contour move.  Contour moves are moves in which every point along the path is pre-calculated and stored into a buffer for execution.  So in order to do your x=sin(r) + cos(r) move, you would have to precalculate (generate) your points and load them into a buffer.  Examples of setting up a buffer and performing contour moves can be found in the shipping examples for LabVIEW.  These examples can be accesed by launching Example Finder from LabVIEW  (Help>>Find Examples) and doing a search for "contours".
S. Arves S.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(4,573 Views)
Dear Arves,
Your suggestion is very useful. 
After tried contour moves, I have another problem now.
In example, there is a NOTE : " Acceleration and deceleration are NOT implemented in this example because the contouring tracks the mathematical formula."
 
Also this control method can match the irregular path that I intended, but the velocity of the motion was out of control.
In my applications, the path of axis is function of T(Time),like x(t)=sin(2*pi*t/T)+cos(2*pi*t/T). And V(velocity)=dx/dt.
So I trying to find ways that  both the "path" and the "velocity profile" of motion can macth  what I need.
Please give me some suggestions.
 
Thank you very mech.
 
Yoan
 
 
 
 
0 Kudos
Message 3 of 6
(4,569 Views)

Yoan,

The velocity of the contour move will not be constant because the algorithm attempts to maintain a constant time between points (i.e. V = dx/dt).  Therefore if there is a large jump in x the controller must try to make up for that jump by increasing velocity.

If you want to have a more constant velocity and you don’t need your points to be exact then you can use blending.  This will give you a more constant velocity, but you will not hit the points you specify exactly.  There are some shipping examples that demonstrate this a search for blending should bring them up in Example Finder.

The other option is a little more difficult to implement.  It will require you to insert extra points between the larger steps.  This will decrease the distance the controller must travel so the velocity will be closer to constant, this will probably have to be done manually, but you could implement something in code that would check the distance between points and if it is greater than a predetermined distance you could insert another point.

-Arves

S. Arves S.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 6
(4,559 Views)
Dear Arves,
 
Thank you for your reply. It is very helpful.
I'm using the function about contour move to control the axis's postion in buffered operation and changing the requestedinterval to control the velocity.
I have other problems now.
1) Can I use blending in contour move operating mode? 
2)  My motor's maximun velocity is 6500RPM. If I set the velocity greater than 3000RPM in velocity mode, the motor was killed and following error occurred always(The  encoder counts per reverlution is 4096. PID rate is 125microseconds). 3000RPM isn't enough in my application. How Can I solve it?
 
Thank you very much.
 
Yoan
0 Kudos
Message 5 of 6
(4,527 Views)
Yoan,

Yes, blending is possible when doing a countour move.  An example of this is the Sequence of Blended One-Axis moves.vi shipping example in Example Finder.  You can adjust this and expand it to suit your needs.

As for the following error occuring when you go above 3000 RPM, does the error occur when you slowly increase speed (in steps of around 100 RPM)? If not, then this may be the cause of the problem. When you tell your motor to go to 3000 RPM, the driver expects the motor to handle this command instantly.  If it does not, (most motors cannot) then the driver starts counting following errors and with 4096 counts per revolution these errors can add up quickly.  You can adjust the number of following error counts before an error occurs and can test the value for error counts that will work for you in MAX on the advanced tab of the 1-D interactive applet.
S. Arves S.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 6
(4,508 Views)