Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling rate Real time pci7030/6040e

With reference to the specifications sheet of the real time
>multifunction board PCI 7030/6040E, it is stated that the maximum
>Sampling Rate of the device is given by 250kS/s for multi channel and
>500kS/s for single channel.
>
>             For my project, I have used 1 analog output for waveform
>generation and 2 counters output for pulse generation. In order to
>achieve the outputs, I have used the following VIs and input the
>corresponding parameters stated:
>
>1. Signal Generator by Duration.vi;
>Input 50k value into the # of sample terminal of the VI with the
>duration terminal at the value of 1.0. That's Sampling Rate = 50kS/s
>
>2. Square Waveform by Duration.vi;
>Input 50k value into both the sampling
rate, Fs and number of samples,
>#s under the sampling info terminals of the VI.
>
>3. AO Config.vi;
>Input a 50k value into the buffer size terminal of the VI.
>
>4. AO Clock Config
>Input a 50k value into the ticks per second terminal of the VI.
>
>The program works well if all the parameters stated are under 40k, i.e.
>at a sampling rate of 40kS/s. However, at 50k and above the program
>still runs and downloads to the real time card but after downloading,
>the card does not response (no output).
>
>Hence, I have the following questions;
>
>1. By using 1 analog output and 2 counters output, does this means that
>it is multi channel?
>
>2. Project needs to generate waveform up to a frequency of at least
>100kHz hence the sampling rate must be at least 200kS/s, with is within
>the stated limit of the hardware. However, I cannot even achieve
>50kS. why?

thanks
0 Kudos
Message 1 of 12
(4,369 Views)
Hi Ref.

I suspect if you toss the use of the counters that it will not make much difference.

Are you possibly running into a memory limitation?

Try doing 50KS/s for half a second instead. Does that let you bump up your sample rate?

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 12
(4,369 Views)
Hi Ben,

thanks for your reply. What do you mean by memory limitation? Is it the size of of program is too large, or that my computer Ram is too slow? My program is about 400K and my computer Ram is running at 256.


If I will to sample at half a second, the input for the rest of the VIs used will have to change to 100kS/s so as to have a non distorted waveform. However the real time card still does not response. From experience, is it possible to generate a 300kHz sine wave and a wave pulse(not using counter but by modifty the square waveform generator VI)with pulse width of 1 microsecond through the analog output by using the real time card?

thanks
0 Kudos
Message 3 of 12
(4,369 Views)
When run LV-RT on the 7030/XXXX the entire app and its data space must fit in the on-board memory of the 7030.

The amount of memory in you PC is inmaterial.

Break up the data geneartion and I/O opeartions into smaller chunks. LV-RT is capable of deterministically updating the output buffer, so you should be able to write the smaller chunks without missing any updates.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 12
(4,368 Views)
Dear Sir,

But from experience, is it possible to generate a 300kHz sine wave and a wave pulse(not using counter but by modifty the square waveform generator VI)with pulse width of 1 microsecond through the analog output by using the real time card?

How do i go about breaking up the program into small chunks?

Is the problem related to the buffer size?

Thanks for all your reply


thanks"
0 Kudos
Message 5 of 12
(4,368 Views)
Please post your code.

I will try to take a look at it.

(Sorry, I am a consultant, not NI. I only answer questions in my spare time).

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 12
(4,368 Views)
To clear up a little confusion, the maximum analog output *update* rate (this is different from the analog input *sampling* rate, which is immaterial since you are not doing any analog input) is 1 MS/s for a single channel of analog output.

As Ben mentioned, the counters should not affect the maximum rate of analog output.

As a troubleshooting technique, I'd recommend starting with NI shipping examples for analog output and run those examples to see how fast your board can generate. Then afterwards try the same for the counter outputs. Then try combining the examples to get the operation your looking for.

One final note. The operation you are trying to achieve sounds like it would be much better suited for a regular Windows-based DAQ device. Buffered AO i
s not a common use for RT Series DAQ devices, but I would still expect it to work.
0 Kudos
Message 7 of 12
(4,368 Views)
Hi Ben, thanks for your time, i really appreciate your help.

thanks alot.
0 Kudos
Message 8 of 12
(4,368 Views)
Hi Jeff B, thanks for you comments and suggestions. I have try to run a common and simple example from the Labview. "function generator.VI". However, it also can't boost the frequency to 300kHz. If the sampling rate is a 1MS/s, it should be able achieve up to 500kHz, right?

i am still trying to find out wats the problems, if you happen to have any ideals pop up, please inform me. I really appreciate all suggestions

thanks
0 Kudos
Message 9 of 12
(4,368 Views)
There are a few important points here. First, the spec that I mentioned previously for analog output on the 6040E of 1 MS/s was for the 6040E, not for the 7030/6040E combo specifically. I was expecting that the performance would be the same on the combo board, but have found that (likely due to DMA differences between the RT OS on the 7030 board and Windows on a regular PC) a single channel of analog output can go at most 500 kS/s. I just tested it on my PCI-7030/6040E and got that rate myself.

There is an example that ships with LabVIEW/NI-DAQ called "Continuous Generation.vi". Target your 7030, open this example, and change only the device number and update rate appropriately. You should be able to reach 500,000 for the update rate, but abo
ve this you will receive a -10843 error.

Finally we should discuss the update rate and how it corresponds to the maximum frequency signal generated. Let's look at a simple case - a sine wave. To represent a single period of a sine wave, I would say you would need at least 10 points to make it very recognizable, and probably closer to 50 points for it to be smooth.

Sine Frequency = (Update Rate) / (Samples Per Period)

So for the maximum rate you want to take the highest possible update rate and the lowest acceptable number of samples per period.

S = Samples
s = second
C = Cycle

(500,000 [S/s]) / (10 [S/C]) = 50,000 [C/s] (Hz)

A 10 sample sine wave is already quite coarse, if you wanted to go coarser, you could get up to perhaps 100 kHz, but it would be virtually unrecognizable as a sine wave. Best case is using a square wave where you can represent an entire period accurately with two samples. In this case your maximum frequency would be 250 kHz, but it would now
be much more efficient to use one of your counters to generate this signal unless they are both already being used for something else.
0 Kudos
Message 10 of 12
(4,368 Views)