Acquisition continues DAQmx

Hello

I am having trouble with the NI 9236 module data acquisition in the cDAQ Chassis 9188. The problems are:

-Noise filtering

-Recording of data

I want to acquire 4 channels with a sampling frequency of 20 to 25 Hz. However, since I have noise problems, I gain with a frequency of 1000 Hz and then the average of the last 50 values. I also change the strain in microstrains.

This program also saves the zero value and uses them to subtract all the additional readings. The entire program runs in a while loop with a wait of 20 ms.

When I simulate the module everythings works fine and I get a nice sine wave of four entries. However, when you work with real hardware I get something like this:

20:59:59.00 NaN NaN NaN NaN
2302 1727 2326 1734 16:18:06.13
2304 1728 2329 1735 16:18:06.32
20:59:59.00 NaN NaN NaN NaN
... x 10

where the two readings are followed by 10 "NaN". This could be a problem of buffer?

I appreciate your help.

PS. Sorry for the unnecessary formatting code.

Software of NEITHER: LabVIEW 2010

Materials: cDAQ 9188, NI 9236
Driver version: last
OS: Windows XP

Hi gmonjo,

In fact, in the code you've sent, did you not the number of samples to be read. It is possible that you are having the same problem with a different error.

Below you can see the entry where you set the number of samples.

Please, test your VI configure it in order to acquire a constant number of samples of each iteration.

Kind regards

Tags: NI Software

