05-03-2019 12:26 PM
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?
Solved! Go to Solution.
05-07-2019 09:49 AM
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?
05-07-2019 10:01 AM
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.
05-08-2019 01:48 PM
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?
05-09-2019 10:18 AM
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.