Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

update rate

Hello,

I wanted to know about the update rate option in AO GENERATE WAVEFORM vi, now how is thsi different to frequency... and what does the default value of 1000 imply?. I found after doing testing that defalut value of 1000 gave the original signal....but i relaly dont understand the full implications/reasoning behind having this vi

Reagrds

Mansoor
0 Kudos
Message 1 of 7
(5,383 Views)
when you want to generate a wave form, you first build the waveform, shape, and the number of points per buffer (L).

The update rate (U) = the generation rate of the clock , which is the update rate for the number of points (samples per sec).

for a wave form, The frequency f is then given as

f (Hz)=Update_Rate / (# of points per buffer) =U /L

if you have more than one cycle per buffer, say n, then the frequency is

f (Hz) = n* (U/L)

Diferent AO or MIO cards have different clock rates. If you try to use an update rate greater than what the daq card's max rate, you will get an error in NIDAQ

Hope this helps
0 Kudos
Message 2 of 7
(5,376 Views)

Hi,

I'm a bit confused as to what the Update Rate is.

If I understand correctly the analog output frequency is given by

f(hertz) = Update Rate/Samples per Period

where Samples per Period = Sampling Rate/frequency

Basically I want a signal to have f = 50, which I'm trying to calculate using Sampling Rate, Update Rate and frequency. However, I don't understand what the update rate is. Is it the same as Sampling Rate. I've been trying to find an answer to this the whole day.

0 Kudos
Message 3 of 7
(5,135 Views)

 

 

<<<Basically I want a signal to have f = 50, which I'm trying to calculate using Sampling Rate, Update Rate and frequency. However, I don't understand what the update rate is. Is it the same as Sampling Rate. I've been trying to find an answer to this the whole day.>>>>

The sampling rate has nothing to do with the update rate.  When you generate a periodic signal example a sine wave, you are actually generating a digital sine wave, not an analog signal generated by an oscillator.

 

You first have to decide how many points you are sending to the buffer.  Assume you generate one cycle of a sine wave and send it to the buffer.  Then the update rate determines the time between updates.  If the update rate is 1000 S/s, then the DT between samples is 1/1000 = 1 ms.  If the sine wave generated has consecutive points say of 4.5V, 4.6V, 4.7V, then the generated wave will have 4.5V and it remains constant for 1ms, then it changes to 4.6V and remains constant for 1ms, then changes to 4.7V and remains constant for 1ms, etc…

 

If you examine the generated wave on an oscilloscope, you will find that it looks like a stair case because it is held constant between updates.  If the update rate is increased, the generated wave becomes smoother.

 

 

If           U= Update_Rate (Samples/s)

            L=(# of points per buffer)

The frequency generated is then f(Hz) = U /L


if you have more than one cycle per buffer, say n, then the frequency is

f (Hz) = n* (U/L)


Message 4 of 7
(5,125 Views)
Thank you for the reply Dr. Imad.

I understand what you've explained. But I'm still confused as to how I could define/calculate the Update Rate.
 
From my VI (attached), I'm generating a sine wave using the Basic Function Generator VI and I enter the following inputs,
 
Sampling Rate: 15000 S/s
Number of Samples: 5000                                                    
Frequency: 50 hertz
 
Given the above inputs, what will be my analog output frequency. I have no idea what my Update Rate is or how many points are read into the buffer.
All I know that the output frequency varies with the sampling rate, and I just want to know exactly what my output frequency. What's the relationship between the above inputs and the analog output?
 
Best wishes
0 Kudos
Message 5 of 7
(5,111 Views)
Now I know why you meant when you refered to the sampling rate.
 
For your attached data, the frequency generated is 50 Hz.  
 
The vi you used to generate the signal does not  use the number of cycles per buffer directly, this done behind the seen.  So you do not have to worry about it.
 
1/ (the sampling rate)       in this case represents the  DT between samples.  If you want to smoothe the wave, you have to decreaseDT (same thing as increasing sampling frequency).  (or actually you may want to increase the number of samples).
 
If keep increasing bthe sampling ferquency, at one point daqmx will generate an error about exceeding the maximum update rate for the card you are using.
 
Note, your attached vi has an error. The samples per channel and the sampling rate, are bundled incorrectly.  The sampling rate should be bundled first .
0 Kudos
Message 6 of 7
(5,093 Views)

Thank you for identifying that:)

I think that should solve my problem (can't believe I wasted days on this).

0 Kudos
Message 7 of 7
(5,081 Views)