DAQ 1 sample (on request) vs samples keep

Hello

I have an NI USB-6501 data acquisition.  The device does not support the acquisition of continuous samples.  I need to constantly question the DAQ for signal change.  I was thinking about putting the DAQ inside a loop and just re-acquring 1 sample assist time and again.  Would be the cause of performance problems?  I would like to run the loop about 1000 times per second.

See this reference. Your results may vary considerably and there might be large amounts of jitter.

PS You have posted to the wrong Board. You should have posted in the digital I/o card.

Tags: NI Hardware

Similar Questions

  • Assistant DAQ need graphics update during the collection of samples of N

    Hi all, I have a question about the DAQ Assistant. I need to acquire data at low rates (ca 10 Hz). I want to acquire Let's say 100 samples. I join my card day ten times per second. But when I choose N (100) to 10 Hz, updates to the table only once - 10 seconds samples. Is there another way to take samples of N and be able to watch the chart updated 10 times per second the use of samples keep (10 Hz, 1 sample to read) with timer that ends the while loop after 10 seconds?

    When I use the last mentioned way and write data in the file, I always acquire 101 samples, not 100. And I think that's not an ellegant way to write data to file 10 times per second (higher sampling rates, LabView is unable to write all of the samples file .xlsx, with the CT (s) files, it's better).

    Perhaps to collect 1 sample on request would be ok, but so far I have not had an experience with that.

    Thanks for your replies

    Lefebvre

    First of all, read this excellent whitepaper on the DAQ-mx hardware and stop using the DAQ Assistant, who does not have the flexibility you need to do what you describe.

    Don't you see what you want to do?  You ask to taste 10 Hz and want to update for each samplegraph.  So how many samples do you take before you add the data sampled at the table?

    Now, with the knowledge of what you have learned in the white paper, put some (you can do it in one) features DAQmx to start the Acquisition, in a loop For (with this that connected to N?), take the appropriate number of samples and send that to the table, and then out of the loop, stop the Acquisition.  If you use tasks (created by MAX or using the command 'New task' of the LabVIEW project), you should be able to do this with as little as 3 functions DAQmx (I'd probably use 4) and a single loop.

    Bob Schor

  • How to write multiple entries with KHz sampling frequency in a file outside the loop?

    Hello

    I am able several entries of string tension using the wizard DAQ (1 sample on request) and it is placed inside a timed loop of frequency 1 KHz.

    This timed loop is placed inside an another while loop.

    Problem is with writing data to a file, although I can see 100 samples of 100 ms in the graphics cable to the out of the way, but the extent of writing to output file stores either only from 19 to 20 samples per second (when he wrote inside the timed loop) or does not store any (if placed outside the timed inner loop).

    I tried to set up producer consumer structure but in the loop of the consumer, I can't write the data in queue to a file saying data type mismatch. I placed the loop starting queue item and consumer out both loops and the element of queue inside the timed loop exit DAQ fed to the queue item.

    Can you please help me solve this problem file writing?

    I haven't looked so writing code from the top of the head, but access to the files is slow, and if you open and close the file, it is quite slow. What do you usually do it write to the file at a slower pace, for example once per second and write all the 1 k samples at a time. Try and also keep Ref file open during the test.

    /Y

  • samples per channel and the number of samples per channel

    in my DAQ mode samples finished program, there are two screws: timing and read.vi DAQmx DAQmx.

    I have to set the parameter to "samples per channel" DAQmx timing.vi and 'number of samples per channel' on DAQmx read.vi... Is there a relationship between these two?

    My laser runs at 1 K Hz. I want to go to the wavelength, wait for a number of shooting lasers, read the data and move on to the next page...

    Thank you

    Lei

    In your case, the VI will acquire the lesser of either:

    The "samples per channel" that you have defined on the timing DAQmx VI

    -OR-

    The number of iterations of your for loop (N) times the 'number of samples per channel"that you have defined on the DAQmx read VI

    The "samples per Channel" VI DAQmx of timing for a finite acquisition dictates how many samples the DAQ hardware should acquire in it's onboard buffer before indicating that the acquisition is complete.  "The number of samples per Channel" on the read DAQmx VI dictates how many samples the DAQmx driver must return buffer on board the aircraft to your application.

    Let's say the "samples per channel" on the calendar DAQmx VI is set to 50.  Thus, the card will acquire 50 samples and place them in the edge of the buffer, then stops.  Suppose we have the 'number of samples per Channel"on the DAQmx reading VI the value 3 and what we call the VI in a loop For which runs 10 times.  Thus, every time the DAQmx lu VI is called, it will wait until there are at least 3 samples in the buffer, and then return these three.  We call the VI a total of 10 times, then we will answer 30 total samples.  Thus, the last 20 samples acquired the card remains in the buffer and are destroyed when the task is disabled.

    Now let's say that we increase the "number of samples per Channel" on our DAQmx Read VI at 10.  VI Read will wait until 10 or more samples are in the buffer, and then return these 10. Thus, we will be back all 50 samples map acquired by the 5th iteration of the loop For.  The 6th time we call him VI DAQmx Read it expires, because there will never be another 10 samples in the buffer, and the VI returns a warning.

    This clarifies things?

    The purpose of this behavior is to allow you to both set the total number of samples that the DAQ hardware will acquire and also control how much of these samples is returned whenever you call the DAQmx Read VI.

    Kind regards

  • That means 'samples to read' really means

    Hi all

    I use a capture of data PCI-6259 now card to read data from multiple channels. However, I don't really understand the "sample to read" node in "DAQmx read.vi.

    In my opinion, if I use the DAQ to sample multiple channels, this "sample to read" would be the number of samples per channel.  But I don't know if sampling is at the same time or not? If not, how do simultaneous samples for different channels? According to the user mannual, data acquisition must support a simultaneous sample of channels of the difference, or I was wrong?

    Kind regards

    Rui

    There are three parameters that control the time of an acquisition in DAQmx:

    Sampling frequency

    This control hurries samples are taken.  This is specified with respect to the samples per second.

    Samples per channel

    For a finite acquisition, it is the total number of samples that will purchase your program.  For a continuous acquisition, it is just used to help determine the size of the buffer.

    To read samples

    It is a setting on the DAQmx Read VI.  This allows to determine how many samples per channel is returned whenever VI Read is called.  The value '-1' returns all samples that are available.  If the specified number of samples are not available with the VI Read is called, reading VI hangs until the samples are available, or until the time which is connected to the terminal "timeout" runs.

    Thus, for example, if we have an application with the following parameters:

    Samples rate = 1000 s/s

    Samples per channel = 5000

    Samples to read = 100

    Then the application will gather 5000 total samples at a rate of 1000 samples per second.  The total acquisition will therefore 5 seconds.

    We will need to call playback VI 50 times, because whenever we call the VI, it is up to 100 samples available.

    Inter channel time-out is controlled by the property of the clock to convert frequency I.  The smallest value, for it can be programmed is the sampling rate overall maximum reverse for your motherboard.  The default rate is 10 to allow for extra time, unless your sampling frequency is greater than 100 kech. / s, in which case, we use the smallest possible value.

    So, for example, my PCI-6289 has a sampling rate overall maximum of 500 kech. / s (as indicated by the specifications).  My inter channel a minimum period is so opposite of 500 kHz, or 2 uS.

    You can set the clock frequency to convert HAVE using the DAQmx Timing property node:

    I hope that clarifies things!

  • 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

  • Collection of samples for 1 d digital Wfm N Chan NSamp

    Hello

    I'm stuck in obtaining multiple samples.

    The system configuration:

    NOR SMU-1062 q

    NEITHER SMU-6341

    SCB-68 M series

    I use Digital 1 d Wfm N Chan NSample for data output. I used the digital waveform data table.

    I checked each lines with DMM, and I could only check the last sample. (dt = 4S or more).

    Data table:

    Example 0: 010 1010

    Example 1: 001 0100

    Example 2: 100 1010

    Results: line 0 (PIN 52) (1), line 1 (0), line 2 (0), Line3 (1), Line4 (0), Line5 (1), Line6 (0) - (another Question: it looks like reverse the order for me...)

    You have any suggestions to check all the samples?

    Allow me to attach my file vi.

    Thank you

    Insuk

    Hello

    I found the solution.

    I have not configured the "DAQ - mx sample clock.

    Happy Thanksgiving day!

    Thank you

    Insuk

  • Alternating - Signal Express sampling frequency

    Hi, Im trying to get data using Signal Express + NOR USB-6211, I put the sample rate to 44100 Hz. and everything seems to be ok, but when I checked the data I realized this time column does not increase in a period time constant (ie. sample FREQ not fixed).

    For example:

    1 / (Time (1) - Time (2)) = 43478,26 Hz.

    1 / (Time (2) - Time (3)) = 45454,54 Hz.

    and it constantly alternates between the two frequencies. I have to perform an FFT and Im not sure what is the actual frequency and which continues.

    I appreciate any help on this issue.

    Kind regards.

    This seems to be a bug that NEITHER should be aware of if they are not already.

    If you set the frequency of sampling to 44100, the actual sampling frequency will be (20 MHz / 453) or ~44.150 kHz.  The USB-6211 case has a basis of TIME 20 MHz (±50 ppm) and this clock is divided by an integer to derive the sample clock.  The sampling frequency is always be forced to match to the top if you choose a rate that can only be achieved with a wide divider.  Regardless of what the file shows, map DAQ itself samples at a uniform rate (unless you use an external clock, or something like that...).

    As for the behavior in the column duration... I know exactly how you look at it but I get the same behavior is written my data using 'absolute time' for the time column to an ASCII file (or by using a file LVM, which always uses the absolute time).  With the help of 'on time' however gives me a correct result.  I can't speculate on the cause... it seems likely to me that there is a comma floating rounding error (absolute time is in terms of seconds since 1904, so the software works with a large number at the same time requiring great precision).

    Best regards

  • Is it possible to collect data from two separate modules of cDAQ NOR while game mode "continuous sampling?

    I am using a cDAQ with NI 9237 module and one NEITHER 9205 and LabVIEW 8.6.1. The two arecoded of modules using the DAQ Assistant in LabVIEW.

    I would like to simultaneously read data guarantee of deformation (NI 9237) and data LVDT (NOR 9205) in order to operate a piece of equipment from laboratory to different load profiles. However, when I try to run the VI with two Assistants DAQ continuous sampling value, I get an error saying that the 'resources are not available."

    To work around this problem, I tried to have both alternate between taking a series of samples. This method is insufficient, as it produces choppy data that controls a machine cannot be invoked.

    Sorry if the words I have used are not good. I'm kinda new to labVIEW.

    Thank you

    I assume you are using cDAQ-9172 chassis.

    This was just an analog input synchronization engine, which means that only HAVE task can run at a time.

  • How to put in place of the daq hardware several lists on a shield with ecu mc toolkit?

    Anyone has the pleasure to set up multiple lists on an ECU data acquisition?

    I use MC Addon for Labview ECU 2011.  I can successfully a single list of acquisition of configuration data and read the data correctly.  This method uses the DAQ list mode to initialize instead of polling, it really cuts down ensuring CAN.

    I do not have my VI on this PC, but it's basically ECU Connect > initialize ECU DAQ list (sample rate and channel list sets) > ECU transmit DAQ list to ECU > DAQ Start list > LOOP {ECU read}

    I need to create a second list for the acquisition of data to sample at a different pace.  Any ideas?

    Thank you

    Ben

    I continued to play with the read command and finally successful initialization to do work.

    Sorry for the rough state of the son, but I just got to run :-)

  • Scaling DAQ Assistant

    I'm looking for help with the DAQ assistant,

    I have a signal 0-20 my. I want my card 8 to 100 and 16 my to-100. I entered y =-x + 300 25. I put I. Max = 300 (x = 0 my) and AI. Min = - 200 (x = 20 my). I get the following error:

    Error-200077 occurred to the DAQ Assistant
    Possible reasons:
    Requested value is not supported for this property value. The value of the property may be invalid because it is in conflict with another property.
    Property: AI. Min
    Asked to value: - 200.0
    Valid values begin with: 299.500000
    End with valid values: 300.500000

    When I get 300, I get the following error:

    Error-200082 occurred to the DAQ Assistant
    Possible reasons:
    Minimum is greater than or equal to the maximum. Make sure that the maximum value is greater than the minimum value. If you are using a custom scale, check that the maximum on the scale is greater than the minimum scale.
    Property: AI. Min
    Value: 300.0
    Property: AI. Max
    Value: 300.0

    What I am doing wrong?

    Thank you, but I just found this one. I use the range mapped instead of the linear range. Not sure why it makes a difference, but it works!

  • Error-200279 was held at lu DAQms (analog 1 Wfm NChan Nsamp d) .vi2

    Hello

    IM taking technical temperature (thermocouples of type J) with the SCB-68 using PCI-6229. When I run for a relatively long time I get this error.

    It is said

    "Error-200279 took place to read DAQms (analog 1 Wfm NChan Nsamp d) .vi2"

    Possible reasons:

    Measurements: Tried to read samples that are no longer available. The example of requestred was already available, but has since been replaced.

    Increases the size of delete, reading data more frequently or specifying a sets of samples read instead of all samples available moght correct the problem.

    Thank you

    First of all, you should always label on the block diagram control terminals so we know what the purpose of each terminal.

    The problem is the misuse of the Express VI.  They are perfect for something to get up and running quickly, but they have such high overhead and cannot be modified for more advanced features, there are problems quickly.

    Writing on file inside the loop of data acquisition could be a problem.  If you have a slow down in writing file, it will slow down the whole loop.  It's a good idea to use producer/consumer architecture to pass data to the other lines for writing file.

    I think your main problem is the express VI build Table.  Why you see thousands and thousands of datapooints in a table.  Because the table developing the table of handling inside that Express VI will quickly slow as LabVIEW as for finding still more large blocks of free memory to contain the growing table moving constantly in memory.  The global loop slows down as well, and until you know your buffer DAQ as overwhelmed because you couldn't keep with reading the data.

    Get rid to build Express VI Table and table and try it without the people.  Your problem will probably go away.

  • data acquisition won't taste at the specified rate

    Material: C - DAQ 9178, AI 9239, inside a servo and an encoder potentiometer module

    Setup: I use the 9239 to measure the angular position of my servo and encoder of trees by streaming came pressure pot of the servo and my encoder. I put the sampling frequency on the DAQmx - Schedule VI to 100 Hz.

    Problem: I don't think that my DAQ is sampling data at 100 Hz because my VI registers more than 10 000 data points for a 10 second test. In addition, every time I have save my data in a text file, the vector of time my test data resets after a number of iterations.

    To debug, I tried the following configuration:

    I've defined the sampling frequency of 100 Hz (or is that s/s?), the samples per channel (size of buffer for continuous mode) at 2000 samples, number of samples per channel up to 10 and loop milliseconds timer on my VI at 10 m accordingly, data acquisition would send 100 samples per second (or 1 sample every 10 ms) on my PC buffer (which could store 20 X that amount). Then LabVIEW would read up to 10 samples per loop iteration (which is itself ~ 100 Hz) and work with these 10 samples inside the loop. However, since the loop is operating close to the sampling frequency of data acquisition, then LV should only work with 1 sample each iteration of the loop (100 Hz / 100 Hz)-not the 10-sample-max that I specified.

    However, I stumbled on "error-200279: the application is not able to cope with the acquisition of material" when I ran the program. Why?

    My code and materials should be easily able to cope with data acquisition - at least the way I put it in place

    This whole situation wondered my fundamental understanding of data acquisition timing, so I would really appreciate an explanation of exactly how to deliver DAQmx uses data synchronization, why my DAQ sample at 100 Hz, and how can I fix the calendar specified by the user.

    Thank you!

    aeroAggie wrote:

    The C - DAQ 9178 there some minimum sampling rate I will not meet?

    It's actually the 9239 that limit your sampling rate.  Read the data sheeton page 5 there's available data rates.  In short, your data rate allowed is 50kS/s / n, where is goes from 1 to 31.  50 k/31 gives you 1.6kS / s.  So, it's the minimum sampling frequency that can be used.

  • Question about the Acquisition continues through NOR-DAQmx

    I'm a bit new to NIDAQmx methodology and I was wondering if someone could could give me some advice on accelerating certain measures of tension that I do with a case of DAQ NI USB-6363.

    I have a python script that controls and takes measurements with a few pieces of equipment of laboratory by GPIB and also takes measurements in the area of DAQ OR DAQmx via (I use a library wrapper called pylibdaqmx that interfaces with the libraries C native).  As I do with the data acquisition unit is 32 k samples at 2 MHz with a differential pair to AI0.  An example of code that performs this operation is:

    from nidaqmx import AnalogInputTask
    
    # set up task & input channeltask = AnalogInputTask()
    task.create_voltage_channel(phys_channel='Dev1/ai0', terminal='diff',       min_val=0., max_val=5.)
    task.configure_timing_sample_clock(rate=2e6, sample_mode='finite',
          samples_per_channel=32000)
    
    for i in range(number_of_loops):  < ... set up/adjust instruments ... >  task.start()  # returns an array of 32k float64 samples  # (same as DAQmxReadAnalogF64 in the C API)  data = task.read(32000)  task.stop()  < ... process data ... >
    
    # clear task, release resourcestask.clear()del task< ... etc ... >
    

    The code works fine and I can all the 32 k spot samples, but if I want to repeat this step several times in a loop, I start and stop the job every time, which takes some time and is really slow down my overall measure.

    I thought that maybe there is a way to speed up by configuring the task for continuous sample mode and just read from the channel when I want the data, but when I configure the sample for the continuous mode clock and you issue the command of reading, NOR-DAQmx gives me an error saying that the samples are no longer available , and I need to slow the rate of acquisition or increase the size of the buffer.  (I'm guessing the API wants to shoot the first 32 k samples in the buffer zone, but they have already been replaced at the time wherever I can playback control).

    What I wonder is: How can I configure the task to make the box DAQ acquire samples continuously, but give me only the last 32 samples buffer on demand k?  Looks like I'm missing something basic here, maybe some kind of trigger that I need to put in place before reading?  It doesn't seem like it should be hard to do, but as I said, I'm kinda a newbie to this.

    I understand the implementation of python that I use is not something that is supported by NEITHER, but if someone could give me some examples of how to perform a measure like this in LabView or C (or any other ideas you have to accelerate such action), I can test in these environments and to implement on my own with python.

    Thanks in advance!

    Toki

    This is something I do a bit, but I can only describe how I would do it in LabVIEW - I'm no help on the details of the C function prototypes or the python wrapper.

    In LabVIEW, there are accessed via the 'DAQmx Read property node' properties that help to implement.  One is the Mode "crush" which I'm sure must be set before performing the operation.  The other pair is known as "RelativeTo" and "Offset" and they allow you to specify what part of the CQI data buffer to read data from.   If you the config to "RelativeTo" = 'most recent sample' and 'Offset' =-32000, then whenever you read 32000 samples, they are the very latest 32000 which are already available in the buffer of data acq.  Between the readings, the task is free to overwrite the old data indefinitely.

    Note that you will need to do this continuous sampling mode and that you can explicitly set a buffer size smaller than the default which will choose DAQmx based on your fast sampling rate.

    An excerpt from LV 2010:

    -Kevin P

  • problems with the differential measure at labview2010

    Hello!

    IM using a 6063e card to measure and labview 2010, but I had a problem that I can not understand.

    AI0 is differentiall (w. AI8) and AI2 is also differential (and short circuit just for test purpose). I posted a bad image of my connections. I think this is the simplest possible differential configuration. A source of energy that can be set between 0 - 8v is connected to AI0. (yellow and Red wire coming out of the image)

    With example signals "Acq Cont & chart voltage-Int Clk.vi" I can measure and read plot map DAQ. Sampling channel AI0 works as expected, the voltage can be adjusted between 0 - 8v. Sampling AI2 also works as expected, nothing happens when I change the voltage on AI0. BUT if I sample both AI0 and AI2 and plot the AI2 signals gets on 2v when 8v are threaded AI0. Is no mather what example or my own code, the example above is just a suggestion to illustrate the problem. I tried the card on a different computer running labview 7.1, and all 3 cases works. I also tested to replace the map with a 6062e and it shows the same problems. Can someone please test this on their installation of labview 2010, I want to know if my installation is weird or labview 2010 is broken somehow. Could be a driver problem with series 60xx cards?

    I solved my problem by sampling AI0 AI1, AI2 and simply ignore AI1. Weird but this market so I suspect some sort of driver bug.

Maybe you are looking for