TDM file with multirate interleaved data?

I am developing a datalogging application that samples several channels at different rates and I need a way to graph the data quickly.  After figuring out that reading my own custom file format byte-by-byte takes a long time in LabVIEW, I started looking at TDM files.
I found the TDM Header Writer VIs, and it looks like I can just create a header that points to my binary data.  However, I have several channels which can be sampled at different rates.  For example:
Channel 1 data
Channel 2 data
Channel 3 data
Channel 1 data
Channel 1 data
Channel 2 data
Channel 1 data
Channel 1 data
Channel 2 data
Channel 3 data
Is it possible to create a header for data stored like that? Or would I need to include data for all of the channels at the highest frequency? ...
Channel 1 data
Channel 2 data
Channel 3 data
Channel 1 data
Channel 2 data (dummy)
Channel 3 data (dummy)
Channel 1 data
Channel 2 data
Channel 3 data (dummy)
Channel 1 data
Channel 2 data (dummy)
Channel 3 data (dummy)
Channel 1 data
Channel 2 data
Channel 3 data
I am thinking about creating 2 files: one for low speed data (0-100S/s) and one for high speed (100-1000S/s).  I would simply insert the dummy data for channels that aren't the highest speed.
Am I going about this the right way? Is there an easy way to store the data the way I _really_ want to (all the channels interleaved without dummy data)?  Any ideas or suggestions would be greatly appreciated.
Thanks,
John

John,
Have you considered splitting the data as it is acquired and writing each channel to it's own binary file and then using a TDM header file to relate the acquired channels?
That would be how I would approach this problem but as I haven't tried this before I can't tell you how successful it will be (yet).
I'll try looking into this some more and post again when I have some better information.
In the meantime here are some resources that you may or may not have seen:
Introduction to the LabVIEW TDM Header Writer VIs
LabVIEW TDM Header Writer VIs
Introduction to LabVIEW Data Storage VIs
~
Simon H
Applications Engineer
National Instruments

