Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Sinusoidal move using contour move and NI9514

I am trying to develop a VI for my servo motor system. I need the motor to go to position 0 when I run the program and then follow a sine trajectory with respect to time. I have developed a VI (which I attached along with my project) that uses a Straight-line move to go to position 0 and then uses a contour move to follow the generated sine signal. However, I have two problems with it.

 

1- How can I define time for my sine movement? For example, I need my sine move to have a specific frequency. How do I make sure the motor is following the generated path with the same exact frequency in reality?  In other words, how does the contour move follow the generated points with respect to time?

2- When I run the VI, if the motor is not at position 0, it goes to position 0 and then stops and does not run the contour move. But when I stop the program and run it again from position zero, it will start executing the contour move command and follow the sine wave. How should I fix this problem?

 

Also, I found "Continuous Axis Contour Move" in the examples and I think it is what I want with some modifications. Now the problem is that I am able to run this VI with the simulated axis but when I add it to my project, it does not work with the real axis and throws the error code 70233. I think it should be a simple problem because I am able to run some of the other VIs on the same project such as "Axis Straight Line" or even my own contour VI.

 

I am using the following hardware configurations.

NI 9147 Chassis
NI 9514
AKD servo drive
NI PCIE-6351 (for measuring some sensors on my set up)

Thanks for you your response in advance.

 

Download All
0 Kudos
Message 1 of 4
(4,094 Views)

Hey msa_vcads,

 

In regards to error 70233, it is thrown when a specified resource is not found. Make sure you update the control on the front panel to your actual motor axis, not the simulated one. 

 

As far as time for your sine movement, on the contour move, you have the option to define an interval. This sets the amount of time the motor takes to get from point to point. So, if you have a 1 Hz sine wave with 100 samples, your interval should be 0.01 seconds in order for the motor to follow the 1 Hz wave. The interval should equal the frequency divided by the number of samples. 

0 Kudos
Message 2 of 4
(4,068 Views)

Hi HizNi,

 

Thank you for your response. I have changed the resource to the real axis, but it does not work. Regarding the frequency and timing, I think your response answers my question. 🙂

0 Kudos
Message 3 of 4
(4,043 Views)

Are you able to open an interactive control panel for after you switch it to the real axis in your LabVIEW project window?

0 Kudos
Message 4 of 4
(4,019 Views)