Question DAQ sample rate

Hello

I tried to understand how the 'number of samples' and 'rate' controls affect the frequency of sampling for the DAQ hardware. For example, say I want to acquire data from a sensor of pressure at a frequency of 10 Hz intuitively, I would think everything I do is on the desired sampling frequency, in this case 10 Hz control the 'frequency', try this, I know that's not true. I read that 'number of samples' affects the sample rate by setting a buffer value that must be reached before the VI will process the acquired data. So I also tried to set the "number of samples" to 1 and "rate" at 10, thinking this would have led to a sampling frequency of 10 Hz, and again, it is not. The only way I know to control the sampling frequency is using the wait function (ms), but then I always get buffer overflow errors.

Can somone if you please explain to me the error in my thought process and also tell me the best way to control the sampling frequency? Is attached a simple VI, I am using to measure my actual sample rate and compare it to the sampling frequency that I am trying to achieve.

The VI use the DAQ assistant to acquire data of pressure, inserts data into a table, and measure the size of the array. I'm then by dividing the size of the array by the elapsed time in seconds for the sample/s (I'm also dividing the number of iterations of the loop by seconds and using it as a comparison). I compare this value to my entries for the 'number of samples' and controls 'speed' in order to give a sense of the role they play in sampling rate. The VI also allows to choose to use the wait function (ms), as well, using this function is the only way I can control the actual sampling frequency, but then I always get buffer overflow errors. Any information would be helpful, thanks!

What is the device that you are using? My guess is that whatever you have, it does not allow such a slow pace and is failing at its minimum.

Tags: NI Hardware

