Editing String in.TDM file

With Set Properties it is possible to add one or more strings to a .TDM file (or is it to another file that is linked to the .TDM file?). Similarly it is possible to read that string with Get Properties.
My current impossibilities are:
- If each measurement is appended to the preceding measurement how do I read a record that is not the last one saved?
- If one or more strings has to be edited how can the modification replace only the affected strings? This implies a Read VI that is also capable to Write (replace).
I am not finding much information on this file format and would appreciate knowledgeable insight.
Regards,

TDM = 2 Files
The Storage VIs create a .TDM file (XML-based, for descriptive properties) and a .TDX file (binary, contains waveform / array data).
One or many channel groups
Each measurement can be appended to a file as a new channel group, or the values can be appended to channels that were stored earlier (resulting in one channel group per file). Use the "Always create new channel group/channel" switch to decide which way of appending data you want to use. You might want to use the "Data viewer" example shipping with LabVIEW to have a look at the hierarchy of channel groups and channels.
Note that when appending values to a channel, "Write Data" uses the channel name to find the right channel to append data to.
Get and set properties on particular channel groups
To modify data on a particular channel group, you need to obtain a "storage refnum (channel group)" to this channel group. There are two ways of doing that:
- Use "Read Data", configured to object type "channel group". The "channel groups" output will give you the array of refnums you need (the attached VI shows how to obtain and use these refnums).
- Wire the "storage refnum (file)" that comes out of "Open Storage" to "Get Properties". The "channel groups" property will be an array of all channel group refnums in your file (the "Write channel groups" and "Read channel groups" examples shipping with LabVIEW show how to do that).
"Read Data" should be used if you want to apply a query condition or if you are e.g. looking up channels across channel groups. "Get Properties" can give you all channel groups in the order they were stored in, or e.g. all channels of a particular group.
"Read Data" and "Set Properties"
"Set Properties" will replace all properties that you have selected and that show up on the block diagram as terminals. All other properties remain unchanged. The properties will be written only to the one file, channel group or channel that the incoming refnum refers to. "Read Data" doesn't write anything by itself, but you can use the output refnums of "Read data" to apply "Set Properties" to whatever you have read.
Attachments:
GetAndSetPropertiesInTdmFile.vi ‏115 KB

