Buffered Data Acquisition at different rate

Hi,
I have a pb with my data acquisition : I'm using a PXI-4472 AI card and continuous acquiring data to file.
Until now all channels are acquired at the same frequency : Ok. I know this card does not support multi-frequency acquisition.
But I want save data at different rate : ex : first channel at the frequency desired (ex 10 KHz), second channel at frequency /2 : 5 Khz ... to reduce amouth of data in the saved file.
I know the amouth of data retrieve et each AI-Read (ex 2048 scaled data / channel), and the frequency divisor / channel.
What's the best way (performance) to process the scaled data tab (2 dim) from the AI-READ to save it in the file (using Write File +) with frequency divisor consideration.
And how to re
ad the data in the saved file after.
Can you send me an example please ???
Thanks
Eddy DUCHENE
12 F Chemin de Boutary
69300 CALUIRE ET CUIRE
[email protected]

Hi kdm,
please stick in one thread for the same topic!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • I am trying to write a double buffered data acquisition program using MFC and a callback function.

    i am trying to do a double buffer data acquisition using MFC application framework in Visual Studio.i want to use a callback function to notify when the buffer is half full.do you have some sample reference program that can help me?

    What DAQ board are you using? When you installed NI-DAQ you should have selected to install the support files for VC++. Then there will be several examples on how to do double buffered data acquisition.
    If you have already installed NI-DAQ 6.8 or higher and did not select to include the support files, you can run the NI-DAQ setup program and just add them. If you are using an older version, you will have to uninstall and reinstall.
    Once you have the support files, follow this path to the examples.
    >>Program Files>>National Instruments>>NI-DAQ>>Examaples>>Visual C>>
    If you are doing digital acquistion, goto the di folder, if you are doing analog acquisition goto the ai folder.
    As for the callback function, you can use the NI-DAQ function Config_DAQ_
    Event_Message with DAQEvent Type = 1, where N would equal half your buffer.
    Brian

  • How to use ni-6008 and build a four channel data acquisition at a rate of 250 samples per channel and display all the data in a waveform chart

    how to use ni-6008 and build a four channel data acquisition at a rate of 250 samples per channel and display all the data in a waveform chart 

    Hi kdm,
    please stick in one thread for the same topic!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Can PCI 6031E handle multi-buffered data acquisition

    If so can anyone send me some instructions or LabView code. Thank you in advance.

    Greetings,
    The PCI-6031E can handle single or double buffered acquisitions. The two best sources for examples and instructions are LabVIEW itself and our web site. Go to the "Help -> Find Examples" pull-down menu in LabVIEW to search for shipping examples. Look in the folder "Hardware Input and Output -> DAQ -> Analog Input -> General." Here you will find many analog input examples. Specifically, you should pay attention to the ones with "buffered" in the title.
    In addition to LabVIEW itself you will find our web site's Developer Zone extremely useful.
    Development Library
    http://zone.ni.com/devzone/devzone.nsf/6ae7945502d89dea0625685500506e1f/4d58b1b80ec41ef70625683f006e1d6d?OpenDocument
    Regards,
    Justin Britten
    Applications Engineer
    Nati
    onal Instruments

  • How can I do a buffered digital acquisition on a single line?

    I am using a NI PCI 6110 DAQ and I need to do a continuous buffered data acquisition (sample rate near or above 5 kS/s). The thing is, the acquisition must be done on a single digital line. Some other lines of the digital port are used for something else (some in write mode, others in read), so they have to remain unaffected by the process.
    It would certainly be better if it could acquire data at the same speed as an analog input (which will be executing at the same time). In fact, it would have been much easier to only add a channel to the AI and I would have got exactly the results I want, but all the AI (4) of the board have already been used .
    The picture I uploaded shows what I'm tryi
    ng to do: I acquire analog data and I want to automatically show the moment a deconnection occured. The purple/pink line, which I added manually, is the one causing me trouble. It shows the voltage (0-5V) of the relay doing the deconnection (that's why it have to be done at the same time than an AI data acquisition).
    Thanks for reading this to the end
    Attachments:
    Graph.jpg ‏55 KB

    Well, you can't get hardware-timed DIO with the 6110, but you can probably use its counters to capture the timestamp you need.
    One method would be to set up a buffered edge-counting task. The analog input's sample clock would be specified as the source signal. This will cause the counter's value to increment at the beginning of each sampling cycle, acting as a measure of time from the start of analog input.
    The falling edge of the relay signal would be the counter's gating signal. For each instance that the relay disconnects, the count value ("time") at that instant will be stored in the counter's buffer for subsequent retrieval.
    Note one small timing subtlety: while the very first sample clock edge puts analog data into the 0th array inde
    x, it will also be incrementing the counter time to 1. This off-by-one deviation will persist.
    There are other variations on this theme, depending on whether you also need to capture re-connection times, or whether there is always one and only one disconnect of interest, etc. You can likely get just the behavior you need using one or both of the on-board counters.
    -Kevin P.

  • Writing data from two different acquisition rates into one file

    Hi,
    I'm using a compactRIO, and I have an anemometer outputting data at 4Hz to the serial port on the controller, and I am using a 9237 module to read strain from two channels at 40Hz. I would like to record all this data in one file, but I'm unsure how to have the data points match up with respect to time since they are read at different rates. Basically I have 10 strain data points for every one anemometer data point, but that one data point needs to somehow be associated with the other 10 read in the same amount of time. It would be okay to "extend" the slower data to the 10 strain points, and likewise to the next ten when the anemometer refreshes its values.
    Thanks for any input!
    Andrew

    Check out the Queue multi-plexer vi from the examples.  C:\Program Files\National Instruments\LabVIEW 2009\examples\general\queue.llb\Queue Multiplexer.vi
    If each data acquisition loop enqueues data to one file writing loop the data is writen in order.  Queues are really a good way to multiplex data sources 
    Message Edited by Jeff Bohrer on 01-29-2010 09:44 AM
    Jeff

  • How can I record several channels of data at different rates with the same card?

    I am building an application in which I need to record several channels of DC voltage data to disk at different rates, for example, Channel 1 at 40 Hz, Channels 3-5 at 10 Hz, Channels 6-8 at 1 Hz, etc.
    All these channels are time-referenced, so I need to make sure data for channels recorded at slower rates line up with their correct time stamp.
    Currently, I am building all data into a 2D array one row per loop iteration.

    Hello;
    At this time, the NI DAQ boards have only one scan clock, so, you can only define one valid scan rate for all of your channels.
    The better approach for you is to sample all channels at the highest rate you will need, and then discard the samples you don't need to save.
    Hope this helps.
    Filipe

  • How to externally time data acquisition rate

    I have Lab-PC-1200 card and Labview 5.1. I will like to read the signals from a Hamamatsu linear detector array that has 1024 pixels on it. The trigger (or sample) rate of the detector can be modified over a range covering 1 MHz to 15.625 kHz.
    I use the 'Acquire N Scans ExtScanClk D-Trig.vi' (written by a NI staff member) downloaded from the web. If I set the trigger rate of the detector to 15.625 kHz (the slowest possible), the program runs without any problem. However, if I use a faster trigger rate (say, 31.25 kHz) no data is collected. According to the specs, the maximum data acquisition rate of the Lab-PC-1200 card is supposed to be 100 kS/s. How do I solve this problem?

    I've answered my own question. The solution lies in disabling the internal channel clock and connecting the triggering clock to the EXTCONV* port of Lab-PC-1200 card to fire the channel clock. The scan clock should be timed with an even faster external clock from the detector. Ultimately, it is the channel clock that is important, not the scan clock. The lab-PC card uses the channel clock in conjunction with the number of channels to set up internal gating pulses which of course become the limiting factor. The external triggering clock connected to the channel clock cannot be faster than the speed of the card (in my case, it's 100 kHz).

  • Read and Log Data at Different Rates

    Hi all, I
    'm certain this a fairly easy task with the right training but I just can't seem to figure it out.  What I would like to do is be able to read from a source and display the values at one rate while simultaneously storing the data to be analyzed later at a different rate.  For example if I was to read a thermocouple and display the readings every 3 seconds on the screen but only log the data every ten seconds.  What's the most efficient way to accomplish this?  I've come up with ways that have given me the results I want but I know it wasn't good programming practice.  So in an effort to get better, does anyone have any suggestions?
    Thanks.
    LabVIEW 2012 - Windows 7
    CLAD

    You could try something like the attached vi.
    Cheers!
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    Untitled 3.vi ‏11 KB

  • Choice of design pattern for data acquisition system

    Hello all
    I have a trouble about selecting the suitable design pattern / architecture for a data acquisition system. 
    Here is the details of the desired system:
    There is data acquisition hardware and I need to use it by observing parameters on User interface. 
    the data acquisiton period, channel list to scan should be chosen on User interface. Besides, there are many user interface interactions. e.g. if user selects a channel to add scanlist, then I need to enable and make visible some other parts on user interface. 
    When user completes the channel selection, then he will press the button to start data acquisition. Then I also need to show the scanned values on a graph in real time and log them in txt file.
    I know that I cannot use producer consumer pattern here. because the data acquisition loop should wait for parameters to scan channels. and it works in a given period by user. so the user interface loop performs higher rate then consumer loop (data acquisition loop). it means queue will be bigger bigger. if I use notifier it will loss some data come from user interface. 
    is there any idea about that ? is there any suitable design pattern for this case ? 
    Thanks in advance
    best regards 
    Veli BAYAR
    Embedded Systems Software and Hardware Engineer 
    "You live in a graphical world. Why not program in one?"
    Solved!
    Go to Solution.

    johnsold wrote:
    Veli,
    I recommend the Producer/Consumer model with some modifications.
    You might need three loops.  I cannot tell for sure from your brief description.
    The User Interface loop responds to the user inputs for configuration and start/stop of acquisition.  The parameters and commands are passed to the Data Acquisition loop via a queue. In this loop is a state machine which has Idle, Configuration, Acquisition, and Shutdown states (and perhaps others). The data is sent to the Processing loop via a different queue. The Processing loop performs any data processing, displays the data to the user, and saves it to file. A notifier can be used to send the Stop or shutdown command from the User Interface loop to the other loops.  If the amount of processing is minimal and the file write times are not too long, the Processing loop functions might be able to occur in the Timeout case of the UI loop Event structure.  This simplifies things somewhat but is not as flexible when changes need to be made.
    I am not sure that a Design Pattern for this exact setup exists but it is basically a combination of the Producer/Consumer (Events) and Producer/Consumer (Data) Design Patterns.
    Lynn
    Check out this thread: http://forums.ni.com/t5/LabVIEW/Multiple-poll-case-structures-to-event-help/td-p/2551309
    There are discussions there about a 3-loop architecture that may help you.
    Jeff
    Jeffrey Zola

  • Capturing data acquisition frames reliably at 100 hz using serial, how?

    Hi All,
    I am completing development of a 14 channel, 10 bit resolution, pic based data acquisition circuit. It transmits frames of 41 bytes (currently) at 100hz using serial. The embedded code functions satisfactorily. I can see data ok using hyperterminal. I am unsure how to optimise labview to get complete frames without hogging lots of cpu/system resource etc. eg. do I simply set the frame size (num of bytes) to retrieve and set this looping as fast as possible , and/or set the rate to fetch frames at the rate frames are transmitted by the pic? This may allow drift in available buffered bytes to finally overflow the buffer.
    I tend to lose 1 byte in 100 typically doing nothing but this increase
    s to chunks of bytes if I interact with windows.
    I have the feeling a number of decisions need making when setting up a serial link like this but I am unsure which settings best suit my application.
    Thanks in advance,
    Regards
    Chris

    Hi Lynn, Tristan,
    Please find the current llb attached. This has my last serial run and shows how the data gets glitchy after a number of seconds (toward end of the text box).
    I have spent time building the suggestions into code. I am not yet trying to strip out individual channels. At the moment I just want to get frames in reliably before moving on.
    It certainly looks a lot more reliable now but a few more questions have been raised. I think the idea of getting data in using 1 loop then immediately passing it for processing by another parrallel loop seems important for reliability.
    You will notice I grab a frame and it then goes into a que where it will be processed but this needs doing quickly as frames will be used in realti
    me.
    I have set up the code to trim the delay for both the get data from serial port loop and get 1 entry from the que loop.
    I am using 2 identical circuits in my product, 1 captures data from a leg harness, the other controls movements of a biped robot (servos) this occurs in "real time". I need to remove as much latency due to processing as possible.
    click on "video 3" on the right of the page for a prototype demo:
    http://www.robotic-systems.co.uk/products/full_system.htm
    I noticed that some of text embedded within text boxes used in subvi's can tend to float thro to the top level vi. I proved this by adding a bit of text and noticed it kept cropping up occasionally on the top level text box. I found this peculiar but cured it by deleting all chars in the subvi text box. Now I am concerned, could this be somthing to do with why I get glitches in text occasionally?
    Is there some labview feature to say flush all text, numbers and bools prior to running from the top leve
    l?
    I'd be gratefull if you have a look thro my llb and sanity check the flow of code and let me know what you think.
    Best Regards
    Chris
    Attachments:
    Monitor.llb ‏722 KB

  • Data acquisition: task specified does not exist

    I am trying to do an analog read.   Apparently in the original code (which I did not write), the data acquisiton is a multithreaded task. (I am not a real programmer, so know next to nothing about multithreading, and not a whole lot about programming)...
    When I tried to collect data (by pressing our "Data Collect" button on the GUI, I got an error along the lines of:
    "Task specified is invalid or does not exist. Status Code: -200088"
    I have figured out that the task the error refers to is called SetCollectData, for which I am not able to find a definition.
    It runs fine when I comment that line out, but of course, no data gets collected!
    Here is the actual data acquisition portion of the code:
    if(DAQInputTask && ) GetCollectData())
                    if((AiData = malloc(sampsPerChan*AiNumChannels*sizeof(float64))) == NULL )
                        MessagePopup("Error","Not enough memory");
                        goto Error;
                    DAQmxErrChk(DAQmxReadAnalogF64(DAQInputTask,-1,0,DAQmx_Val_GroupByScanNumber,AiData,sampsPerChan*AiNumChannels,&numRead,NULL));
                    fwrite (AiData, sizeof(float64), sampsPerChan*AiNumChannels, AiRawData);
           *AiData = NULL;
    Any ideas?
    I have switched to NIDAQmx drivers, and have had a host of problems since switching to DAQmx functions.  So, this new problem may still be related. 
    Thanks!

    Tasks in CVI are the basic of data acquisition: every operation is run under a task which groups channel definition, triggers, acquisition rate and almost every other element which constitues an acquisition process.
    You should try to find informations about the tasks used in your project, possibly asking the original programmer; on the same time, you should learn some infos about how daqmx treats data acquisition process. Here you can find the help page related to tasks: I suggest you read that page and use it as a starting point for your search. Keep in mind that a task can be defined either inside the program or within MAX. One possible cause for not finding the task while running the program is that is has been defined in MAX on one machine and you have moved the project to another one without moving MAX informations too from the original PC, but this is only a guess.
    It's not clear from your words whether you are modifying an existing project developed in DAQMx from the beginning or you are moving an old NI-DAQ project to DAQMx. These are very different scenarios. In every case you should see the exact line where the error arises, look for the task handle used in that line (e.g. 'DAQInputTask' in the code you posted) and find the line where the task is loaded/created (ultimately try a search for that variable name in all your source files and examine each line where it si used).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Techniques for a synchronous long-life data acquisition

    Hello All
    I have a digitizer, which needs to run at a constant rate for ever. When some condition occur (reading exceed treshold level), other data processing must take place.
    The data processing last for much longer time that the successive sampling, which means that I can not fit data processing in the same thread as the sampling process.
    It looks like I need some kind of buffer, which will be filled and keep track of the sampled data, and another thread for data processing and analizying.
    Can somebody give me a link, or advice about this kind of problems. What are the techniques for long-life data acquisition.
    Thank you in advance.
    Pawel

    Indeed a challenging application! Here is what has been done successfully in other applications:
    1) to separate the DAQ task from other tasks, put the data into a Queue. This creates a second software buffer for your data.
    2) for large buffers, so you can extract pre and post trigger data, use two files (a double buffered file buffer) and stream the data to each file successively within your DAQ VI.
    3) when you detect the threshold trigger in your DAQ loop, note the block number and pass this as part of the queue
    4) your processing loop, can then use the block number to get pre and post trigger blocks for further analysis.
    Hope this helps you get started.
    Preston Johnson
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • Buffered Data And Counter Reads

    Someone help me please....I need to do some fast digital data
    acquisition with handshaking, which I think I can figure out. If anyone
    has any hints on buffered data like that, please let me know. Also, I
    need to read the status of three counters every time that handshaking
    pulse comes in. I am not sure how to store the counter data in a buffer
    (ie, hardware controlled)
    I have to do it hardware controlled, because the DAQ rates have to
    be fast....right around 1000 Hz or higher. Can someone offer any guidance
    into how to do this? I believe I understand how to configure buffers for
    the regular data recording and set up that handshaking, but I'm not sure
    how to set up the counters so they write their values to a buffer (all
    hardware controlled) when the handshaking pulse comes in.
    If there are any books out there or anything, if someone could
    tell me, I would be very appreciative. I always get the feelign grad
    students are trying to do things that the hardware wasnt designed for. LOL
    Thank you.
    JP

    >Someone help me please....I need to do some fast digital data
    >acquisition with handshaking, which I think I can figure out. If anyone
    >has any hints on buffered data like that, please let me know. Also, I
    >need to read the status of three counters every time that handshaking
    >pulse comes in. I am not sure how to store the counter data in a buffer
    >(ie, hardware controlled)
    > I have to do it hardware controlled, because the DAQ rates have to
    >be fast....right around 1000 Hz or higher. Can someone offer any guidance
    >into how to do this? I believe I understand how to configure buffers for
    >the regular data recording and set up that handshaking, but I'm not sure
    >how to set up the counters so they write their values to a buffer (all
    >hardware controlled) when the hands
    haking pulse comes in.
    > If there are any books out there or anything, if someone could
    >tell me, I would be very appreciative. I always get the feelign grad
    >students are trying to do things that the hardware wasnt designed for. LOL
    >
    > Thank you.
    >
    > JP
    >
    >
    >
    >
    I am working on a project of high speed generation, and what I did was first to
    look at the spec sheets of the 6533 (32HS) at www.NatInst.com That is a board
    that buffers input and stores it till need be. The 6602 board has counters on
    it that can be scanned when events happen. A small bit of math resulting from
    those numbers can tell you a lot about when such triggering events happened.
    Hope this helps,
    Dave

  • Multiple channel data acquisition

    hi sir;
    i want to get the voice data from 8 channels in 8 different
    buffers.The acquisition should be continious.Please tell how this will
    be possible using daqmx API's and what procedure should be
    followed.Also specify what API's should use.Please donot say the
    tradition answer  "see the National instruments examples
    etc.etc".Please tell complete sequence of API's.
     I have installed 7.4 version.
    I want to acquire continue one minute data from 8 channels in 8
    buffer after the one minute all the data of 8 buffer should be
    transfered to other 8 buffer and the continous acquistion should be
    contineoued. I m using DAQ6025E.
    thanks
    ajmal

    Duplicate post.

Maybe you are looking for

  • FCP 7 Updates (7.01 to 7.03)

    I had to e-install FCP 7 on Mavericks and was wondering how I might be able to obtain the 3 updates as they are not indicated by the Software Update.  Thanks.

  • I'm having trouble with iMovie crashing when I Finalize Project or Export Movie.

    Every time I Finalize Project or Export Movie my iMovie crashes. This has only started happening recently, I was creating movies and finalizing and exporting with no problems before. I'm doing exactly the same thing - creating simple short movies wit

  • Show ordimages - dynamic page or portal reports

    Hi all. I have one table with 2 columns ordimages and 1 varchar2, im use a oracle portal forms to make inserts, its works perfect, but now a need to display this images, i try to use Portal Reports, but when a try display this images just show a smal

  • Organisation structure-multiple plants miltiple POrg

    Hi, we have one company code 1000 which have three plants 2000, 3000, 4000. each plant has its independent Porg and purchasing activities, different master records and vendors. Porg are 1000 for plant 1000 Porg are 2000 for plant 2000 Porg are 3000 f

  • Photoshop elements not opening

    Error 150:30 keeps popping up on my screen when i try to open photoshop elements.  Need help.