Save multiple sample rate data to TDM file

Hello, LV connoisseurs
I use 2 Multifunction boards and LV 7.1 to gather slow and fast data simultaneously, 'slow' being 10 temperatures at 150 Hz, 'fast' being 12 pressures at 15 kHz, rate factor between slow and fast is constant 100. My acquisition is set to 'continuous' with blocks of 15 and 1500 resp., so each sample set takes 0.1 sec.
Currently, I use 2 loops, one for each board. Slow data are written to .lvm, fast to .tdm, and this works fine.
But I wonder if in this configuration it might be possible to
- use one loop only (yes, trivial) with the main target being to
- write data into two channel groups of one .tdm-file, one for the 'fast' the other for the 'slow' data?
If at all possible, would this require the consumer/supplier scheme such as to allow the interspersing of data or can I do this directly?
Thank You for your input.
Michael

Just to make the distinction, you should probably be using TDMS (the S stands for streaming) instead of TDM if you are continuously writing data. TDM is more for writing a snap-shot and doesn't work so well for continuous data (big memory leaks last time I used it back in '06).
Also, as no time data is stored you probably also want separate timestamp channels then for your fast and slow data.
As mentioned, it is no problem having multiple writing loops using the same TDMS reference.
nrp
CLA

Similar Messages

  • High sample rate data acquisition using DAQ and saving data continuously. Also I would like to chunck data into a new file in every 32M

    Hi: 
      I am very new to LabView, so I need some help to come up with an idea that can help me save data continuously in real time. Also I don't want the file to be too big, so I would like to crete a new file in every 32 mega bytes, and clear the previous buffer. Now I have this code can save voltage data to TDMS file, and the sample rate is 2m Hz, so the volume of data increase very fast, and my computer only have 2G ram, so the computer will freeze after 10 seconds I start to collect data. I need some advise from you briliant people.
    Thanks very much I really appreciate that. 
    Solved!
    Go to Solution.
    Attachments:
    hispeedisplayandstorage.vi ‏33 KB

    I am a huge proponent of the Producer/Consumer architecture.  But this is the place I advise against it.  The DAQmx Configure Logging does all of it for you!
    Note: You will want to use a Chart instead of a graph here.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    hispeedisplayandstorage_BD.png ‏36 KB

  • How to Save Multiple Records In Data Block

    Hi All,
    I Have Two Blocks --> Control Block,Database Block
    Please Any Idea How to Save Multiple Records In Data Block when User changed Data in Control Block.
    Thanks For Your Help
    Sa

    Now i have to use each record of control block(ctl_blk) as where condition in data base block(dat_blk)and display 10 records from database table.>
    Do you want this coordination to be automatic/synchronized or only when the user clicks a button or something else to signal the coordination? Your answer here will dicate which trigger to put your code in.
    As to the coordination part, as the user selects a record in the Control Block (CB), you will need to take the Key information and modify the Data Block's (DB) "DEFAULT_WHER E" block property. The logical place to put this code is the CB When-New-Record-Instance (WNRI) trigger. You code will look something like the following:
    /* Sample WNRI trigger */
    /* This sample assumes you do not have a default value in the BLOCK WHER E property */
    DECLARE
       v_tmp_dw    VARCHAR2(250);
    BEGIN
       v_tmp_dw := ' DB_Key_Column1 = '||:CONTROL.Key_Column1||' AND DB_Key_Column2 = '||:CONTROL.Key_Column_2;
       Set_Block_Property('DATA_BLOCK', DEFAULT_WHER E, v_tmp_df);
       /* If you want auto coordination to occur, do the following */
       Go_Block('DATA_BLOCK');
       Execute_Query;
       /* Now, return to the Control Block */
       Go_Block('CONTROL_BLOCK');
    END;
    The Control block items are assigned with values in Form level (Key_exeqry).If your CD is populated from a single table, it would be better to create a Master - Detail relationship (as Abdetu) describes.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Multiple sample rate question

    I have one project with edits of different files all over the place recorded at 44.1 kHz. I have another project with edits all over the place recorded at 88.2 kHz. I wish to combine all tracks from these two projects. I realize I will need to convert the sample rate of all the 88.2 kHz files, but I don't want to mix down any track. I want all of the edits to be cut at the same places in time, just with the referenced files being at a different sample rate.
    I've tried everything. It seems that it is impossible. If I convert the sample rate of the referenced files, then open the project and change it's sample rate, the edits are now cut at differnt locations in time. It seems I have to mix down each 88.2 track, then sample rate convert these to 44.1.
    But I need to have all the edited segments as they appear in both projects in the same project. Any ideas?

    Don't record at 88.2! Why would you do that?!
    I'd back up and archive your current session first as you are probably going to have to do some very destructive messing.
    I haven't put this to the test but maybe you could try converting the route files in a third party software like ProTools. You'll get a bunch of prompts when you reopen Logic but this may work. But for me the simplest (albeit time consuming route) would be to convert all of your regions to new original sound files (you can do this from the audio pop down on the arrange page). Then in your audio pool select all unused audio, delete and go through each new file and convert the sample rate. It's a bit of a car crash situation needless to say next time preparation preparation preparation!
    Finally when you have been through this kind of process make sure that you are operating at the correct new clock rate before continuing otherwise this stuff still aint gonna work.
    Hope this is of help.
    Good luck.

  • How to create a wav file from 24bit 96Khz sampling rate data

    Hi
    I am trying to make an VI which will play sound while acquiring data from PXI 4472 DAQ card.
    My sampling rate is 96Khz and PXI 4472 card is a 24bit card.
    Wave files are in 8 or 16 bit and the sampling rate is 8000, 11025, 22050 and 44100. How will I be able to play the data which I am acquiring.
    How would i normalize the data into the required format needed for most of the sound cards to play.
    Or are there any codec available in Windows XP which i call to play a 96KHz 24 bit sample
    Does anybody ever encountered this type of problem.
    Thanks in advance
    Nitin

    Whilst the 'standard' RIFF format specification usually accomodates 16 bit data, there is of course no reason that you can not create your own extension. It just won't be playable by Media player using the 'standard' installed drivers or codec. This may not be a problem....
    WAV files can and do support other formats, you just need to know how to handle them......
    There is howerver a 4GB limit (related to the pointer size in the WAV specification) which with higher bit depths on the sampling does start to become a bit of a problem.
    To give you a few samples of other types of wav files check out the following site here
    http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples.html
    The following definitions for WAV audio formats may also be of interest here
    http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
    Good luck with 24 bits.

  • How to store data (in tdm files)

    I'm looking for advice on how to store data in tdm/tdx files.
    The main challenge is like this: At regular time intervals there is new data available (say every 10 minutes there are 10 minutes of new data available). All data is time based. So every ten minutes I may create a new tdm/tdx file containing this data segment. However, when i want to analyze the data i dont necessarily want to view 10 minutes of data from all channels, but maybe 20 hours of data from one particular channel.
    The way I've achieved this so far is to manually load each 10 minute segment of this particular channel and then add these parts together. This is both time consuming and cumbersome. Is there a better way to do this that I've simply not discovered yet? Is there a better way to store data to simplify this process?
    One solution is of course to save data from several 10-minute frames in one file, but seeing as there is a never ending supply of data i cant simply save all data in one giant file, it has to be split up at some point, and the problem will still remain.
    One factor to have in mind here is that this is rather large amounts of data (maybe 10GB each day), so the option to simply load all the data into memory goes out the window rather quickly.
    Feel free to ask if I've not made myself very clear

    Hi salte,
    If your test ever ended, and if you had LabVIEW 8.20 or higher, I would recommend using a TDMS file, which handles data appeands flawlessly.  DIAdem 10.1 now also does data reduction and index windowing during file loading for TDM / TDMS / DataPlugin files, so that you could easily load out only the part of the file you wanted to look at.  But since you describe your data acquisition as never stopping and amassing 10 GB per day, I agree that it would be impractical to use only 1 data file.  So we are stuck with some number of files which each contain a part of your measurement.  This approach can have advantages, since you can save operational properties for each "buffer" such as average value, dominant frequency, ambient room temperature, etc., and later on you can use the DataFinder to query out only the data buffers which meet specific conditions based on these properties.  The problem remains to load and assemble data based on multiple files.  This is an old problem in DIAdem, and one for which I have an efficient and I hope satisfactory workaround application.  It does what you describe already doing in the minimum amount of time and with the minimum amount of user interaction, and it can be highly parametrized to suit your particular situation.  The ideal way to start the application would be as part of a ResultsList custom menu.  This would enable you to query out the buffers you wanted, highlight those rows in the ResultsList, right-click and choose your custom menu, and WHAM! the selected buffers for your queried channel(s) are automatically appended together in the DataPortal.  Launching from a ResultsList custom menu would mean that you could skip the file dialog and just read out the data sources directly from the ResultsList selection.
    Let me know what you think,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Importing Data from Multiple DataPlugin Files.zip ‏198 KB

  • Multiple sample rates!!!

    I am doing something I have done a million times but this time I am unable to do so! Here it is.
    Pull a clip on to the timeline viewer, extract the audio, split the video clip in half, trash one of the halves, insert other clips to fill in the video, turn the audio down to 0% on the new clips. When I try to export I get a failure that says I am trying to export multiple audio sample rates. I am doing nothing different than earlier today, but now it won't let me. I have tried several variations of this work to fool the computer but nothing works. I am moving on to another movie but if I run into this problem again it's off to Final Cut Express with no regrets.
    Any ideas?
    I thank you in advance.
    Steve

    I couldn't reproduce your error although I tried to follow your workflow (I had to use PAL, though).
    Anyway, there is an audio sample rate bug in iMovie 6 because it extracts audio at 44.100 kHz instead of 48.000 kHz:
    DV works best with 48.000 kHz, 16-bit audio (32.000 kHz, 12-bit audio can produce problems). If the DV audio is 48.000 kHz (as it should), and you use the Advanced/Extract Audio -command, the extracted audio is 44.100 kHz. (You can find the extracted *.aiff audio files at iMovie project package's /Media -folder).
    http://www.sjoki.uta.fi/~shmhav/iMovieHD_6_bugs.html#extractaudio
    FWIW, iMovie 4 also had an audio sample rate bug:
    Imported audio in .mov and MooV files is converted to 32 kHz:
    http://www.sjoki.uta.fi/~shmhav/iMovie4bugs.html#32khz

  • How can we save multiple IDocs as a single Flat file in R/3 system ?

    Hi,
    How can we save Multiple Idocs as a single Flat IDoc in R/3 (Not xmlized)
    Kulwinder

    Hi,
    Check this link for Mutiple IDOCs into single File.
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm
    Regards,
    phani
    Reward points if Helpful:)

  • Filter data in tdms file

    I am needing to look at select data of a TDMS file in an analyze portion of a stat machine. The VI is to test both AC and DC motors. I am getting 18 different reading from a power analyzer. I am writting these to a TDMS file for ease of passing through the rest of the states. In the "Analyze" state I am wanting to look at  13 of readings an compare them to see is they are within tollerence. I will then use this check to highlight the reading green or red.
    My questions are:
    Should I even have an 'Analyze' state or should I do the analysis in the state that the reading is taken?
    If I do use the 'Analyze' state is pulling the data from the TDMS file the best way to do this?
    Also, if you see any other possible errors in the vi, please let me know. This is my first experience with LabView and it is steep learing curve.
    Thanks, 
    Attachments:
    AC TEST PANEL.vi ‏524 KB

    Since you are using a State machine approach, I would suggest to keep that idea and add the Analyze state to keep the code organized. Plus, you can add a shift register to pass around the acquired data which will be more efficient than reading from the TDMS file.
    For future reference, when using the state machine while you analyze, log, etc...you are forcing sequential execution and loosing time that can be used for hardware I/O. When this becomes a concern you can implement the following structure. Keep up the good work
    Alejandro | Academic Program Engineer | National Instruments

  • Write waveform timestamps with data in TDMS file

    Hello,
    I am attempting to write data from an array of waveform data derived from a multi sample DAQmx acquisition, but I have found where I have used the get date / time function within my while loop passed to a TDMS Write in series with another being passed the waveform data, that I have many more data points than timestamps, as I am getting a timestamp then the list of sampled points.
    I am looking at using the timestamp data from the waveform, but I'm not sure how to make this work.  Attached is an example where I have attempted this, but just managed to obtain mismatched data types.
    Could anyone please offer some advice on how to get the following structure in my file:
    timestamp of sample | channel 1 sample | channel 2 sample | .... | channel N sample
    Thanks
    Dave 
    Solved!
    Go to Solution.
    Attachments:
    testMultiWaveformLogging.vi ‏24 KB

    I'm not quite clear about your use case in the attached VI. However, you should give input of channel names to the 2 "TDMS Write" nodes since they have different type of raw data.

  • How to use javascript to "save as" using form data in the file name

    I want to be able to use a button to "save as" and have it automatically pick up and use certain data from the fields in the file name. without having to manually type in the file name.
    Name: john doe
    Date: 1-25-13
    file name would be  (john doe 1-25-13)

    You will need two parts for this. A folder level script (which you place in a .js file under the JavaScripts folder of Acrobat), and a script embedded in the file itself (probably attached to a button).
    The folder-level script will look like this:
    var mySaveAs = app.trustedFunction( function(oDoc,cPath) {
        app.beginPriv();
        try {
            oDoc.saveAs(cPath);
        } catch(e){
            app.alert("Error During Save");
        app.endPriv();
    The doc-level script can look something like this (of course, you might need to adjust the names of the fields used):
    var filePath = this.path.replace(this.documentFileName, "");
    var newFileName = this.getField("name").valueAsString + " " + this.getField("date").valueAsString + ".pdf";
    mySaveAs(this, filePath+newFileName);
    You should be aware that several characters are not allowed in the file name, including comma's, forward- and back-slashes, line-breaks and excalmation marks, so if you try to use them the script would fail. It is possible to create a more advanced version of this script that will automatically remove such characters from the file-name, or alert the user if they used them.

  • How to save multiple forms to a single postscript file

    Hi All,
    We have a requirement where we have to print 10 to 20 forms as a batch print each day.
    What this means, is that at the end of the day, a single print operation will print all the forms.
    The Client is expecting us to create a single postscript file for all these forms.
    I need someone to explain to me the postscript functionality and how it is possible to save the information of 20 forms in a single postscript file.
    Thanks,
    Urmila

    HI,
        We can use more than one Form in a Driver Program. It's Possible to Print also. Use this Functional Modules
    Open_Form.
    Start_Form.
    Write_Form.
    End_form.
    Start_form
    Write_form
    Start_form.
    Close_form.
    Revert Back if u have any clarification.
    Regards,
    Saran

  • Concerning multiple frame-rates in one export file to perceive important necessary philosophies.

    consider READ QUESTION, The following 4#'d Paragraphs should be skipped and not considered to be read and don't link
    to my discussion it's question.
    4.It's a strange world we live in, yet the wonders are revealed if realised once more.
    Hello my dear friend or opposition. As this was my first post I represented my normal
    thought flow throughout as it would be me daily, reflecting as necessary, apologizing in advance
    if thrown out of balance.
    1.Rather contradicing or raising questions, I would like to consider this very moment the age
    of turn around points. As the evolution and perhaps one a day, revolution continues I would
    like to take a moment to stand by this process, I conclude we are going towards the red pitt hole.
    2. I also consider After Effect a program to allow whatever creativity could thrown at it, powered
    by our imagination creating a new breed of cinema. I consider myself a philospher, always spellinG it
    wrong but even thaT I consider mental restrictions only preventing me to reach out for your location,
    wherever or however you may consider that to be so.
    3. Proclaiming filters most out, but if I could only change one mind, I succeeded. I plan to rewrite
    or so to speak, re-introduce what could be film and where we could are going with it, possibly. Film will
    be an art that could differ as much as some painters have created unpredictably impossible differences
    between them selfs. Concludingly art style differ so does reality, I am thanking the creators of After Effects,
    and improvers, hereby with a salute for a program potentially as versatile.
    QUESTION
    Film=60:00 seconds
    first 00:10 seconds=>a 2000FRAMES/s animation,
    2nd 00:11-60:00 seconds=> 60FRAMES/s film.
    Exports results in one frame-rate, I have done insufficient research as why this is still a limit,
    or might not be because of simply not knowing enough yet. I created this story that could
    potentially explain our source and the infinite continuation of that and why.
    Thank you for your time, and I do appreciate it already if
    you read this far. Information regarding the question is fine.

    Imagine a movie theater. The projector is running happily away at 24 fps. All of a sudden you want to watch the movie at 60fps. You pick up your cell phone and call the lobby and talk to the manager. He thinks this is an interesting idea so he sends the projectionist up to the booth to look for a speed control on the projector. No luck, this one only runs at 24fps.
    That's how video containers work. You render to a container (mov, avi, flv, whatever) and you've just bought a projector with only one speed. If you want to change speeds in the middle you have to have a very special projector. No way around that.
    So the answer is that you can't render to the same container with different frame rates.
    You can, however, in a single comp, have footage that runs from 1 frame per hour to 99 frames per second. You can interpret the footage placed in a comp at any frame rate from 1 per second to 99 frames per second, which would accomplish what you are trying to do, except for the part that the first hour of the movie rendered movie would contain more than one frame.
    There are different types of containers however that can display each frame for a specific time interval. Animated Gif is the simplest movie container of this type. Flash is the most common. These are non standard video containers and you have to control the timing outside of AE.
    It would help if we had a little less escortaric posing of your question. What exactly, in an actionable question, are you trying to do and why?

  • Save wavefromgraph data of format [f0,df & magnitude)into TDMS file

    How to save Wavefrom Graph data into TDMS file including fo & df along with the magintude.
    I am able to save magnitude alone which is not correct ,coz i have f0 & df also needs to be saved in order to calculate some values
    pls see the below image which shows the i/p format to the wavefrom graph. Also pls do the needful help.  .
    Attachments:
    Waveform.png ‏11 KB

    Hi, check this link
    Simultaneously Write and Read TDMS Data.......
    https://decibel.ni.com/content/docs/DOC-7982

  • Issues writing varying sample rates to a continuous TDMS

    Hi All,
    I have a VI that uses DAQ.mx to aquire data where I can dynamically change the sampling rate without stopping the program and restarting it.  The aquired data goes to to a queue and then gets written to a TDMS file in a separate VI.  I know the aquisition part of the routine is properly changing the sampling rate, but when I view the TDMS files all of the data has been changed to one sampling rate for the entire file.  Does anyone know what may be causing this and how I might fix it?
    Thanks in advance!

    "How are you changing the sampling rate without stopping the program and restarting it?"
    I have tried changing the sampling rate two ways to see how they differed with system resource load.  Both still leave me with the same TDMS file issue.  
    1) there is a case structure in the aquisition loop and a "low speed"/"high speed" switch.  There is also an "equal to" comparison coming off  and the switch's value from the last loop via shift register.  If I flip the switch true case stops the device, changes the sampling rate through a datamx task property node to high speed or low speed (depending on the boolean, a second case structure inside the first), then starts the tast again at the new rate.  The case then is false until the switch is flipped again.
    2) the loop always samples at high speed and downsamples the waveforms when "low speed" is clicked.
    What sampling rate are you coming from and going to? 
    High Speed = 50kS/second
    Low Speed = 10kS/second

Maybe you are looking for

  • Sharing Music Library with multiple accts on a computer

    I've tried following the instructions to share a single music library between 2 users accounts on the same comupter. While I've moved the music library to the Shared Document folder, only one user can see the library. Is there something else I can tr

  • Swapping of positions in case of transfer

    Hey, If org unit (A) has a position 'Driver' assigned to it and org unti (B) also has another position driver assigned to it. Do we need to create 2 diff 'Driver; positions in this case,  since cost centers are assigned to each org unit In case of tr

  • Trouble building an installer with NI-DAQmx and tasks

    I am having trouble getting an installer that includes my tasks for NI-DAQmx.  I select the configuration wizard from the hardware tab, it shows my tasks with checkboxes but i cannot 'check' the task I want, it says "the item cannot be checked becaus

  • Adobe form is opening outside SAP

    Hi all, I was wondering if anybody has the answer to this issue, I believe it's quite simple, but I haven't got the solution yet. I just finished the configuration of ADS. Everything is working fine: test reports, connections, ABAP Stack, JAVA Stack

  • How to play cd rom on macbook pro with external dvd drive ?

    Hi guys, I am a Apple newbie. Can someone teach me how to play a CD ROM on my macbook pro ? I am using a samsung dvd writer. MacBook Pro (Retina, 13-inch, Late 2013) Samsung DVD writer Model SE-208 Many thanks