Similar Questions

  • 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

  • DAQmx: set up a digital acquisition continues with start and stop trigger

    Hi all

    I write because I can not find a solution to my problem.

    As written in the title, I just want to do an continuous (continuous sampling) a digital line. The fact that it's a digital line instead of an analog is no big deal, I guess. I want to start the acquisition on a rising edge of digital trigger (PFI0 for example) and stop acquisition on a trigger too (forehead down on the same signal (PFI0 even then) or a new front amount). This way I could precisely control the time of acquisition or of the start or stop other devices.

    Since this is a digital acquisition, you need to do first "something": create a fictitious analog input task and get the clock back to the digital input. I setting this analogue of the task to start on a trigger. It works but I can't find a way to stop it on another trigger.

    Do u hav no idea how to implement it?

    Finally I have not found an easy way to break cautiously the VI to wait for a trigger (in case you want to start an acquisition with different settings for example). Do you use the task to Abort or is it better to set a deadline to playback digital channel VI until the outbreak occurs?

    Any help would be appreciated!

    Thank you

    Config: LV 2010, latest version Daqmx and USB card or 6251.

    Hi Chris,

    One way is to use counters as Kevin described. For me, it's usually easier to create the dummy task that has the timing engine (as I HAVE), but it depends on what resource you have on your board you will not need .

    In fact, the example is the same thing that you need to measure continues - just what you need to do is remove the counter part and replace the trigger reference to be external (your stop trigger).

    with this approach, you should be able to do the continuous measurement - I noticed that you need DI - in fact with few changes you should be able to use this example. DI does not have its own timing engine, that's why you should use the external sample clock. If we use the example to create dummy HAVE to provide the sample clock, and we start DI task until we start to HAVE fake, then we can get pretty much continuous clock which begins start trigger and stop the trigger of reference.

    Take a look in the change - once again, I have not tested, but logic seems to be OK.

    with sincere friendships.

    s9ali

  • Acquisition continues using NOR-traditional DAQ

    Hi all

    For a new project, I have to use an old capture card, a PCI 4451 DSA. I LV 4.4.1 8.5 and MAX, so I had to install the 'Toolkit' for the traditional NI_DAQ.

    Usually I use DAQmx screws, so I'm a bit lost with this screw...

    What I want to do is continuous acquisition (see image).

    Thank you for your help and I hope that we will find a solution. Thanks for sharing your experience with me.

    Marc

    Hello

    check the attachment and try this...

  • How to set an interval of time of acquisition with DAQmx

    I use a 6123 DAQ to acquire and store a voltage signal. I'm trying to figure out how I can reduce the time interval of the data acquired, rather than save 2 ms of data I want to only save the first data 100us. Is this possible?

    Kind regards

    Lowksi

    How you configure your task?  I can assume that you are using samples for your type of acquisition.  So what you do is the VI of Timing DAQmx place your sample rate and the number of samples to be taken.  The number of samples you want will be the sampe (samples per second) rate multiplied by the interval desired (seconds).

    So let's say that you buy at 500kHz and you want data 100us.  You must set the number of samples to read 500e3 * 100e-6 = 50 samples

  • How to stop an acquisition continues in producer/consumer

    Hello

    I'm trying to use producer/consumer to control 'Start' and 'Stop' to my continuous data acquisition system. I can start the acquisition process successfully, but I can't stop it botton 'Stop '.

    I enclose my simplified VI. Can anyone help to have a look and tell me what is the problem here?

    Thank you

    Bing

    As I said before, use a notification utility and manage the expiration time.  I used a select statement with timeout? Optional Boolean.  If a time-out of events, use the previous value.  If we got a notification, use this value.

  • Acquisition continues two sensors LVDT

    I'm trying to build a program to monitor the two LVDT sensors inside a table of machining to measure vibrations. I wish I could acquire as close as possible continuous. I'm looking for small delays because the plan is to have a feedback mechanism later and this would require very fast reaction.

    I have some experience with labview but am quite new to the use of the structures of the queue. I have done wrong data in a type that I can work with. How can remove my waveform data and use it to perform calculations on the frequency and amplitude?

    And by the way, I implement the queue correctly? or does anyone have recommendations to my disposal vi and architecture?

    Thank you very much for your help.

    I'm using labview 8, but I have access on other computers to labview 9.

    -Arthur J.

    In the original VI you posted you do not do anything with the data in the queue.  You preview the queue and then nothing connect to the wire.

    1. use Dequeue.  This removes the oldest element from the queue and makes it available.  Overview examines the data without deleting the queue.

    2 do something with the data.  I looks like you can split the four-channel LVDT and places the data in the shift registers.  Do you need to initialize the shift registers or do you want that perform the data from the old stored and used in the next series?  It is usually best to initialize arrays to the maximum size that you want, and then use replace element of array located inside the loop.  This avoids the reallocation of memory.

    3. review the appropriate data structure.  You start by buying a table of waveforms.  After the filter, you have dynamic data.  You use in the loop of another tables 1 d of doubles.  If you haven't since the waveforms calendar information, try to get data from the reading of data acquisition in a table of double and stay with this type of data overall.

    4. consider to put the filter in the lower loop.  Usually a producer/consumer that architecture acquired only data in the loop producer and all analyses in the loop of the consumer.

    5. as someone pointed out before you need not the structure of the sequence.  Data flow will take care of that.  You must connect the terminal nodes Visible property error loops below to apply the desired sequence.  Use a control with a blank label is OK, but if you have two of them how do you know which is set Visible?  It is better to give each control and seeing a unique label.  If you don't want the user to see the label, check the invisible label or use a legend or both.

    Lynn

  • How can I improve the rate of acquisition with daqmx and usb-6008?

    Hello

    I am trying to acquire data of analog voltage with a USB-6008. I'm under Labview 8.5 student on an HP laptop with a 1.33 Ghz cpu and 736MB RAM, apparently. I tried using the Daq assistant and the low-level Daqmx functions. My best results come with a task set in MAX for my analog input, and using the function 'Daqmx read' the 'unique double 1 d sample' value in a while loop. I insert the values returned in a table which built in the while loop, and then when I'm done, I check the number of samples in the table. In the test VI attached, I also use the time to Get before and after all loop. The best sampling rate I made using this method, is around 40samples/second. I have attached a VI below that illustrates this concept. In my actual application, the data acquisition code runs at a time while loop with 1ms, parallel to other code that controls the device I'm collecting data of. The sampling rate is roughly the same for my test below VI and my application program.

    The 6008 datasheet gives the sampling frequency maximum 10 kHz. I'd be happy with 2 to 2.5 kHz, or as soon as possible; I'm sure that I can achieve a little more than 40 Hz. My first idea was tied to the hardware, but the 6008 cannot make acquisitions NI hardware.

    My question is: How can I implement a faster sampling of analog voltages to a USB-6008 in LAbview? If I can't do it, is there another way I can taste the data more quickly?

    Thank you

    -SK-

    To the best of my knowledge, the USB-6008 can do timed equipment acquisition. Don't forget that this is a multiplexed device, so if you add 8 channels so the maximum you can set is 10 k/8

    If you are new to LabVIEW, I suggest that you try this sample program first

    \examples\DAQmx\Analog In\Measure voltage. llb\Acq & Graph tension-Int Clk.vi

    Amit

  • Data before release for NOR-6133 trigger material and acquisition continue?

    I use the pxi of NOR-6133 can acquire data on 7 channels continuously with ai0 as the trigger without problems. The acquisition is triggered. What I have to do is collect a finite amount of data before triggering immediately until the trigger is detected.

    Is it possible to do without the help of a software solution. I watched go over acquisition and using the integrated trigger reference but that is not suitable for my needs because it just seems to change the first section of data to be 'post trigger' to 'pre trigger.

    A software solution that I already know how to do is the last resort to try to reduce the demand for processor and keep the hardware triggering.

    Thank you

    By using the "reference trigger" is the right solution.

    So can you please explain a little more in detail why it does not work in your case?

    Christian

  • Selection of the range of Gain on the acquisition continues

    I develop on the OEM version of 6211.  We use all 16 channels to HAVE it. Is there a way to change the gain of a channel range without having to stop and restart the task because this causes a discontiuity in the data?

    In the case where there is perhaps not a smart collection I can use there. I use channels 0-3 for readings of voltage and 4-15 to the current readings, with each group of 3 current readings must be synchronous with time pressure readings.  For example, 0-4 and 4-6 would be composed of a data set and 0-3 and 8-10 would be another.

    If I create a separate task for each grouping the power would be so disruptive. If I start one task that she buys 0,1,2,3, another who acquires the 4,5,6 and another who acquires the 7,8,9 is 0,1,2,3 and 7,8,9 channels still synchronous time (assuming that this task niether has not been stopped and restarted)?

    Hi Matt,

    Just a follow-up, we are limited to one task for analog input on the 6211.  All our channels HAVE will have to be in this task.  This is due to the timing engine shared used in the device and the multiplexer which runs the channels.

    Kind regards
    John Sullivan
    Technical sales engineer
    National Instruments

  • How .vi DAQmx Read (analog 2D NChan DBL NSamp) to acquire continuous data?

    I try to get the .vi DAQmx Read (analog 2D NChan DBL NSamp) to acquire data continuously.  The 'help' indicates I need to wire the number of samples per channel-1, but it doesn't seem to work for my application.  If I have the wiring to any number greater than 0, the data collection works, but is not continuous.  I enclose the code (Sept15_MainPanel_WorkingBaselines_ApplyBaselines and Calibration.vi) and a Subvi (Collect_Baselines.vi) if someone wants to take a look.

    Here's what I'm trying to do:

    I use a unit NI USB-6009 to collect analog voltages of load cells 2 (channel 0 and channel 1) and 2 displacement transducers (channel 2 and 3).  The main panel of the VI contains a listbox with 4 options - 'Check EMG channel', "Collect base lines," "Collect Data" and "end of program".  'Collect base lines' 'End of program' work and I'm working on writing code to "Collect data".

    For the option "Basic collection", 2500 samples are read from 4 channels described above and 2500 samples are averaged.  This works.

    The option "Data collection" - I would like to that data from 4 channels to acquire permanently.  Finally, for the option of data collection, data acquisition stops when channel 0 detects the force of 200 N - so I will not always have a finite number of samples read.  The time it takes to reach the value of this force will be different for each test.

    -How can I get continuous samples for my 4 channel?  Is .vi DAQmx Read (analog 2D NChan DBL NSamp) function badly and if yes, what should I use?

    Thanks in advance for any ideas or advice.

    Esther

    First, in case 1, you need not the structure of flat sequence.  The son of the error and data properly will dictate the flow of execution.  Then, in State 2, you must initialize the shift register, unless you want to keep the data is accumulated each time that you run the vi.  The reason why you don't see all the data here is because you have - 1 wired for the number of samples per input channel.  You must connect a number here, even if you are taking continuous samples.  The service needs to know how much sample to gather at one time.  If you put-1 here, the number of samples per channel must be set up in the synchronization function DAQmx (sample clock).  If you specify a number here, then you put-1 in playback function.  The DAQ hardware will read continuously, you must retrieve the data from time to time, so you must specify the number of samples.  By reading inside a loop, it will continue to read until the stop function is encountered.  I guess that the Clear function acts as a stop.  But you must always indicate playback vi how many samples to read and return on each iteration of the loop.

    The documentation is a little misleading.  He warns that a - 1 will cause a continuous reading.  But the pads are so big, he can not read continuously forever without losing data.  If you specify a finite number, playback in a loop, and he will read this number and return the data (empty the internal buffer) at each iteration of the loop.  Continuous means that you just call the start function once.  He will read at each iteration of the loop until the stop function (or clear) is called.

    Here is the difference between the setting of the Timing DAQmx function for continuous or finished reading: finite samples requires a tenure, he reads the finite number of samples, and it's done.  It requires another start to read more data.  Continues to read requires only a start.  It still reads a finite number of samples, but when this is done, you can retrieve the data by calling the read function until he could continue.  After the reading, you don't have to call for new start.  Look at it this way.  Start is what starts the collection of data, not the read function.  Just read empty buffers in your data feed.  The data acquisition continues in continuous mode, but you must call read again to get the data on the pads.  If you specify basically buffer size when you set the number of samples per channel.

  • How to abort Continuous Acquisition (which is set to acquire a constant number of samples per channel each iteration)?

    Hi all

    I would like to continuously acquire an input channel analog and, if necessary, be able to stop the acquisition as quickly as possible.

    I use a card NI USB-6289. I implemented a DAQmx (voltage) analog input task, set the clock sampling DAQmx 'continuous samples' and the rate required (IE 1000, which is 1 kHz). For the acquisition, I used a while loop with inside the DAQmx Read with Terminal 'number of samples per channel', wired (IE 1000). The while loop waits until 1000 samples are acquired and therefore continuously reads the channel in uniform batches of 1000 samples every second ticking. The while loop can be easily interrupted when the DAQmx has completed the acquisition of the lot being 1000 samples, but it takes the DAQmx finish their current task.

    My problem is how to stop the loop while the DAQmx Read lies in the middle to get 1000 samples WITHOUT delay all 1000 samples are received? Is it possible to interrupt the DAQmx Read?

    I could reduce "the number of samples per second", increasing the responsiveness of the while loop, but this is not the solution I prefer. I tried to destroy the task (outside the while loop), but that does not stop immediately the acquisition, Read DAQmx still finish acquire 1000 samples. I've included an example Subvi. When I was using a PCI card, I used a timed while loop with inside the DAQmx Read with Terminal 'number of samples per channel' wired-1 (= which means ' read everything in the buffer "). In this case, it was easy to stop the acquisition at any time: the timed, while the loop is abandoned and the acquisition has ceased immediately. But it does not work with an NI USB-6289 map (see thread http://forums.ni.com/ni/board/message?board.id=170&message.id=386509&query.id=438879#M386509) because of the different way the data are transferred to the PC.

    Thank you very much for your help!

    Have a great day,

    LucaQ

    Hi LucaQ,

    Your solutions are decrease of the number of samples, or record the time you want to stop and remove samples that have been acquired beyond this time. There is no other way to stop the actual reading out of the hardware store.

    Flash

  • How to add the phase parameter to array of waveform in the DaQmx continuous output example?

    Hi all

    I'm quite beginning to Labview. I just wanted to know how can I add stage information for the module of waveform existing as shown in the example of output Voltage-Continuous DaQmx.

    SEEE attached, I thought that the "output" is actually a built-in control, is there anyway I can add the phase as an additional parameter which?

    Thanks in advance for any help.

    Eric

    If you press ctrl + H, the context help window opens, and you can hover over the generating function VI to see its inputs/outputs, but also to navigate to the detailed help. As you can see from this screenshot, there is an exit for the phase which is separated from the output waveform.

  • Close task DAQmx freezes

    Hi all

    I've been struggling for some time with the following problem, no relevant answers to it. Maybe someone here have met it before.

    I wrote a program in 2011 Labview data acquisition, using daqmx 9.3 + acquires data from a card NI 6008. The program works very well at all works with my laptop, but crashes during like every third performance on another laptop. Both have win7, the other is 64-bit (I'm not sure that matters).

    The program itself is quite complicated, so here I PASE a image of one of the parts he tends to freeze at (there are many other acquisition tasks, where it delimits to freeze, but every time that the structure of the block diagram is basically the same, with the creation and closing of the task). It is freezing more often when there is continuous sampling frequency of 1000 Hz and simultaneous treatment (trace, fft, etc.), in a regime of producer/consumer. The interesting thing is that it does not ALWAYS freeze.

    Whenever I check if the program hangs at the TASK.vi STOP without sending an error message. I can produce the same error with the simple example, I have insert below, if I run the program several times (it takes 10-20 tracks of stick to stop task.vi)

    Please, send any suggestions on what could be the problem.
    Another tip is the MAX itself gives an error of "embedded memory overflow", several times at startup. However, I tried the solution with the property node - without success.

    Dear Buadam,

    The workaround you mentioned has been implemented in NOR-DAQmx 9.4 and should be available from this version. The default value of value certainly not 1, since that would limit USB flow considerably, especially on faster devices.

    To explain more in detail: this property ("Analog Input" General Properties"Advanced" transfer of data and memory"County transfer USB) is responsible for defining the size of a USB transfer burst. The default USB transfer size is 32 KB. For a very fast channel or high County applications increases the size of USB transfer request are likely to increase flow. In this case however, we are voluntarily reducing the size of the transfer, to be absolutely sure that the bug in Windows 7 (how the system handles applicants on USB 2.0, specifically, how the packages are split) does affect us, resulting in deadlock as you packages known. So the idea here is to small enough packages to ensure that the USB driver is unable to divide, this prevents in turn also USB performance, but since the 6008 is a relatively slow, low peripheral County channel, we always have more than enough bandwidth.

    So, to summarize:

    • Please update on DAQmx 9.4 or more if you can (LabVIEW 2011 is supported up to the most recent, version 9.8)

    • I also recommend to upgrade the USB drivers from the laptop from the website of the provider as appropriate.

    • Set the AI. UsbXferReqSize to 1 once available. If you don't find it, try right-clicking on the property node, select filter... > display all attributes

    crossrulz: you have effectively reason that a finite measure stops the task once all samples have been read, so a wait until I recommended is redundant here, as it is expected to return with fact = True. The reasons why I suggested to use are:

    1. To refresh the status of the task, "check" that he has been arrested properly.

    2. To give the device of the extra time before the command stop the task/Clear task is sent.

    3. To catch errors that are stored in the DAQmx object, but not covered by the read operation, before attempting to stop/clear.

    Hope is makes sense.

    Kind regards:

    Andrew Valko

    NIH

  • Role of the time and rate in the acquisition of buffer

    Hello

    I'm trying an acquisition in the buffer.

    In Schedule VI, when I specify the rate should be around 2000, I don't get an error message and data acquisition continues. Also I give a 1000ms time waiting until the next "millisecond" vi in the while loop.

    But if I increase the rate to about 5000 and increase the number of milliseconds to 2000, then I get the following error message.

    -.vi:1 200279 DAQmx reading (analog 1-d 1Chan DBL NSamp)
    Property: RelativeTo
    Value: Current playback position

    Property: Offset
    Corresponding value:

    The task name: MyVoltageTask

    What is the importance of timing in the while loop and indicating the rates in Schedule VI?

    Follow this

Maybe you are looking for

  • How to view all the bookmarks at the same time, not only favorite?

    The last time I used Firefox was on the old computer. When I click on Favorites at the top of the screen all bookmarks would be would in alphabetical order. That's what I want to do with the new computer.

  • Equium A100 - 331 (PSAABE) where is the BIOS battery?

    Hello Please can someone explain where I would find the BIOS for this laptop battery? Looked where I could but no luck to find the battery without disassembling the entire computer. I receive a CMOS Checksum error and want to check the battery. Unfor

  • No more TabletPC on Portege R400

    Hello Since a few days my R400 shows the functions of TabletPC: stylus does not work and when I turn the screen nothing appens, i.e. the resolution did not become vertical instead of horizontal. Again I tried to uninstall the latest Windows updates,

  • Pavilion 23-b239: downgrade to Windows 7

    Hi all, I bought my mother a 23-b239 Pavilion all in one office.She can not just get used to Windows 8. I would really know if it is possible to downgrade to Windows 7, and if someone couldkindly tell me: A profile of my hardware informationWhere can

  • "WindowsUpdate_800B0100" "WindowsUpdate_dt000" ___Windows Update error 800b0100

    See if you can download/install manually, Jes: http://www.microsoft.com/downloads/details.aspx?familyid=286A0AD9-F283-40C4-A9BE-9A6E298A4F34 ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WAR