Similar Messages

  • How does DIADEM import TDMS files? How gets every channel his number and groupindex? How can I determine which channel has which groupindex and number?

    I store different channels in a TDMS file.
    I like to have a time channel at the first position with group index 1 and number 1.
    When I read the TDMS file with DIADEM the time channel (Float64) is on a differernt position, and the channels are not sorted alphabetically.
    Here are my questions:
    How does DIADEM import TDMS files?
    How gets every channel his number and groupindex?
    How can I determine which channel has which groupindex and number?
    Best regards
    Joerg

    Hi Jörg,
    i suppose that you´re programme whose create the *.tdms file is writing on false position. Try to create datas with timechannel on first indes in diadem, then save it and then open it again. you see that all is correct. So please tell me what programm in what version do you use and please attache it here.
    Did you use the library for creating *.tdms files like in the link ?
    http://zone.ni.com/devzone/cda/tut/p/id/6471
    Here you find the gtdms_8.x.zip - when you extract it and opened the *.llb you find vi´s for all functions e.g. writing 2d array of strings to *.tdms file
    when you open the subvi´s then you see how created and writing datas/structure to *.tdms files. Because *.tdms is binary you can´t see structure with open it in editor.
    When you don´t have Labview you can use the 30 days test of current version 8.5 under following link
    german version download link
    https://lumen.ni.com/nicif/d/lveval/content.xhtml
    english version download link
    https://lumen.ni.com/nicif/us/lveval/content.xhtml
    Hope it helps
    Best Regards

  • .tdm file storage vi's slow editing vi's

    I am developing software using Labview 8.5 and have recently added some file storage vi's for the .tdm format for use in DIAdem 10.2.  Upon using the open storage, set file properties, write channel group, write channel, and close storage vi's, the editing has become extremely slow - for any operation I try to perform there is a 10-15seconds delay before it occurs.  If I remove the .tdm vi's from my diagram then the editing goes back to normal and changes/operations occur almost instantaneously as expected.  My project is not large as far as I am concerned (Front panel - 121k, block diagram=1538k, code=0.2k, data=957k, total=2617k, total vi size on disk=389k)
    I saw a similar post to the .tdm storage vi's causing this to occur back in 2005 and was supposed to have  been on the fix list but it does not appear that it has 3 years later.  I am sure many others are using these vi's so not sure what I may have done differently to cause the editing to slow down so much.  
    Anyone with ideas and fix would be greatly appreciated as I cannot afford to sit around 10-15 seconds for every step of my developement.

    Yes, sometimes Storage VIs are slow. But They are Express VIs, supplying the easy configuration for users. If you feel they are too slow, I suggest that you can use TDMS files instead.

  • Date of a tdm file set in LabVIEW not showing up in diadem

    Hi.
    I 've got a problem with the date string in Labview. If I set a property of a tdm file by using the diadem connectivity vi the datestring only consist of three "-" in the diadem file portal. I'm using the time stamp vi and connecting its exit with the express vi "set property". What did I wrong?
    (Sorry for my English)

    Hi Brad.
    Thanks for the code. It worked so far, but this isn't what I had in mind. The Express VI "set property" within the Diadem Connectivity VIs has a connection named "time stamp", which can be used to set the date for a tdm file by connecting the Labview VI "time stamp" with it. If I load or save a file in LabVIEW, everything works fine, it's only Diadem, which doesn't recognize the date or time. I need the date, when the tdm file was created, for the first page of a test record. The variable "DataSetDate" returns only "---".
    Thanks a lot,
    AndreasMessage Edited by Andreas on 04-01-2005 02:05 AM
    Message Edited by Andreas on 04-01-2005 02:12 AM

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

  • How do I select more then one channel to view in tdms file viewer graph panel

    I have a TDMS file that I can view with the labview 2013 TDMS file viewer and I can select one signal out of 15 signals to view on the graph panel. however I would like be able to look at 2 or 3 signals
    on the same graph but can't seem to be able to select more then one signal at a time. Is there a way to select more then one to view?  

    I've modified the TDMS viewer in the past to allow selecting multple channels.  It's a little bit of a pain because the tree control in the viewer only allows you to select one item.  You have to edit the tree to allow multiple items.  Now your selection is an array instead of a scalar.  This means the rest of the code has to be updated, and the references to the tree in subVIs need to be updated.  Not impossible but it takes some time.  Alternativly open it in Excel with the free add-in then you can select the two columns you want and insert a graph.  Not as simple for the user but using Excel, which users should be familiar with might mean users need less training on data files.
    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.

  • Tdms-files: Is it possible to prevent LabVIEW and DIAdem from creating .tdms_index files?

    Hello,
    is it possible to prevent LabVIEW and DIAdem from creating .tdms_index files when opening/creating/editing a .tdms file?
    I think I have no benefit from the .tdms_index files because our applications create a lot of little .tdms-files (repeat measurements). With the additional .tdms_index files we have unnecessary memory consumption and it takes longer for Windows to open the containing folder. Also it´s confusing when searching for a certain file.
    Best Regards
    Daniel
    Solved!
    Go to Solution.

    Hi Baui,
    I'm afraid there's a direct way to disable creating .tdms_index file now from LabVIEW and DIAdem. You can use TDMS Advacend API in LabVIEW, which doesn't create any index file, or you can just make some simple programming and delete the .tdms_index file after closing the TDMS file. 
    This is a request for a long time, we'll consider to add this feature for TDMS in future releases.
    Yongqing Ye
    NI R&D

  • 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

  • TDMS File Creates Multiple Tabs of Data. Want to create only one.

    Hello NI Community,
    I am currently using the DAQ Assistant with my string pots to record displacement over a long interval of time (see attached VI). I am then using the "Write To Measurement File" vi to save the data into a TDMS file (see the "Write to File Settings" picture attached for all settings chosen for file write). The file is being written, however when I open the TDMS file, the document creates a tab in Excel for every second of data recorded (please see the attached "). It looks like the TDMS file is grouping all the data from each second together and then creating a new group of data.
    How do I get the file to write all the data onto a single tab instead of creating multiple? I do not want to have to concatenate hundreds of tabs into a single excel sheet.
    Thanks,
    Chris
    Solved!
    Go to Solution.
    Attachments:
    Write to File Settings.PNG ‏40 KB
    TDMS File Multiple Tabs.PNG ‏57 KB
    TDMSWrite.vi ‏108 KB

    You should not be using the comment.  I just removed that and it all worked for me.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Reading TDMS files in Matlab

    I am trying to read TDMS files directly into Matlab using the NI  nilibddc.dll. I have read most of the posts on here but still have a problem...
    Within Matlab I can open and read a file and get the data but I cant find anything that tells me what the sample interval (between samples) is for a particular file. I guess its in the header somewhere but how do I access it?
    I cant find anything that tells what function to use to get it from the header.
    In fact i cant find anyhting that tells me what the functions are in the DLL.
    I tried opening the CHM help file, this has a list of all the functions but when you click on one in the contents it reports 'the address is not valid'. It seems the link is borken somehow in the help file (this is on XP)!
    any help gratefully receieved!
    mike

    hi mike,
    if your data is stored in form of waveforms, this information can be retrieved from the channel:
    Entity
    Property
    Data type
    Description
    tdm_channel
    wf_xname
    string
    Name of the x-channel of the waveform
    tdm_channel
    wf_xunit_string
    string
    Unit text of the x-channel
    tdm_channel
    wf_start_time
    time
    Time stamp for the waveform
    tdm_channel
    wf_start_offset
    double
    Starting offset (to be added to the time stamp)
    tdm_channel
    wf_increment
    double
    Increment
    tdm_channel
    wf_samples
    long
    Number of samples in one shot (needed by LabVIEW when concatenating
    more consecutive shots). This property is used by DIAdem and DataFinder to decide whether the tdm_channel is a waveform (wf_samples > 0) or not (wf_samples = 0, or not existing).
    tdm_channel
    wf_time_pref
    string
    (enum: "absolute" or "relative") Additional information for LabVIEW to
    determine if the x-channel is treated as time (absolute) or as index
    (relative). (not available in LVM)

  • How do you save arrays in tdm files?

    Hi,
    As part of a university project I am trying to save some program data to a .tdm file.  On each channel I wanted a number of different types of data including an analogue wave form and a couple of 1-D DBL arrays.  I have found an NI presentation that says that you can store arrays in them but dont seem to be having any luck.  Any ideas what Im doing wrong?  I am using labview 8.5.
    Regards,
    James

    Hi James,
    in a channel, you can save only one array as data. If you want to save more arrays then use several channels. You can organize them in groups. If the arrays must be in the same channel, then convert them to a spreadsheet string (in string palette) and save the string as a property.
    Greetings,
    shb

  • How to send TDMS file using TCP/IP

    Hi,
    I'm working with a cRIO-9025, chassis cRIO-9118 and NI 9239 module.
    I've done an acquisition (voltage) where data is in 1D Wfm SGL. I've saved this data using a TDMS file, but now I want to send this file to an other computer (in this case mine) because the file is stored in the target. To do that I've implemented this example:
    http://zone.ni.com/devzone/cda/epd/p/id/2842#0requirements
    The problem is that the tdms file is created but it hasn't any data. I attach the image of the program. The program is done in other project (not which I use to make acq) to make it easy and then implement it when it works.
    *The name file in the client is not used because I had a conflict with path.
    What I'm looking for is make an acquisition of 10 minutes every 30 minutes and then send this data to an other computer (or others). I'm not sure if it's the best way, maybe is better to send data at the same time as the acquisition is being done, but my theacher told me that is easier if I send the file when acquisition has finished. To make acq I use FPGA and RT.
    I would appreciate your help. Thanks!!
    Solved!
    Go to Solution.

    I believe the FTP VIs are built into LabVIEW 2011SP1 - I have the VI present, but I could have installed the internet toolkit (don't know).
    Look in the following location:   Function Palette -> Connectivity -> Internet -> FTP
    You're really looking for the VI named, "FTP Get File.vi".  What this VI does is contacts an FTP server and requests a file from it.  If your files are on the target, and you know the filename that will be created (such as files created in a sequence) you can request the file from the target and have them copied to the local machine (Windows).  RT cannot "push" files to the Windows side unless you have an FTP server (like FileZilla Server) running on the Windows host.
    It's a very simple one-VI solution.  You specify host (the IP Address of the target you're pulling files from), the remote path for the file (for instance if the file is located in c:\ni-rt\data\myfile.zip then that's what you put as the remote path of the file), the local path for the file (where you want the file copied to, along with the name of the file, such as c:\mydir\myfile.zip), the username to log into the FTP server with (default is 'anonymous') and the password to use (default is an empty string).  The importan thing to note is whether to use a binary transfer or not - if the file is a text file, no binary transfer needed; if the file is a binary file then you get better results using a binary transfer - I prefer to always use binary transfers, as non-binary transfers actually "interpret" and "convert" text information in the files.
    -Danny

  • Time stamp to name a TDMS file

    Hi:
    I am using data from excel files to create a time stamp, after that,my VI creates TDMS files with this data in files with 5000 samples, also I am using time stamp to named the TDMS files, but my problem is that my first file takes the name 180000.000, How can I modify this? because I need my file´s name will be the first data from excel.
    I attached my VI and two excel files, the idea is that the first file will be 84327.500 and the second will be 84740.950
    Attachments:
    test1.xlsx ‏150 KB
    test2.xlsx ‏151 KB
    testfile.vi ‏56 KB

    First, let me congratulate you on taking your first steps to learning LabVIEW. If you have not already done it, I highly recommend you go through the online tutorials. You have an actual project to work on, so application of what you learn will be fairly immediate.
    For your actual program issue, you need to read the data from the Excel file and convert it to a timestamp before you set your filename. The order of operation of your program is to set the TDMS file name while simulataneously reading from the Excel file. After you have already created the TDMS file, you convert the data to a timestamp and write this to your timestamp front panel control. Note that the first point you write to the TDMS file may or may not be what you think it is. It could easily be the same 180000.000 value you are using to name the TDMS file. You have what is known as a race condition. The order of operation between the read and write of the timestamp control is not known and can be variable. It is one of the reasons that you should NEVER use local variables to pass data around. Use wires. In LabVIEW, wires are the data and take the place of variables in a text base language. Front panel controls should be used only for user interace reasons. In your loop, you should wire the timestamp from its current conversion (wired into the timestamp on the front panel) directly to the TDMS write (currently wired from a local variable of timestamp).
    A couple of other things. You do not need to convert your data arrays to matrices to index them. This can be done directly with Index Array from the array palette. This single primitive will replace the Array Subset, convert to matrix, and index matrix primitives.
    You do not need to go through a string conversion to produce a timestamp. The Date/Time to Seconds primitive in the timing palette will do it directly. You will need to populate the cluster input.
    When you posted your code, you did not include your subVIs. In the future, include all your VIs, either separately or in a ZIP file.
    Finally, to solve your intial problem, use Index Array to pull the first row of data from the Excel file, then convert this to a timestamp using Date/Time to Seconds. Use this to create your TDMS file.
    You may have noticed, if you do all this, you do not need your timestamp front panel control, other than as a simple monitor.
    Good luck! Welcome to LabVIEW.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Can I unzip the .ipa file and edit the application.xml file

    I want to modify the below info to also have an additional string value of 2, which somewhere along the line tells something somewhere that the app can run on the ipad. Is there some info in the compiled application that will error out if I modify this document?
    <InfoAdditions>
    - <![CDATA[ <key>UIDeviceFamily</key><array><string>1</string></array> ]]>
    </InfoAdditions>
    into this
    <InfoAdditions>
    - <![CDATA[ <key>UIDeviceFamily</key><array><string>1</string><string>2</string></array> ]]>
    </InfoAdditions>

    you can change the file extension to zip, unzip it, find the application.xml file in one of the subdirectories, edit it, rezip the files, change the file extension to ipa and install.

  • How to write Date/Time property of tdms file

    On the root page of the tdms file, there is a built-in property called "Date/Time" in the first row.
    I would like to use it to save the time stamp when the tdms file is created. But in the help file,
    I only find the following property constant. So, how can I write to the "Date/Time" property field?
    Property
    Constant
    Data Type
    Name
    TDMS_FILE_NAME
    String (char *)
    Description
    TDMS_FILE_DESCRIPTION
    String (char *)
    Title
    TDMS_FILE_TITLE
    String (char *)
    Author
    TDMS_FILE_AUTHOR
    String (char *)
    Thanks for any idea or suggestion.
    Solved!
    Go to Solution.

    Not sure if this is exactly what you want, but have you tried this?
    CVIAbsoluteTime CVItime, *t = NULL;
    TDMSFileHandle deH = 0;
    // Create TDMS file and set some properties
    errChk (TDMS_CreateFileEx (file, TDMS_Streaming2_0, TDMS_ByteOrderNative, 0,"example.tdm", "someText", "title", "author", &deH));
    GetCurrentCVIAbsoluteTime (&CVItime);
    errChk (TDMS_SetFileProperty (deH, "Date/Time", TDMS_Timestamp, CVItime));
    // Save and close file
    errChk (TDMS_SaveFile (deH));
    TDMS_CloseFile (deH);
    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?

Maybe you are looking for