LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triangle - renew

Hi

I will to renew me post from last friday witch concerned triangle
generation with specific amount of points with specific ranges of
triangle.
Hier is an example what I precisely will:

"from 1 [V] to 3 [V] -100 points, from 3[V] to 5 [V] - 45 points from
5[V]
to 8[V] -20 points,8[V] to 5[V] -20 points,5[V] to 3 [V] - 45 point and
3[V] to 1 [V] - 100 points - and that is one period,and this six
parts should to have the same slope (slant) - this is very important."


The generation of this points is no problem,but then i become different
slops of this parts ... so,I tryed to synchronize an counter with AO(the

more points,the bigger frequency), but it works only for max.50
point/sec.If i make it faster,then my triangle looks not
like a triangle

.... (I can't change so fast frequency of the counter - based on '
AOchangeRateOnTheFly.vi' - how can I change this VI to faster respond
to the change rate ??? )

I need urgently to do it

Thanks for any suggestion
Robert
0 Kudos
Message 1 of 2
(2,534 Views)
Robert,

You are correct that the waveform generation depends upon the number of points in the waveform and the rate of the update clock. However, instead of using the clock to change each leg of your waveform, I propose changing the points for your waveform. I suggest using a fast constant rate for your update clock, even the internal clock of the board, and then filling in the points for your voltage value. You might have extraneous points, but they would add to the precision of your waveform and add to the smoothness of it.

The AOchangeRateOnTheFly example is sufficient for some circumstances, but it seems like the inevitable latency that occurs when making each frequency change is not up to your specifications. The example takes advantage of the ability to ch
ange the pulse width specs programmatically. Thus, the user interface is polled for changes, and when they are detected, the functions to change the pulse specs are called, and then the switch cycle makes the changes. You can see that there is a slight software latency here, especially if you are trying to coordinate it with the segment changes of your waveform.

Thus, I suggest leaving the rate constant and changing your waveform point values. Another idea is to use one of the Arbitrary Waveform Generation boards (NI 5411) that allow you to store segments of waveforms and create a staging list, mixing and matching the segments to create seamless arbitrary waveforms. However, even in that case, you would want a constant update rate (it can achieve 40 MHz). So it would again fall to how you create the waveform segments.

Regards,

Geneva L.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 2
(2,534 Views)