Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Interval for contour move

Solved!
Go to solution

Hi

 

I am trying to code a program to let a single axis run a sinusoidal profile. I used the example "Axis continuous contour move.VI" as my starting point. In the example, there is a "signal generator" VI to generate the profile, where the frequency is used as input.  Meanwhile, for the "update point" property, the interval is set. So here comes to my question: The frequency seems double-defined.

 

In fact, I remove the frequency input for the "signal generator" VI and keep the interval alone. It is running but the frequency is not right. For example, I have a 200 point table and set interval as 1, the full cycle did not take 200s to finish. Meanwhile, if I put any number smaller than 1, the motor does not move. 

 

I was so confused by the definition of interval now. Can somebody help? 

0 Kudos
Message 1 of 5
(2,257 Views)

Jacobier,

 

I spent a little bit of time looking at the example that you were mentioning, trying to figure out what you meant with all this explanation, but I'm not quite able to visualize it. Can you attach your code, or at least a screenshot so that people here on the forums can see exactly what you're talking about?

C. Weeks
Product Support Engineer
NI
0 Kudos
Message 2 of 5
(2,224 Views)

Hi

Thank you for your reply. Attached is my code and a screen shot I took for 1s interval. The unit in the plot is 10 ms.

Download All
0 Kudos
Message 3 of 5
(2,222 Views)

Jacobier,

How does the example program operate on your system? I see its interval is set to 0.01, which is less than 1. Does that operate as expected, taking 1 second to complete its cycle?

Also, I'm not sure what you mean by the unit in the plot is 10 ms. Does that mean that the whole plot is taking 10 ms? or each point?

C. Weeks
Product Support Engineer
NI
0 Kudos
Message 4 of 5
(2,217 Views)
Solution
Accepted by topic author Jacobier

Conner

 

Thank you for your reply.

The unit for the number in the x-axis is 10 ms. The total time is about 36 s. 

 

BTW, I have figured out the problem. I did not use the VI that generates waveform properly. I thought it generates a sin wave in one period. However, it generates waveform based on time, and the default is 1s. The default of the frequency is 10 Hz. So if I did not input frequency and time length, I get 10 cycles of sin waves with  200 discretized points.  

 

When I used 1s for the interval of contour move, I will get more than one circle. So what I plot is not the full table, but just some of the points of the table. That is why it took less than 200s. 

 

 

0 Kudos
Message 5 of 5
(2,210 Views)