Similar Messages

  • I write digital port by 'DAQmx Configure Logging.vi​' and receive TDMS file with 8 boolean channels. How can I write to 1 integer channel?

    Hello!
    I want to write 1 digital port from PXI-6536 with streaming to TDMS file.
    I'm writing by 'DAQmx Configure Logging.vi' and become TDMS file with 8 boolean channels.
    How can I write to 1integer channel?
    Attachments:
    1.JPG ‏27 KB

    Hey Atrina,
    The actual data stored on disk is just the raw data (that is, a byte per sample in your case).  It's really just a matter of how that data is being represented in LabVIEW whenever you read back the TDMS file.
    I'm not sure if there is a better way to do this, but here is a way to accomplish what you're wanting:
    Read back the TDMS file as a digital waveform.  Then there's a conversion function in LabVIEW called DWDT Digital to Binary.  This function will convert that set of digital channels into the "port format" that you're wanting.  I've attached an example of what I mean.
    Note: When looking at this VI, there are a few things that the downgrade process did to the VI that I would not recommend for these TDMS files.  It added a 1.0 constant on the TDMS Open function, and it set "disable buffering" on the TDMS Open function to false; you can get rid of both of those constants.
    Message Edited by AndrewMc on 01-27-2010 11:21 AM
    Thanks,
    Andy McRorie
    NI R&D
    Attachments:
    digitalconvert.vi ‏13 KB

  • Script to auto zero channels in a TDM file with multiple channel groups

    Hi friends,
    I am trying to process some data but am having trouble modifying a script to autozero channels across multiple channel groups. The following script works to zero channels across one group. I use this script to process data in a TDM file with only one channel group. I need to be able to zero channels across multiple groups (5 groups). But the amount of groups I will have may change so I might need an option to enter the amount of groups or have the script determine the amount of groups in my TDM file. 
    Here is the code I use to zero the data. Thanks in advance for your help!
    Sub UserDlg_Select
    Call USERDLGINIT()
    USERDLGCAPTION="Auto Zero Channel Based on Specified Points "
    USERDLGTXT(5)="Number of points to Average"
    USERDLGCOMMAND(5)="t1"
    Call USERDLGOPEN()
    End Sub
    Call UserDlg_Select()
    T2="1-"&T1
    For I= 1 To ChnNoMax 'For all data channels except time
    T4=CHNNAME(I) 'Create string for Channel name (I)
    T3=ChnDim(T4) 'Create text variable for channel dimension
    STATSEL(6)="Yes" 'Arith mean
    STATCLIPCOPY="yes"
    STATCLIPVALUE="No"
    Call StatBlockCalc("Channel",T2,T4) 'Calculate Stats for Channel (I)
    'Subtract Mean of first (T1) points for Channel (I)
    Call FormulaCalc("Ch('temp1') := CH('"&T4&"') - statarithmean")
    CHNCOMMENT("temp1")=("Channel zeroed over first "&T1)+"pts" 'Add Comment
    ChnDim("temp1")=T3 'Add Dimension
    CHNNAME("temp1")=T4+"-Z" 'Save updated data with -Z
    'Delete Stat Channels
    Call CHNDEL("ArithmeticMean")
    Call CHNDEL("Sum")
    Next 'End For loop
     

    Hi rvillalta319,
    Sounds like you'll need to adapt your code to use both a for loop and some implementation of the GroupCount variable (or ChannelGroups.Count) as seen here:
    http://zone.ni.com/reference/en-XX/help/370858K-01/varoff/groupcount/
     

  • Nilibddc dll: opening tdms files with corrupt index files

    Hi there,
    i have a question regarding error handling, when using the nilibddc.dll.
    I want to use nilibddc.dll to open .tdms files. At the time i'm experimenting with some error cases and got stuck in one case:
    When i try to open a .tdms file with a corrupt .tdms_index file i get the error code -6211 (DDC_StorageCouldNotBeOpened).
    The .tdms_index file is corrupt because of errors while copying the file.
    The problem i noticed is, that i have a file lock on the corrupt .tdms_index file after DDC_OpenFile(...) (i can rename it, but i can't delete the file!?).
    As you can see in the code snippet - it isn't really special...
    int ddcError = 0, length;
    DDCFileHandle file = 0;
    ddcError = DDC_OpenFile (FILE_PATH, NULL, &file);
    // here i get ddcError == -6211
    if( ddcError == 0 )
    // do something with the file...
    ddcError = DDC_CloseFile(file);
    if( ddcError == 0 )
    cout << "no error - everything done" << endl;
    system("PAUSE");
     Do i miss something here? Should i use DDC_FreeMemory in somehow to release opened handles?
     I also tried to use the DDC_OpenFileEx(...) with readOnly set to true. But this doesn't change anything!
    Thanks in advance for help,
    Daniel
    Solved!
    Go to Solution.

    Hi there,
    thanks for the replies (and sorry for my late answer).
    The code above is from a simple Visual C++ Project that i use to run some tests with the dll.
    If i posted the question in the wrong topic please let me know - i found some other posts dealing with the dll so i thought i'm right here.
    I attached a tdms and the corresponding "corrupt" tdms_index file.
    The file handle stays 0 when i debug my code with that file and i receive the error -6211.
    I want to use the dll as part of an application that runs as system service. It reads and writes information from/to existing tdms files. After the information is read the application moves the files. So, if the tdms_index file gets corrupt (by whatever) i have the problem, that the index file is locked as long as the service is running and the file can't be moved. I can't tell how often this happens (hopefully never) but if i can do something against it, i would like to integrate this precaution.
    Thanks in Advance for any information & have a nice day,
    Daniel
    Attachments:
    samplefile.zip ‏3 KB

  • Our version of ID saves all files with the time/date of December 31, 1999.  How do we fix this?

    Our version of ID saves all files with the time/date of December 31, 1999.  How do we fix this?

    That's interesting. The file date should match the system date. What's the system date? What version of InDesign? What operating system?

  • What VI can read raw data from a TDMS file with scaling information entered?

    I would like to use scaling with my TDMS files so that the end user will
    only see engineering unit values, however, within my Labview application, I
    want to retrieve the raw data.  Is there a way to read the raw data using
    one of the Vi's in Labview?

    The scaling information in a TDMS file is stored as properties of the channel.  One trick (that I haven't mastered yet) is you can change the properties of the TDMS file (set properties) and set all the scales to have a offset of 0 and a scale of 1.  This will apply a scale that has the engineering units be the same as the raw values.  Then you can read the data like normal and you'll get the raw values.
    There are several issues to be aware of, the first is changing the scale and forgetting to change it back, or some how modifying the data to be incorrect units and not knowing it.  For this reason I'd recommend making a copy of the TDMS file to a temporary location to make the modifications to the properties, read it, then delete the temporary TDMS file when you are done.  
    This is the only way I know of to get the raw readings from a scaled TDMS channel.  
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Error reading TDMS file with inconsiste​nd dt

    Hello all,
    I would like to ask your help to understand how to read a TDMS file which I am opening and closing based on a user input.  As a result the data in the TDMS file does not have a consistent time step, which may be causing my problem, but I really don't know.  I keep getting the error 2501, that I have an invalid reference. 
    Or, if I continue and bypass the error, the extract portion VI gives me an error stating that I need to define an integer multiple of dt.
    I am not sure how to solve the first point as I have the reference wired directly to the read TDMS vi.
    I have attached a screen shot of the error and the portion of the VI with the offending error (it is the code connected to the read TDMS read vi).
    My goad is to extract a portion of the data to do calculations on and display a result to the user.
    thanks for any comments.
    A. Lopez
    Attachments:
    error-2501.JPG ‏198 KB

    I think you open multiple times the same TDMS file, you should open it before the while loop. And I don't see a close tdms function...
    Also check for errors on the open TDMS function.
    Ton
    Message Edited by TonP on 02-14-2007 07:45 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Cannot open TDM files with compiled applications

    I need to open TDM files using my EXE application, but it doesn't work in computers with only LabView Run Time installed. (It does if LabVIEW is installed, and it also does if I run my VIs). It doesn't display any error, and it doesn't extract any data.
    I've tried installing DSC Run Time as well, but it doesn't work either.
    Is this some Lisencing restriction?
    Do I need some extra installings?

    Regardless of the forum location ... make sure you have checked "NI USI" in your installer build specification.
    Herbert

  • Finding file with tomorrow's date in file name

    I have a workflow where pdf files are going through a process and they could end up in an error folder.  The files all have the day's date embedded in their names.  I would like to set up a cron job looking for files that have dropped in an error folder with tomorrow's date on them.  Looking for today's date is trivial:
    find . -name *_`date +%m%d`_*.pdf | grep "Error"
    And I have a cron job that runs after midnight looking for files and it will send me an email.  But most of the time the files have been in the Error directory for hours/days before -- how do I look for tomorrow-dated files the night before so that I can deal with them before I go to bed?
    -- edited to add:  I am running SL 10.6.8  I don't seem to have gnuDate which would let me do the --date="1 day" thingy -- or maybe it is there and I don't understand how to embed it in the find command...

    Well, once again, a whole morning of diligent searching doesn't get the answer, but the minute I hit post on the question, I find it.
    find . -name *_`date -v+1d +%m%d`_*.pdf | grep "Error"
    Well, hope this helps somebody else!

  • Load one text file with 12 periods' data into 12 different periods at once?

    Hi guys,
    In one swoop, can we load one .txt file with 12 periods of data into 12 different periods?
    The scenario:
    Budget data is required for monthly comparative reporting with actuals, so we have 12 periods in our Budget version.
    From a non-SAP system we get one .txt file containing 12 periods worth of budget data,
    - it is in the correct format (and we don't want to create risk by opening and editing it) so it is loaded into each period and the other 11 periods of irrelevant data are obviously ignored.
    Some extra tasks (such as validation, cashflow calculations) are then performed per period.
    Because this has to be repeated 12 times, this can be a time consuming process
    We now have multiperiod monitor functionality (from EHP2) and I see how it works for the automatic tasks (very well).
    I'm aware that the guide says that manual tasks will be ignored during the automatic run, this is true.
    However, if I remember correctly EC-CS used to allow it with upoad files, so i was expecting it in BCS 6.02
    - is there anyway to load a file containing 12 periods worth of data into 12 individual periods in all at once?
    (NB we still have an improvement to the previous situation, the user can scroll between periods more quickly and load the file 12 times, then go back to the start and run all auto tasks at once)..
    One thought was to use a file server location with a hardcoded filename but his would require work beyond my expertise.
    All suggestions welcome

    Hi
    I wil suggest mapping the path based on a common location is the best way and then map the same logically in the Upload method
    If you are using Citrix then it becomes all the more easy to have a commmon location
    Rgds
    Dheeraj

  • Can I save a TDM file without its TDX data?

    I have hundreds of data files that have been sorted (by date).  In certain cases, I want to analyze subsets of this data in particular groupings.  I would like to save these groupings in a TDM file but I don't want to another copy of the bulk data.  However, I notice that if I save a TDM, it automatically saves the TDX, and I'm not sure it's possible to save/open a TDM without its same-name TDX file.  Does anyone else have a similar need and/or know of a data management method that can suit my need?
    Thanks.
    Solved!
    Go to Solution.

    Hmm...  But it seems that the TDMS file simply puts all the information in a single file and, in the end, is almost as big as the TDX file.  What I'm trying to do is only save the meta data but not the bulk data, since I already have a copy of the bulk data in another set of TDM/TDX files. 
    Maybe I'm asking the wrong question.  Here is a simplified example of what I'm trying to do:
    I have several (let's say, 6) original TDM files.  Each of these original TDM files have 20 or more channels.  I've created a new TDM file, pulling out only 5 of the channels from each of the original TDM files but organizing them into 6 groups corresponding to the original 6 TDM files.  From this new TDM file, I've created a TDR file where the plots are based on the 6 channel groupings.  Due to this TDR to new TDM association, I think I need to save the new TDM.  However, that means I now have a new giant file that contains duplicate data from the original TDM files.  I don't want this duplicate data.  Being very new to DIAdem, maybe I'm just going about this the wrong way because I haven't figured out the "right way" to accomplish my needs.  Can anyone advise?

  • Lightroom export - original file with Lightroom modification data

    Hello, hello!
    I have imported a folder of, for arguments sake, some JPEGs, TIFFS, and DND photos into Lightroom, leaving the files in place, and just linking them to the Lightroom Catalogue's Library. I have then made a whole load of 'modifications' to the photos in Lightroom (the data for these modifications is stored in the Lightroom Catalogue file, right?).
    Can I now export some of the photos from Lightroom so that the file that comes out is in the same/different file format (e.g. JPEG/TIFF/DNG) and have the Lightroom modification data embedded (perhaps in the EXIF data) of the exported file? Can I then open this with a 'normal' program and have it show the original? Can I then open this with Lightroom/Photoshop (?) and it show the original with the modification data applied?
    Thanks a lot! :-))

    Can I now export some of the photos from Lightroom so that the file that comes out is in the same/different file format (e.g. JPEG/TIFF/DNG) and have the Lightroom modification data embedded (perhaps in the EXIF data) of the exported file?
    Yes, but you should not export. Just hit Ctrl/Cmd+S to Save Metadata. the metadata will be embedded into the files. Note that the actual image will not be altered. That is, if you view the jpeg in an external viewer you will not see the adjustments made in Lightroom. Only Adobe products can interpred those.
    Can I then open this with a 'normal' program and have it show the original?
    Yes.
    Can I then open this with Lightroom/Photoshop (?) and it show the original with the modification data applied?
    Yes. When you open in Photoshop and it's a non-RAW file (e.g. JPEG or TIFF), there's an option somewhere in Camera RAW to be used for opening non-RAWs. The point is, those have to pass through Camera RAW, rather than opened directly in Photoshop, for metadata to be interpreted properly.

  • Need Sample JPG Files with Valid XMP data

    Greetings,
    I Have downloaded and built the XADumper and would like to "dump" on a JPG file with some VALID XMP data.
    However, I have no application to sutff the data and no sample file that I know has something readable.
    Does anyone have some they could post?
    Even better, anybody have something working to stuff some valid data that can be used to create files -- or better use as a further code example?
    Thanks Much,
    -forrest

    Hi Marc,
    the XMP states (obviously):
    dc:format = "image/jpeg"
    xap:CreatorTool = "Adobe Photoshop CS3 Windows!"
    According to the XMP it is a JPEG file. But your file is corrupted:
    Each JPEG file has to start with a "Start of Image" tag, which is 0xFF, 0xD8.
    Regards,
    Stefan Makswit

  • How to create pdf files with text field data

    how to create pdf files with text field data

    That looks like it should work, but it doesn't.
    I opened the PDF I had created from Word in Acrobat (X Pro). Went to File > Properties. Selected "Change Settings". I then enabled "Restrict editing...", set a password, set "Printing Allowed" to "none", "Changes Allowed" to "none", and ensured that "Enable copying of text..." was disabled.
    I saved the PDF file, closed Acrobat, opened the PDF in Reader, and I was still able to select text and graphical objects.
    I reopened the PDF in Acrobat, and the document summart still shows everything as allowed. When I click on "show details" (from File > Properties) it shows the correct settings.
    Any ideas?

  • Gui_upload for csv file with numeric n date fields

    Hi ,
      i searched on net on how to use GUI_UPLOAD for csv files using split function but the spilt function requires that the data type of all fields of the internal table should be character whereas in my case there is a numeric n data field too.So kindly help me how to do it.
    One way ppl might suggest that give all the fields as char in the internal n after recieving the data in the internal convert the required fields back to data n numeric n then finally insert to the database but if i have 80 fields u would really dont want to do that as it requires precision to convert it to the same type n length as in the original database for all the fields.

    yeah i guess that would be a bit longer if i m having more no of fields (80) compared to ORACLE where this can be done in a shorter way.
    SO i shall use 2 internal tables here rite?? i mean first one(with all fields as char) for storing the split function values and the other one (with actual data types) .CAN u plz tell me how to convert or cast from one data type to another n while moving values from 1st internal table to another  which way shall i do.
    Thanks for ur help n can u suggest if there is any other method for uploading csv also other than this split method n whether this method is better n faster than others.
    THANX

Maybe you are looking for

  • Dynamic SQL and Bulk Bind... Interesting Problem !!!

    Hi Forum !! I've got a very interesting problem involving Dynamic SQL and Bulk Bind. I really Hope you guys have some suggestions for me... Table A contains a column named TX_FORMULA. There are many strings holding expressions like '.3 * 2 + 1.5' or

  • How can i delete an incomplete movie download on ipad air?

    I used the app "12 presents" that gives the user everyday a new present that is only downloadable on this very day. One of these presents was a movie track I started to download. But unfortunately my internet broke down and so the download kept incom

  • Notifications on ipad with retina display (4th gen)

    I got an ipad for christmas and when someone chats me on Facebook it doesn't pop up like on my iPod touch and the same happens with my mail it just has a little number on the top corner of the app icon. Thanks

  • Tips / Lesson Learn: Upgrading from ECC 5.0 to ECC 6.0 w/ Unicode

    Hi We are looking into moving from ECC 5.0 to ECC 6.0 w/ EP7 and doing the unicode path on as well. What are some lesson learn you guys could share in potential issue may occur in the HCM realm? We don't currently have inhouse payroll, using PU12 to

  • How to open a hyperlink in new tab from document library

    hi, I have created a Document library programmatically. Added values to columns programmatically. One of the column contains a hyperlink. I need to open a new tab when a user click on that link? How can we do it? i cant add CEWP cause there may be li