Similar Questions

  • Question audio sampling rate

    I read somewhere on this site that the authors of 3rd party applications have no control over the audio sampling frequency capture. It's all right, because my application can work with the 8 kHz that we are apparently limited to. However, when I leave my app, the phone remained in a State where all the sound elements (Media Player, ringtones, etc.) seems LoFi, as if he's playing at 8 kHz and I need to restart the phone to return to normal. Is this a known bug or I do something wrong?

    It's on a Curve 8900 running 4.6.250.

    Nevermind, I found the problem. There was a race condition in my application that caused destroyApp ends until the capture instance audio player is correctly closed.

  • On the NI PCI-6221 fast sampling rate question

    Hi I was wondering if someone can answer a question of sampling rate on this card to PCI-6221 (http://sine.ni.com/nips/cds/view/p/lang/en/nid/14132).

    Especially if I wanted to transmit simultaneously (analog output) and data acquisition (analog input), what is the sample rate max I could use. Kind regards.

    Since the 6221 is multiplexing the analog input, your question for I / simultaneous ao is possible for one channel of the only. If your "simlutaneously" can include delays (e.g., 100us), you may be able to work with several AI channels as well...

    HAVE the multiplexes, workable sample rate given that the total sample (250 kHz) frequency divided by the number of channels that you use. AO is faster than HAVE it, so it does not reduce this number.

    hope this helps,

    Norbert

  • fast sampling rate question...

    Hello

    I use USB-6009 and max sampling rate is about 48 K samples/s according to

    the specification...

    Question 1.

    48 K samples/s means... only when you receive 1 analog input?

    If I have 2 analog inputs then forge would be just half of the 48K?

    Question 2.

    using the daq assistant.

    I would like to get about 50 samples between 10ms

    If I do the math I get 5 K samples/s, which is enough for me

    However, I played with samples to read and throughout the day, the sampling rate,

    do not get this rate... (I'm outputing in file with LVM)

    I searched on the sampling frequency, and people here said

    samples read and sample rate do not havea correlation...

    but I see clearly that they are relevant. When I change a setting

    I get a different number of acquisition... I do N smaples.

    Please help:)

    Q1. Yes, except that the switching of channels takes awhile so the net price per channel is slightly less than half the rate of single channel.  The USB-6009 specification document does not indicate what is the switching time.  You should be able to get 5 kHz on both channels.  20 kHz might be close to the upper limit, but that's just a guess.

    Q2. The DAQ Assistant is often not the best choice for maximum performance.  I do not have the DAQ Assistant, so I can't be more specific. If you get the data as an array of DBL, rather than dynamic data type, it can be recorded directly, without conversion.  The other thing that can make a big difference is a loop two architecture of producer/consumer.  This allows the acquisition of data and save it to the file to run it at different speeds so that each can be optimized separately.  If you are trying to acquire 50 ms of data at a time and then, he writes to the file, you write to the file twenty times per second.  The first time, the operating system must reallocate some file space or do something else what delays write the file, your timing loop is disrupted.

    Lynn

  • Question of sampling DAQ Assistant

    Hi all

    I have attached a VI that I used to record data from a few different voltage and the channels of the strain. All channels and sensors work perfectly and the VI reads data very well, but will be only newspaper for about 9 seconds. I found that the reason is that, within that period, the amount of updated read samples is reached. I also found that the reason for which is rather than on the statement sampling DAQ assistant 50 or 100 Hz it samples at a rate of about 1.6 kHz (0,000620 seconds). I have nothing seems to change the rate of that sample to so if anyone has any ideas it would be much appreciated!

    Thank you very much

    Andrew

    I think I can explain what is happening. In a previous post, the op mentions using a 9237. That has a sampling rate minimum of 1.63 kech. / s. The rate in the corresponding file.

    Andrew,

    Read the Manual would have answered your question.

  • Output DAQ savings at a lower sampling rate

    Hi all

    I'm relatively new to labview and all its features. The problem I've seen is that I don't know how to sample a continuous signal again. This is my problem, the assistant LabView DAQ samples continuously at 1 KHz so that the voltmeter is smooth as voltage changes. I don't want to have to record every 1000 data points every second even if in the .csv, so I tried many different ways to "resample" the data at a given rate of about 1-10 Hz.

    So far, I tried to use the loop of the timer, I don't know how well it works, and it didn't get me very far. I also tried to set all the values in an array of a specified size (with respect to the sample hz), take the index 0, delete it and begin to fill the table again. This kind of worked, but not at all how I wanted.

    Sorry that I can not provide photos or a vi like I changed it so many times he doesn't seem something like what I tried before.

    Assistance in this area would be very appreciated,

    See you soon

    Microtechno

    Use a shift to the filenme register.

    You didn't post your code so I don't know how you have the DAQ Assistant set up. You would get a writing all data to data acquisition whenever writing file is called. If you want only a scalar value of the DAQ Assistant, doing something as simple as calculating the average of the signal.

  • The PXI - 6259 sampling rate M SERIES DAQ

    Good afternoon friends,

    I'm reading my series M manual trying to find AO maximum sampling rate I can run my PXI-6259 to.   I need to generate four-channel (A0:3) grid output wave high fidelity.   Higher sampling frequencies enable higher frequency in tone generation and a better representation of the sounds of broadband as white noise.   How fast can I run this puppy, and is there a point where performance and reliability starts to suffer?

    I'll keep digging for answers!

    Thank you

    Zach

    Zach Hey!

    If you look on page 3 of the 625 x card product, the analog output with 4 channels update is 1.25 MECH. / s.  Rock on!

  • Aggregate sampling rate

    Hello

    I'm looking at possible solutions for data acquisition. I use 4 or 5 entries analog and two digital inputs. During the analogue entered most of them will not need sampling extremely quick rate except for one who needs the least 100ks/s. I noticed solutions cost-effective have overalls sampling rate (eg. 250 ksps / s) which extends on all channels. For these products, such that the NOR-9205 compactRIO module, is possible to distribute unevenly sampling rate between channels (ie. could I give up 100ks/s for a single channel and spread the 150ks/s rest between the remaining channels in use)? Thanks in advance for any help,

    Adam

    Hello Adam,.

    To answer your question on the sharing of the sampling rate, it is not possible to have a single module different sampling frequencies, as described in this KB: here (http://forums.ni.com/t5/Multifunction-DAQ/Aggregate-sampling-rate-and-Multichannel-Scanning-Rate/td-....)

    In the case of the 9205 this module multiplexes between all channels (32 cases set up in single ended mode or 16 in differential) this means that the sampling rate of 250 kech. / s matches total on all channels.

    If you are using the differential mode then the samples per second on each channel will be 250 kech. / s divided by 16, IE 15KS/sec. However if you only specify 4 channels max sampling frequency will be 250 kech. / s divided by 4, IE 62.5 kech. / s.

    One way around this is to use 2 x 9205 in one of our new CompactDAQ chassis, which has 3 engines of timing to HAVE. This allows to set different timings in 3 different modules. What is described in this KB: here (http://digital.ni.com/public.nsf/allkb/E7036C1870F6605686257528007F7A72)

    I'm sorry of this reply took so long, and I hope the above information helps.

    Please do not hesitate to answer questions.

    If you want I could get one of our technical sales engineers to give you a call to discuss further with you data acquisition system?

    Kind regards

  • High sampling rate for 18 strings in a single task - DAQmx

    Hello

    My current experiences require the acquisition of 18 channels (6 HAVE custom voltage with excitement, voltage AI 12) data at a sampling frequency of 50 kHz. My question is if it is faesible using a single cDAQ-9172 chassis. Used modules are 2 x NI 9237 and 4 x NI 9215.

    The previous researcher on this project used 2 different Renault to do this, but I was hoping that I could reduce it to a single DAQ to simplify the synchronization of all channels.

    I wrote a *.vi (attached) to do this and write to a TDMS file using a structure of producer-consumer; However, when I run the * .vi, I can run for minutes, but the number of samples recorded for the PDM is rarely more than 100 k. Subsequently a buffer size error (attempted to read from the samples that have been overwritten) with less than 200 k samples ever record. I checked the max sampling rate (using a property timing node) with the configured task as in the * .vi and it shows a maximum of 235kHz.

    I can't say if I make just the structure of the producer consumer incorrectly or if I ask too much of the cDAQ-9172 unique?

    Any help would be much appreciated.

    See you soon

    Bart

    Hi bart.s,

    TiTou speaks sampling aggregate not simultaneous, so sampling rate 50kS/s is the same for all channels.

    I see the problem in the loop of the producer. If your sampling frequency is 50kS/s/ch and you read that a single sample/ch you will lose data because the producer loop cannot run so fast. You should read more than one sample. I recommend you also to move your tracing to the consumption loop code and work with larger amounts of data.

    The second problem may be with the error handling in your loop of consumer. Merge the mistakes of loop of consumer and producer and also add a few general for two loops off if the error occurs (for example, using local variable).

    Best regards

    CaravagGIO

  • acquisition of data with different sampling rates high

    I have a few questions on the use of the OMB-DAQ-3005 with different sampling rates high.

    For our application, we have 8 analog inputs. Which two are a quick response and should be sampled frequently.  We have an encoder quadrature (CPR 1000 running at 1800 rpm).  We plan to sample X 4 encoder.  For the analog inputs for the quick response, we want to trigger a sample of each pulse or each a few pulses, thus creating a timestamp with the position of the encoder with respect to position index as well as two fast analog inputs.  We have data correlating the analog inputs with the position of the encoder.   Other analog inputs, we want to measure relatively slowly (for example once every 5 dry or similar).

    How can I go on the configuration of the two (or more) sampling rates different wherein I can taste entered at different frequencies?  Also, is there a way to reset the encoder count after outbreak of the index as I have the position of the encoder with respect to the index?

    Maybe you'll find someone here who uses the OMB-DAQ-3005, but this forum is really more designed for LabVIEW programming issues.

    I've never used the OMB-DAQ-3005, but out of curiosity, I took a glance at the Manual of OMB-DAQ-3005.  The answer to both your questions are:

    1. you cannot run a hardware DQA Multiplex (like this one) at independent rates by channel.

    2. the OMB-DAQ-3005 supports an Index Z feature to reset the counter - look for documentation on how to configure any software interface you are using.  If you get stuck, you can try to discover media appropriate for instrument channel.

    Best regards

  • Specific sampling rate?

    So maybe this is a stupid question, but I need to know because I train for a specific sound. Is there a way [to logic] to shoot/change of a certain frequency sampling rates. I can imitate the sound I'm looking for with a low pass filter, reverb and a distortion. But I don't want to 'emulate', this sound, I want to create. Then I can put my own effects and play with it like I want to. If I have to use a bunch of effects to make it sound like I want that also the addition of said effects remove the sound and sound horrible. as to where pulling the sampling frequency of the high frequency and no downs will make me THE noise that I need and always allow to add nice effects to make MY sound instead of someone else. I hope you know what I mean. Let me to you specific real once more. I want to pull or carry a certain frequency sampling rates for a sound under water. I don't want to use filters to make the sound. So can you please help me. I invited everyone locally on how to do it and nothing works. Also if this is not possible in the logic of tell me if there are third party plug ins or maybe even a different DAW that could do like komplete Kontrol or audacity.

    Effect under water

    See if this thread is helpful at all...

  • myRIO sampling rate

    I'm new to myRIO and use it to measure sine wave (0V to 5V) of up to 10 Hz 20 KHz. I also quickly transformed of Fourier (FFT) of the signal measured in real time.

    Sideways FPGA of things, I try to keep things pretty simple, just read 2 channels of AI (connector B: AI0 and AI1), therefore potentially able to read each HAVE 250 kech. / s (as the unit has a capacity of 500kS/s). Does that mean this program gets a two analog inputs data exactly every 4 microsecond? If this is not the case, how can I make sure that the data is acquired through a fixed sampling rate?

    I realized that we can add to the FFT in FPGA function, but I wanted to manipulte the acquired data of analog inputs before it is sent to the FFT, which I don't know how to do now. Can someone explain me how do the arithmetic data (muliplication, division and so) on the acquired data and analog inputs to reducde the 12-bit resolution 10-bit to program FPGAS.

    Later, I created a myRIO program to read analog data 2 FPGA program which continues to turn in timed loop. In the program myRIO, the timed loop is configured to 1 MHz clock source type by a delay of 25 microseconds.

    This configuration means that the loop runs exactly every 25 microsecond?

    When I set up the less than 10 micro second time, myRIO has stopped working. Why is it so?

    Is it because myRIO cannot run as fast as FPGA?

    It is advisable to make the FFT of myRIO side analog data or FPGA?

    When I tried to do FFT using the power spectrum of myRIO side, he asked for waveform data. What I acquire is data analog. How can I convert in waveform data?

    If I read in the forum for help, I couldn't have the full answer to my doubts

    Discussions at the Forum I did reference:

    http://forums.NI.com/T5/academic-hardware-products-Elvis/setting-tick-count-in-myRIO-FPGA-software/m...

    http://forums.NI.com/T5/academic-hardware-products-Elvis/myRIO-aggregate-sample-rate/m-p/2707061/HIG...

    A lot of good questions here, I will try to answer as much as I can so as to offer a bit of advice.

    First of all, if you are looking to acquire data at a very specific rate on the FPGA, you'll want to use the Timer VI.  You are also going to use a FIFO of DMA to transfer data of FPGA in real time. A node read-write using as you do now means you'll run out of samples, or read the sample even several times.  The link below is a very good tutorial on how to do what I described above.

    http://www.NI.com/Tutorial/4534/en/

    Later, I created a myRIO program to read analog data 2 FPGA program which continues to turn in timed loop. In the program myRIO, the timed loop is configured to 1 MHz clock source type by a delay of 25 microseconds.

    This configuration means that the loop runs exactly every 25 microsecond?

    When I set up the less than 10 micro second time, myRIO has stopped working. Why is it so?

    Is it because myRIO cannot run as fast as FPGA?

    In general, you should not run a timed loop much faster than 1 kHz.  Using timed inside loop knots, you can monitor the real rate of loop during execution to see if f you meet your needs of the moment.

    The portion of your myRIO RT is slower than an FPGA in the sense where it cannot manage the rates of lines 40 MHz (he makes up for it by being able to work with much better pictures) and it is important to remember that it is just a computer.  The advantage of a real-time operating system, is that you have more control on the Scheduler, not that he is faster (less jitter, not faster code). There is more good reading below.

    http://www.NI.com/white-paper/3938/en/

    It is advisable to make the FFT of myRIO side analog data or FPGA?

    When I tried to do FFT using the power spectrum of myRIO side, he asked for waveform data. What I acquire is data analog. How can I convert in waveform data?

    I would say that it is generally advisable to treat your FFT on the side FPGA as long as you have the resources available, but for many applications probably little matter ultimately.

  • DMM (NI 4070), how to correctly set AC Freq (bandwidth) by the sampling rate

    using a NI4070 multimeter and I see the max connection is 300 kHz by respect it.  But I don't understand how to set the min and max, acFrequency according to the sampling frequency or speed reading.

    6 1/2 digits resolution, the speed can vary from 0.25 s/s to 100 s/s and this range corresponds to a lower end on the connection (minimum acFreq) from 1 Hz to 400 Hz.

    (Q1a) - is the playback speed, controlled by the minimum setting of IviDmm_ConfigureACBandwidth?   or vice versa?

    Otherwise, I do not see how to control the rate of reading or the sampling frequency.   IviDmm_ConfigureMeasurement only allows you to control the range and resolution.

    (Q1b) - is there a way to directly control the sample rate (digitizer) or playback speed (dmm)?

    (T2) - the upper limit of the bandwidth of AC always seems to be at 300 kHz... is there still a reason to reduce this maximum value?

    (T3) - Finally, unlike the traditional niDmm function, the resolution via the IVI configuration should be passed as absolute value; does directly when number of digits and the beach?   For example if I want to 6 1/2 digit to 300V range, I guess that by the specifications that the resolution should be set at 0.001 V... followign, if I want 5 1/2 digits to 1V range, the resolution should be set to 0.00001 V?

    Hi Rjohnson,

    I'll try to answer your questions as best as I can:

    Q1A.  The ConfigurACBandwidth function is used by the driver OR DMM to calculate the good aperautre for the measure.  So yes, by adjusting your minimum frequency, you will affect your reading speed.

    Q1B.  Your reading rate will depend largely on your measuring cycle.  To get a fast measuring cycle, there are a few things that you can adjust.  You can programmatically control your time aperature, as well as your time to settle.

    Q2. I can't find a reason to change. This parameter is only used for error-checking and verifies that the value of
    This setting is less than the maximum frequency of the device.

    Q2B.  I think what you say is right, but I'll need to check on that - I'll let know you as soon as.

    Hope that helps.  "" "I would recommend checking the explanation of the Cycle of the DMM measurement in DMM help' devices ' NI 4070" DMM Measuments "DMM measurement Cycle.

    Take care!!

  • Sampling rate 9172 OR cDAQ

    I am using a cDAQ 9172 with modules NI 9219, NI 9264 and three NI 9211.  I'm looking to acquire signals out of the acquisition of data within a loop under continuous sampling.  My program works fine if I set the number of samples to read 1-2 Hz, but I need to go faster than that.  If I change the sampling rate, the loop is executed at this speed but sensors still read only in samples at 2 Hz and then duplicating over and over again.  I was wondering if it was possible to read on 1 sample at the time of the acquisition of data at a faster rate.  I know that the frequency of sampling on the sensors and data acquisition are much higher than that.  1 sample at the time of the Board of Directors has the limitatioins of being only able to run at 2 Hz?  Please let me know

    Thank you

    Craig

    Hi Craig,.

    I don't know exactly what you describe. Are you feeding the DAQmx Read output in an express VI? Or are you using the express VI DAQ Assistant for the analog input task?

    If you use the DAQ Assistant, you can set the ADC synchronization mode without changing your code:

    If not, use the 'Active channels (if subset)' property to control the subset of channels on which your VI defines AI. ADCTimingMode.

    For example, the following code snippet creates 8 virtual channels named myVoltage0 by myVoltage7 and sets HAVE them. ADCTimingMode on myVoltage4 of virtual channels through myVoltage7. These are in the cDAQ1Mod2/ai0 physical channels via cDAQ1Mod2/ai3:

    If you leave off of the entry "name" on the string to create VI, then the virtual channel names are the same as the names of physical channel, so it's the equivalent:

    And by the way, a right-click on the property and selecting "create > Constant ' context menu saves you from having to hardcode a number like 14712.

    Brad

  • OR USB-6009 daq sample following loss, while the loop iteration

    Hello

    I am trying to acquire and display data measured from a DAQ NI USB-6009 material using Labview 2015. I am using the wizard daq defined for the differential mode and n samples with the sample rate and the total number of samples registration by the user. My problem is that when the specified amount of samples is acquired and the while loop continues to the next iteration, some samples are removed (I know because I tested it acquire a wave of fishing and there is a noticeable artifact in the signal at times where the while loops - I downloaded a file showing this artifact in a wave of fishing that was recorded with a sample rate of 1000 Hz 500 samples of recording each) iteration which means that the artifact occurs every half second).

    I think that this can be corrected by simply taking off the while loop daq assistant and specifying the number of samples you want the entire test to acquire. However, I would like to see the signal in a graph as its achievements and the daq can acquire data indefinitely until the user presses the stop which, to my knowledge, it would take a while looping. I downloaded my vi for reference, and any help would be greatly appreciated!

    Set your Acqisition Mode on "samples continues."

    N samples: reads the desired number of samples and stops.  Will read once again what DAQ Assistant is represented.  In other words, that there is a gap of time between readings.

    Continuous samples: data acquisition just constantly reads the data.  The DAQ Assistant just gets the number of requested samples and data acquisition keeps just read and store it in the buffer.

Maybe you are looking for