Continuous data acquisition programming

I wrote a program that I use to get the measurements continuously to a load with the DAQ assistant (attached) cell. I want to measure load values every 0.5 seconds and record each value using Scripture in the action file. I'm having some problems with getting the output file, I need. The parameters of the DAQ assistant are:

-Continuous measurement

-2 Hz sampling frequency

samples - 1800

- and a waiting period of 900 seconds

I want to be able to hit stop them at any time and at the end of the program. However, what is happening is that the program continues to operate until the 900 seconds is over. Is it because I made it clear to get samples of 1800? If I leave it blank, it defines a number itself. I read somewhere that the definition of the value-1 allows an infinite number of samples, but that returned an error.

Another question, I'll have, it's that if I allow the program to run after the timeout I put, it inserts a header after every sequence of timeout. I can't understand what is with wrong with my code, thanks for any help.

Basic arithmetic. 1800 samples/2Samples/s = 900 seconds.

Why accumulate so many samples at once? Reduce the number of samples at 2 and just wait 1 second for the Stop button to be recognized.

If you don't want a header for each segment, then uncheck that in writing to the configuration of the action file.

Tags: NI Software

Similar Questions

  • Excerpts from continuous data acquisition

    Hello

    I want to make an acquisition of continuous data with a NEITHER-6133 @ 1ms per channel. The data must be stored on hard disk. At the same time, I want to take excerpts from acquisition to calculate different values. The acquisition of the extract must be triggert by an external digital trigger.  Are there examples, which combine continuous data collection and collection excerpts?

    Thank you very much.

    Best regards

    Michael

    System

    Windows 7

    LabVIEW 2012

    NOR-6133

    Thanks to the support of NOR-Germany, I found a solution for me:

    1.) continuous trigger switch

    Connect 2) the trigger for the signal to a digital i/o

    3.) synchronize AI and DIO

    Excerpt 4.) the samples needed by the search within the digital waveform pattern

    Result:

    The example shows 4 IA channels Cup (tested on Win7, NI PCI-6115, 4 channels each 5. MECH / s) and calculation on extracts from each channel signal triggered parts.

  • I32 flipping index iteration continuous data acquisition

    I'm doing some continuous data streaming with Labview FPGA and periodically generate a trigger signal

    the timestamp after a number fixed iterations.

    The strategy I would try was to review the iteration index in the timed loop and whenever he tipped a fixed number I would generate a trigger of the FPGA.

    I tried to find out what happens when you get to 0x7FFFFFFF samples on the register of I32 and apparently

    the index does not roll... It just remains to count max once reached it.

    Is there a way to derail the index on a timed loop? Otherwise I wil just add another

    U32 variable and increment it each cycle and let it roll on.

    the iteration count does not roll.  Therefore at this historic moment, but just use a registry node, local or feedback shift instead.

  • Continuous data acquisition and real-time analysis

    Hi all

    It is a VI for the continuous acquisition of an ECG signal. As far as I understand that the analog read DAQmx VI must be placed inside a while loop so it can acquire the data permanently, I need perform filtering and analysis of the wave in real time. How I implemented the block schema means that data stays int the while loop, and AFAIK the data will be transferred on through the tunnels of data once the loop ends the execution, it clearly isn't real-time data processing.

    The only way I can think to fixing this problem is by placing another loop that covers the screw scene filtering and using some sort of registeing shift to transmit the data in the second while loop. My question is whether or not it would introduce some sort of delay, and weather or not it would be supposed to be the treatment in real time. Wouldn't be better to place all the screws (aquicition and filtering) inside a while loop? or it is a bad programming practice. Other features I need to do is back up the data I na file, but only when the user wants to do.

    Any advice would be appreciated.

    You have two options:

    • A. as you said, you can place the code inside your current while loop to perform the treatment.  If you're smart, you won't need to put one another while loop inside your existing (nested loops).  But it totally depends on the type of treatment that you do.

    • B. create a second parallel loop to perform the treatment.  This would be separate processes to ensure that the treatment is not obstacle to your purchase.  For more information, see here .

    Your choice really depends on the transformation that you plan to perform.  If it's much the processor, this could introduce delays as you said.

    I would recommend that you start at any place in the first loop and see if your DAQ buffer overruns (you can monitor the rear of the buffer during operation).  If so, you should decouple the process in separate loops.

    In what concerns or not ' it would be considered as real time processing ' is a trick question.  Most of the people on these forums say that your system is NEVER in real time because you're using a desktop PC to perform processing (note: I guess it's the code that runs on a laptop or desktop?).  It is not a deterministic systemand your data is already "old" by the time wherever he leaves your DAQ buffer.  But the answer to your question really depends on how you define "real time processing".  Many lay it will set as the treatment of 'live' data... but what is "actual data"?

  • Data acquisition program

    I am trying to write a program that runs in the loop and 11 different channels on a device NI USB DAQ 6343 of samples continuously. The first 10 channels are simple measures of DC, the remaining string is a voltage AC signal, I need to save the frequency. All these data, I will write in a .csv file at the end. I have attached my code and I work with DAQ.mx drivers.

    The question I have is, how I measure and AC of the signal with the DAQ USB? I tried to configure the analog input channel # 19 of "frequency", voltage and then do a "reading", despite, he tells me that the channel does not support this type of measure. This AC signal goes through a BNC cable, then two adapters of banana.

    My code, written in LabVIEW 2013 is attached.   Here is a screenshot.

    You simply include this channel in the list of channels of voltage there you already have. This is part of the same task. Change to n samples and specify a rate and the number of samples to be read. Given that your dc channels would be to multiple readings now, you could do something like taking the average of the people.

  • Problem building from scratch data acquisition program

    Hi all

    I know that this may be a question trivial moment, but I can't find previous messages explaining my problem... I want to go round in circles

    I am trying to build a system with an analog input and digital output (I use the cDAQ 9172 with NI 9215 ADC and NI 9403 DIO) and I try not not to use the DAQ Assistant.

    But when I run the VI the list updated very slowly even with a delay loop of 1 ms and a sampling rate of 1000 and 100 samples read.

    I tried to insert a chart, but which shows nothing at all

    And based on my sampling rate (FS higher, faster the error pops up) I get an error saying that the samples I'm reading is not available more.

    I understand that something is taking too much time in my loop, but I don't see what it should be.

    Is it possible to configure this daqmx to taste at the request?

    The analogue output to / digital is part of a motor controller I am trying to build, where the analog input is feedback from motor position of a potentiometer and the

    Digital pulses are a PWM signal to a hardware engine controller.

    The program runs on a Lenovo T410 with 2, 66 GHz I7 cpu, 4 GB memory, Windows 7 and LabVIEW 2009 SP1

    Sorry if this is a double post!

    Kind regards

    Tommy

    Hi Tommy,.

    In fact, I think that one of the biggest problems is that you restart your digital task inside the loop every time.  Attached is the revised for you to try code, the loop now looks like the following:

    Notice the DAQmx beginning is now called before entering the loop for the digital task.  Rather than use a wait function, you can use the samples of reading parameter so that the ratio of samples to read / sampling frequency is equal to the length of the loop you want (DAQmx Read blocks until the appropriate number of samples have been received).  I also put the two tasks at the same time, so you can now write digital data while the DAQmx Read waits for the desired number of samples.

    Devices of simulations are often useful, but trying to compare the performance it is always better to have the actual hardware.  USB has particularly high latency 1 time of loop ms unfortunately probably not going to be achievable, but accurate performance will be dependent on the system.  Try to run this code and see what results you can get - if you always replace the samples then you will need to increase the number of samples read by loop (and therefore decrease the rate of loop).

    I hope this helps, don't forget to let us know if you have any questions.

    Best regards

  • Moving average filter w / continuous data acquisition

    I'm looking to filter multiple signals of noisey. I am currently using a NI9203 w / a cDAQ-9174 sampling to 1000 Hz. I use DAQmx vi to start the task and acquire the signal. I tried using coefficients.vi smoothing filter combined with IIF filter.vi (Avg.png movement) it seems to work for simulated signals and recorded data. However, when I try to use this configuration for an average of real time it cut everything just all signals to zero.  I looked into the use of shift registers, but to get the necessary result, it seems that I have to use hundreds of items.

    In the end, I'm trying to filter the signal to get a constant more of reading for the user. For example during operation, the user needs to review the current state of the values in real time. It's currently difficult when the noise indicates the values of +/-100 changing every 100ms.

    For any help or suggestion would be appreciated, thanks in advance.

    Thank you all for the help and advice. I have attached the vi that I used to solve the problem, one of my major problems was not timing DAQmx using. Attaché in 2012 and 2013.

  • 2-channel continuous data acquisition

    Hello

    I wonder how I could acquire signals of 2 channels at all times. I tried to find an example of vi but could not find one. In the vi below, I copied the same functions that work for a single channel, but it does not work.

    Best regards

    Ninjatovitch

    It should be Dev1 / ai0:1 as described above where ai0 is channel 0 and ai1 is channel one. They are separated by a ':' that specifies the range. Take a look at the following:

    What is the syntax for strings of physical channel in DAQmx?

  • digital triggering of stop/start of analog data acquisition

    I want to use a signal from a digital line to start and stop analog data acquisition. The signal can change levels several times during a race of the VI so I have to start and stop several times data acquisition and store each session data in a different file.

    I tried to play with the following screw: digital triggering of break, DigitalStartandStopTrigger and ContAcq_DigTrig. None of them doesn't seem to work for my configuration. I also do continuous data acquisition so I can't use a reference. I use PCI 6259 DAQ.

    I used the "P0" pins rather than PFI pin on the grid BNC-2090. I know... stupid enough.

  • Treatment of LabVIEW data and high speed data acquisition C

    Hi all

    I am designing a data acquition VI high speed of 3 cards acquition of data at the maximum speed. Data cards are PCI 2517 Measurement Computing. The sampling frequency for each card is 1 M samples/second, if the total sample of M 3/second of three cards. Problem is the LabVIEW drivers and the screws provided by the provider works very well just for a single card at maximum speed, but does not support multiple cards at maximum speed. Their technical engineer advised me to write code in c#, C++ or VB.NET for this data acquition high speed. If I use C forever, I would like to use LabVIEW for processing of the acquired data to data acquisition. I came across a few examples that suggest the creation of dll C code and then calling it a LabVIEW. But those who have programs simple and none of them speak in C data acquisition. My questions are,

    1. is it possible to call a C data acquisition program high speed of labview and not work in any kind of present of buffer overflow?

    2 would it not simple best to use labwindows CVI?

    3. is there another alternative solution that I'm missing?

    I'll appreciate all the entries.

    Thank you!

    Nilesh-

    It's pretty easy.  Arguments for CINrun must match wiring.  You can wire your CIN function block and say LabView to generate the C interface code to begin.

    Here's my pairs for the ASIO audio project.

    All the best,

    Terry

  • Is "Introduction to data acquisition" by R. King a good reference for learning programming of data acquisition?

    Is "Introduction to data acquisition" by R. King a good reference for learning programming of data acquisition? Or can anyone recommend a better text.

    Why don't you start hera.

  • Real-time display at the high frequency of data acquisition with continuous recording

    Hi all

    I encountered a problem and you need help.

    I collect tensions and corresponding currents via a card PCI-6221. While acquiriing data, I would like to see the values on a XY graph, so that I can also check current vs only voltage/current / time. In addition, data should be recorded on the acquisition.

    First, I create hannels to analog input with the Virutal DAQmx channel create, then I set the sampling frequency and the mode and begin the tasks. The DAQmx.Read is placed in a while loop. Because of the high noise to signal, I want to average for example every 200 points of the current and acquired for this draw versus the average acquisition time or average voltage. The recording of the data should also appear in the while loop.

    The first thing, I thought, was to run in continuous Mode data acquisition and utilization for example 10 k s/s sampling frequency. The DAQmx.Read is set to 1 D Wfm N Chan N Samp (there are 4 channels in total) and the number of samples per channel for example is 1000 to avoid the errors/subscribe for more of the buffer. Each of these packages of 1000 samples should be separatet (I use Index Array at the moment). After gaining separate waveforms out of table 1 d of waveforms, I extracted the value of Y to get items of waveform. The error that results must then be treated to get average values.

    But how to get these averages without delaying my code?

    My idea/concern is this: I've read 1000 samples after about 0.1 s. These then are divded into single waveforms, time information are subtracted, a sort of loop to sprawl is used (I don't know how this exactly), the data are transferred to a XY Chart and saved to a .dat file. After all that's happened (I hope I understood correctly the flow of data within a while loop), the code in the while loop again then 1000 samples read and are processed.

    But if the treatment was too long the DAQmx.Read runs too late and cycle to cycle, reading buffer behind the generation of data on the card PCI-6221.

    This concern is reasonable? And how can I get around this? Does anyone know a way to average and save the data?

    I mean, the first thing that I would consider increasing the number of samples per channel, but this also increases the duration of the data processing.

    The other question is on the calendar. If I understand correctly, the timestamp is generated once when the task starts (with the DAQmxStartTask) and the time difference betweeen the datapoints is then computed by 1 divded by the sampling frequency. However, if the treatment takes considerable time, how can I make sure, that this error does not accumulate?

    I'm sorry for the long plain text!

    You can find my attached example-vi(only to show roughly what I was thinking, I know there are two averaging-functions and the rate are not correctly set now).

    Best wishes and thank you in advance,

    MR. KSE

    PS: I should add: imagine the acquisition of data running on a really old and slow PC, for example a Pentium III.

    PPS: I do not know why, but I can't reach my vi...


  • The data execution program continues to stop working Internet Explorer

    Data execution program continues to stop working Internet Explorer

    Hello

    EricLaw IEInternals - a peek at Internet Explorer from inside. -Understanding DEP/NX
    http://blogs.msdn.com/ieinternals/archive/2009/10/10/understanding-data-execution-prevention-crashes-in-IE8.aspx

    The problem might actually be an add-on or another program to the origin of the problem and you should check that
    1st.

    What antivirus/antispyware/security products do you have on the machine? Be one you have NEVER on it
    machines, including those that you have uninstalled (they leave leftovers behind which can cause strange problems).

    Start - all programs - Accessores - system tools - IE with no Addons - does this work better?

    IE - Tools - Internet Options - Advanced - tab click on restore, and then click Reset - apply / OK

    IE - Tools - Internet Options - Security - reset all Zones by default level - apply / OK

    not better?

    Close IE and try again IE or IE with no Addons

    IE - tools - manage Addons (for sure disable SSV2 if it is there, it is no longer necessary but Java always install
    "(and it causes problems - you never update Java to go back in and turn it off again)." Search for other possible problems.

    Windows Defender - tools - software explore - look for problems with programs that do not look right. Permit
    are usually OK and "unauthorized" are not always bad. If in doubt about a program to ask about it here.

    Could be that a BHO - BHOremover - free - standalone program, needs no installation, download and run - not all
    are bad, but some can cause your question. (Toolbars are BHO)
    http://securityxploded.com/bhoremover.php

    Startup programs
    http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.html

    Also get Malwarebytes - free - use as scanner only. If you ever suspect malware, and it would be
    unusual with Prevx market except for an occasional cookie of low level (not a big deal), update it, then
    run as a scanner.

    http://www.Malwarebytes.org/

    I would add prevx so.

    Prevx - Home - small, fast, exceptional CLOUD free protection, working with other security programs. It comes
    a scan only, VERY EFFICIENT, if it finds something to come back here or use Google to see how to remove.
    http://www.prevx.com/

    PCmag - Prevx - Editor's choice
    http://www.PCMag.com/Article2/0, 2817,2346862,00.asp

    -------------------------------------------------------------------

    Do yourself a big favor and work through 1 above.

    How control DEP but I don't recommend turning it off and certainly not to let power off.

    How to enable DEP on or off for a program under Vista
    http://www.Vistax64.com/tutorials/65790-DEP-turn-off-programs.html

    How to enable or disable DEP in Vista
    http://www.Vistax64.com/tutorials/120778-DEP-enable-disable.html

    ====================================

    If nothing else works you can try this however I would use as a last resort.

    IE - Tools - Internet Options - Advanced Options - Security Section - clear the check box enable memory Protection to mitigate
    Online - APPLY - OK attacks close and restart IE

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

  • How to program dynamically data acquisition?

    The question may seem, I want to dynamically change the settings of a data acquisition card (DAQmx). The idea is to have a loop event caputures GUI and the other while answering the while loop DAQ events. It's something like loops PRODUCER-CONSUMER. However, I can do all thing once, but not on the fly. Any suggestions as to how we can achieve this?

    Thank you

    Thanks for the comments. I solved the problem with the traditional approach. Here is the graphic interface to work.

  • 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.

Maybe you are looking for

  • How to remove the external "Password" HDD USB partition?

    I recently bought a 2.5 hdd usb2 "Toshiba but when I connect it to my mac it goes up 2 partitions: drive normal HARD and a CD titled"Password. " How can I remove it? I really don't want to use the password feature and the 2 icons are annoying me a lo

  • iPhoto 9.4 crash how to fix?

    MacBook air OS x 10.8.6 iPhoto 9.6.4 iPhoto keeps crashing when I try to open it, it says repairing when this is done, he's trying to to open and then crashes again. How - what is corrected thanks Pippip

  • Margaret seats

    Please respond via my email address * address email is removed from the privacy * I received this MESSAGE, and it's on, I NEED YOUR HELP. MESSAGE READS: WINDOWS HAS DETECTED AN IP ADDRESS CONFLICT Another computer on the network has the same IP addre

  • I think I deleted malware, but my computer does not start under programs.

    I got the malware virus that appeared as 'Vista Guardian 2010' on my computer.  I have run two scans I found on the Microsoft Web site, and it seems to have stopped activity malware.  Before you run the scans, I was not able to launch Firefox or Malw

  • Could not start service Windows Security Center - I also have an error 1075

    I tried running Security Center, got the cannot be started message.  A ran 'services' in the start search bar, right click and tried to open the Security Center and received the error message 1075.