Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Sinusoidal Velocity

Hi,
My system consists of a PCI-7352 Motion Control board used in conjunction with Parker Compax3 motor controllers. I've used this combination on several systems but I have a new question. First some background info:
Labview 7.1.1
NI-Motion 7.4
WinXP Pro
Axis 1-Velocity control (both in the C3Manager and MAX)
Axis 2-Torque control
Basically the motors are connected to the part under test; motor 1 drives the part under test while motor 2 provides programmed torque amount (durability testing).
 
My question...I need to provide a sinusoidal velocity command, 2-3 Hz, while the driver motor moves anywhere from 180°-360° in each direction. Supplying the torque to motor 2 is simple enough.
 
I've looked through some of the "countoured moves" examples but I'm not quite following them. This is probably a very simple thing to do but it's eluding me! I had everything working fine by just issuing a velocity command and position setpoint and waiting until the move was complete and then the customer sprung the sine wave stuff on me!
 
Any help is appreciated.
Thanks,
Teri
Message 1 of 21
(6,071 Views)
Teri,

if you had a spare axis, you could simply use the circular interpolation mode to generate a sinusoidal velocity profile by using only one axis of a two axes vector space that performs circular moves (each axis moves in a sinusoidal pattern, shifted by 90°). This method is very simple but it requires an additional spare axis that is not available on yoru PCi-7352.

In this case contouring is the method you should use. In fact the One-Axis Contour Move with Position Monitor.vi, which is a shipping example, does exactly what you want. In fact it generates a sinusoidal position profile, but as the velocitiy is the first order derivative of position, in case of a sine wave the velocity profile is also a sine wave.

Please refer to the NI-Motion Help to learn how contouring works (Programming with NI-Motion >>Contoured Moves).

I hope this helps,

Jochen Klier
National Instruments
0 Kudos
Message 2 of 21
(6,068 Views)
Hi,
I finally got it to work. Attached is a JPEG of a simplified version of what I did. There are probably simplier ways to achieve this but it works and I'm happy. The only thing I could not get to work was to configure the buffer, then set the buffer size to zero to reuse the buffer repeatedly as explained in the help section for Configure Buffer.vi (NI 73xx Controller Considerations). I think it wants to see a multiple of buffer for number of points but my cycles may run up to a couple of million and that number would be too large.
Thanks for your help,
Teri
0 Kudos
Message 3 of 21
(6,052 Views)
In order to output a position buffer repeatedly configure the "Buffer Size" to the amount of data that you need to output one period of your sine wave. "Total points" should be set to "Buffer size" x number of periods (e. g. if your buffer size is 500 and represents one period of your sine wave and you want to output 10 periods, the you should set "Total points" to 5000). The maximum value for "Total Points" is (2^32)-1.
In order to allow regeneration, you need to set "Old Data Stop" to "False".

With a timing interval of 10 ms this allows you to generate a continuous motion profile that runs for almost 500 days.

Jochen


0 Kudos
Message 4 of 21
(6,039 Views)
Hi

I needed to create a sinusoidal velocity profile with high sampling rate and freq >10 Hz which is too much a task for the above VI. I used sinewave velocity vi provided my NI but the amplitude of the oscillations mysteriously happen to increase all the time. Is it suppose to happen?

Thanks
Regards
Sneh@l
0 Kudos
Message 5 of 21
(5,409 Views)

No, it shouldn't increase. Which vi are you using? Can you attach it? I've done many sinusoidal output profiles which I generated myself. I don't have any here with me (new job) but I can find something for you after I get home. I ended up using the contour move one that I was discussing before because I was limited to the Motion Control board.

Thanks,

Teri

0 Kudos
Message 6 of 21
(5,406 Views)
Hi

Here is the link.

http://zone.ni.com/devzone/cda/epd/p/id/1438

Thanks
Regards
Sneh@l
0 Kudos
Message 7 of 21
(5,391 Views)
I'll take a look at it tonight...I don't have any Motion stuff loaded on my work computer.
0 Kudos
Message 8 of 21
(5,386 Views)
The VI you referenced, "Changing Motor Velocity in a Sinusoidal Pattern" (http://zone.ni.com/devzone/cda/epd/p/id/1438), has a maximum loop rate of 1kHz.  This is limit is set by the operating system, which updates the system clock once every millisecond.  Therefore, the VI can only write to the "Load Velocity Override" once a millisecond.  Do you need to update the motor's velocity faster than this?


Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 9 of 21
(5,365 Views)
I need the samples to be high - 150 per cycle
and frequency around 10 hz...

further the velocity is 1+ sinx
so position is x-cosx , hence it kept increasing...
Regards
Sneh@l
0 Kudos
Message 10 of 21
(5,350 Views)