TDM vs PDM file size

I'm an old hand at LabVIEW, but new files TDM and PDM.

I turned this small piece of code in my program.  Ot VI left generates a table of waveforms about 275, each a little more than 12,000 samples.

If I put options custom WRITE IN ONE FILE to "Binary with header XML", I get an INDEX of 146 KB file and a file of 26.6 MB storage.

If I change the "Binary" option, I get a file index - 293 kb and a 53 K storage file twice!

Why?

I would expect the XML to be slightly larger, not half the size of the other version.

The first file has been moved and renamed before the second those who were written, it is not possible to join.

When / why choose bin - XML?

When / why choose bin?

Never forget this.  Apparently, in one case, I ran the thing TWICE, with the options value append.

If I erase all files and start over, the TDM version is slightly larger than the PDM, which is what I expected.

Oh!

Tags: NI Software

Similar Questions

  • Deleting a group to a TDMS file increases the file size

    Hi all

    I was searching for information on how to delete a group in a TDMS file. Apparently this is not a simple task as I thought because firstly, it is necessary to convert the TDMS file in a TOC file, remove the group from the TOC file and finally convert the TDM in PDM file. There is a sample project really nice here (I have attached it in the post anyway!).

    This project works very well. Indeed, I am able to remove the group from the PDM file. However, I realized that perform the deletion process increases the size of the file (about 4 times). If you are viewing the PDM with the PDM file - file Viewer.vi you realize that several strange properties have been added to each channel of all other groups. I assumed that this is partly the cause of the increase in size.

    Anyone know why this is happening?

    I'm using LabVIEW 2014 and I downloaded the project for 2014 LabVIEW.

    Any help is appreciated to higlhy.

    Best regards

    Diego Ballen

    The old way was to read each group that you want to save and write to a new file. The fundamental problem is that TDMS format has been optimized for speed and no memory efficiency, which can cause a lot of complications when you seemingly simple things - like the deletion of data, or reading the data of the file.

    That is why NEITHER came up with these new features. If you're stuck with an earlier version, you can always write your own function to do the same.

    Mike...

  • The decisive TDMS file size when running.

    I have a request where the .tdms file can grow very quickly, due to the amount of stored data - 7 channels of data acquisition in 50 000 samples dry.

    I want to determine when the file has reached about 2 GB and close the .tdms file and create a new one with a different/timestamp name.  I want to break these files due to portability problems.

    It is, how to determine the size of the .tdms file?  When I try to give the Sub - VI "to get the size of the file" the .tdms, a GPIB controller file path must be in error of the charge occurs.  Also, the refnum of the tdms file is not the same as the file refnums, so the Subvi "get file pointer" will not accept the PDM refnums.

    I could probably calculate somehow what is happening in the PDM file, but that seems to be a workaround and will not exact due to the header information.

    You can't get the size directly from the refnum file, but you can probably still get the size another way. Use the file/directory information of the pallet of Advanced File i/o. It takes a path as input, not a refnum. This should give a specific semi file size value, although it will be possible that there is data to cache that has not yet been emptied to the file. Yet, when you talk about the file sizes in the range of 2 GB, it should be close.

    It is roughly the same thing that I look in Windows Explorer as the TDMS file size expands as it is written.

  • new components written in tdm/PDM file not found

    Hello

    I try to record some simple thermocouple data in a file of tdm/PDM.  I run my vi and it seems to work perfectly. I use the example started get NEITHER 9213 as base and added tdms open, PDM defined properties, PDM write, and PDM closes.  I can see the data in streaming on the waveform table, but when I hit stop and pick up the saved file I can't find it.  What I am doing wrong?

    Thank you


  • Channel import from time to tiara from a PDM file

    I have a generated Labview tdms data file has the timestamp clock computer written in the file as a string. When I add this tdms file to the portal in DIAdem data it is important this time string channel, and I can't trace this as the x-axis data. I would like to import this time string of the tdms as a weather channel file easily. Is this possible?

    The work around I have found is to import the tdms file in excel, and then save as an excel file. I can then import this channel since the Excel using the Excel Import Wizard and specifying the time stamp column is a weather channel. Surely, there must be a better way.

    Thank you.

    Hi PRinOR,

    Here is a VBScript script that converts each text string "Time Stamp" in the data portal to a 'Time Stamp' datetime string.  You can run this VBScript manually whenever you load one of these TDMS files in the data portal, or we could implement to run automatically on your computer as an event of BROWSER loading custom.

    If you can convince the controller LV for a Brown wire entry datetime to the PDM file, then this new channel of data will appear as a column of values datetime correctly recognized in Excel, even if the display in Excel will be different from the datetime string in your TDMS file because Excel does not this default format (I think it's possible with a custom display Excel datetime type) display type.

    Brad Turpin
    Tiara Product Support Engineer
    National Instruments

  • PDM file with automatic backup on corrupts the data.

    When I test data stream into a file to PDM using AutoSave = true, data is corrupted in the 'package' #3 and beyond.

    I write matched double/DateTime data to a TDMS file configured as TdmsWaveformLayout.PairedTimeAndSampleChannels.

    When I try to read the PDM file, for example using the sample application to drive, I get all sorts of errors. Notably, the number of timestamps is not equal the number of samples (values y). More data is corrupted. In other words, the timestamps are invalid and the sample data is essentially random.

    This happens every time I write the third package/lot and beyond. If I write a single sample, followed by another single sample, the third will be corrupted. If I write 1 kilosample, followed by 1 kilosample, sample no. # 2001 will be corrupted.

    I guess that something is very wrong in the automatic backup routine, as data are always written correctly when I explicitly save the PDM file.

    It's using MS 8.9.0.246 in Visual Studio 2008 SP1 using .NET framework 3.5 SP1 on Windows 7.

    The TDMS file is created in the following way. Note that AutoSave is set to false to avoid the bug.

    TdmsFile f = new TdmsFile (tdmsFilename, new TdmsFileOptions (TdmsFileFormat.Version20, TdmsFileAccess.ReadWrite, true, TdmsByteOrder.Native));
    f.AutoSave = false; Must not be set to = TRUE because of a bug in Measurement Studio!

    TdmsChannelGroupCollection channelGroups = f.GetChannelGroups ();
    ChannelGroup TdmsChannelGroup = new TdmsChannelGroup (...) Unique ID...) ;
    channelGroups.Add (channelGroup);

    f.Save (); Needed when AutoRecovery is set to false.

    TdmsChannelCollection tdmsChannels = channelGroup.GetChannels ();
    foreach (IDicomInstance instance in series. Instances)
    {
    tdmsChannels.Add (new TdmsChannel (string. Format ("{0} (time) ', for example.") Signal.Name), TdmsDataType.DateTime));
    tdmsChannels.Add (new TdmsChannel (string. Format ("{0}", for example.) Signal.Name), TdmsDataType.Double));
    }
    channelGroup.WaveformLayout = TdmsWaveformLayout.PairedTimeAndSampleChannels;

    Every 10 ms, a double array [100] happens (with information in a DateTime table clock [100]). The data is stored in the file TDMS in a simple way:

    AnalogWaveform wf = AnalogWaveform. FromArray1D (sample. Data.Samples);
    WF. Timing = WaveformTiming.CreateWithIrregularInterval (sample. Data.Timing);
    WF. ChannelName = sample. Source.Name;
    WF. UnitDescription = sample. Source.UnitOfMeasurement;

    ChannelGroup = _tdmsFile.GetChannelGroup (... TdmsChannelGroup Unique ID...) ;
    TdmsChannel channel = channelGroup.GetChannel (... channel... name);
    channelGroup.AppendAnalogWaveform(channel, wf);
    channelGroup.Parent.Save (); Needed when AutoRecovery is set to false.

    This is what the TDMS file looks like in the sample player application:

    For those who can run in it before we are able to get a fix on, a viable solution is to turn off auto-save and save the TDMS file any time a change to the file is made manually, such as after adding channels or groups, or write data.  This will not negatively affect performance, because that's exactly what the property of automatic backup.

    It should also be noted that this problem arises when you use the layout of the TdmsWaveformLayout.PairedTimeAndSampleChannels waveform.

    I'll post back later when we have a fix for this problem.

    Sorry for the inconvenience that this may cause,

    NickB

    National Instruments

  • allow to create or write a PDM file with labview 2014

    Hello

    I need help. I'm new with LabView. I tried to create a PDM file, but it does not work. My code in the link below is really simple, but I don't know what the problem is. My code doesn't throw any errors so I don't know what to look for in the internet. Once my code is excuting, no file is created. I use LabView 2014 and my laptoop has windows 7 on it.  My question is, in all I need to do whenever I create a new VI of specific configurations that will be play/create/write a .tdms so that my code may work correctly because the writing in a .txt file works perfectly.

    Thank you and sorry for my English

    Hi bmtanguay,

    you want to run your VI on your cRIO9074?

    Where do you think your cRIO creates this file? A cRIO is a clean computer - and it has its own 'hard drive '. This is where your file is created: C partion on your cRIO!

    You cannot create a file on your Windows pc from a VI running on your cRIO!

  • Cannot open the PDM file with excel 2016

    Hey guys,.

    I have Office 2016, LV 2015 and (I checked my "TDM Excel Add-in" file) the Excel Add-in 2015 of CT.

    I have attached a picture of what I get when I try to open the PDM file with excel.

    So, I found something strange. I checked active supplements under the excel options and the TDM Excel Add-in is listed as inactive (and is called a COM-add-in). I tried to activate it, by checking the box (see the second picture), but that does not change. Interesting is the last line of my second attached photo:

    Translated it means: ' loading behavior: a runtime error occurred when trying to load this Add-In.

    I have 10-64 bit operating system like windows.

    Someone at - it a solution?

    Kind regards

    Slev1n


  • How to add a time stamp to a PDM file

    I need to add a time stamp to my PDM file.  Currently, I take an array of doubles, their conversion to a type of dynamic data, then send to tdms_write.  I have to add a timestamp, but I can't find a way to do it.  I also tried holding the timestamp, converting it into a doube, U64 and I64 and adding that to my table before the dynamic data conversion type, but when I lose precision.  I need to have at least millisecond resolution.  I know that I lose accuracy because the timestamp is two 64-bit values.  top 64-bit are set to seconds since the epoch and lower 64 bit are fractions of a second.  I would even send these two numbers divided in my happy tdms file and conversion at a later date, but can't seem to do it again.  Any help would be appreciated.

    The natural way would be using a waveform.

    You can add your timestamp as two U64 (using cast to array U64) as properties of the channels as data t0.

    Tone

  • ChnListBox... of another PDM file

    Hello world

    I would like to draw a waveform channel, given any string value x and value any channel there, I selected in a dialog box.

    It's pretty easy if both channels are owned by the same PDM file, as you can see in the code below (works on my computer):

    Option Explicit  ' force explicit declaration of all variables in a script.
    Dim DisplaySheet, DisplayArea, oMyCurve

    Call UserVarCompile ("WaveformPlot.VAS")
    Call SUDDlgShow ("Dlg1", "C:\Documents and Settings\All Users\Documents\National Instruments\DIAdem 11.0\Documents\WaveformPlot.SUD", NULL)

    Call View.Sheets.RemoveAll
    Dim oMySheet: Set oMySheet = View.Sheets.Add ("Sheet1")
    View.ActiveSheet.Cursor.Type = "line".
    Set DisplaySheet = View.Sheets ("sheet 1")

    Set DisplaySheet.Areas.Item = DisplayArea (1)
    DisplayArea.DisplayObjType = "CurveChart2D".
    Call View.Sheets ("sheet 1"). Areas.Item (1). DisplayObj.Curves.RemoveAll
    Set oMyCurve = DisplayArea.DisplayObj.Curves.Add (XChannel_, YChannel_)

    I created two user variables named XChannel_ and YChannel_ so that I can use in my SOUTH file.

    Everything is perfect... but I am asked to select the channels to any PDM file. The two channels selected may not belong to a same file PDM.

    I don't know how to handle that I don't think that there is a command that would allow me to use 1 channel 1 TDMS file without loading completely. Help, I have seen several methods like ChnNameGet with DataFileHeader, but none of them really treat my problem.

    I hope someone will help me.

    Thank you.

    Near Hi,.

    Let me first address the selective channel loading component of your post.  If you also want to help by the way all the information required of the SUDialog to the VBScript DIAdem, we can address that next.  For a single channel to load a data file, you must know the following information:

    Full path to the database (disk + case + name + extension)

    Name of the use to use to read this data file

    The name or Index of the channel group channel is in

    The name or Index of the string to load

    GroupRef = 'GroupName' ' OR '[1].
    ChannelRef = 'ChannelName' ' OR '[2] '.
    ChannelPath = GroupRef & "/" & ChannelRef ' ' GroupName/ChannelName' GOLD ' [1] / [2].
    Call DataFileLoadSel (DataFilePath, ChannelPath, use)

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • repair error 2503 PDM file to recover data

    Hello

    I met a system failure, while writing data to a file of PDM and subsequently can no longer access the PDM data and get "2503" code say error this file is not in line with the style of PDM file format.

    I read the forums and have seen some solutions and has tried to fix the file using other vi but the closest, I had a partial recovery with the majority of deleted data. My file must have four sets of data, tests are the first 3 and the 4th is the important data, recovery seems to delete the data in the last section, which is the important thing and the file is greatly reduced. I did this on a copy of the file so still have the original.

    Delete the index file doesn't help at all.

    I tried to copy and opening of another place that does not work.

    I opened in a file Analyzer that provides a load of code in the hexagonal section, I don't understand, but the last entry made at a reasonable time for the data collected and useful stamp.

    The data are relatively simple, different channels of the same format of an acquisition of measurement data.

    It seems that the data is always there that the file is of a reasonable size for the expected data, but I don't know how to fix and read the data, its really important to access the data, can anyone help?

    the files are attached

    Thank you

    -camm-

    There are 17 segments in the file. #1 à #15 segment are all about 'Thermocouple, Thermocouple #1, Thermocouple #2' groups and channels in them. the 16 segment #, #17 talk about "Thermocouple #3" and channels in it that you are not really worried. These 2 segments stored only metadata about them. If everything went right, it should be a #18 segment that needs to store the raw data on it for «Thermocouple #3» channels And this segment should begin at offset 0xCA000. But there is no such segment. The data offset 0xCA000 is not follow the format of the PDM. Analysis all data after 0xCA000, it is not even a piece of bytes corresponding to the format of the header of PDM. All data after 0xCA000 looks like spilled invalid souvenirs in the file when the system crashed. And it decreases the size of the watched file "reasonable."

    The conclusion is that the raw data for "Thermocouple #3" had not been recorded in the file.

  • simultaneous reading and writing on a PDM file

    I found similar discussions on here, but none that satisfied my problem. I'm running several loops within a vi, which writes data in a permanently .tdms file. Another loop to finish its task from the start in a test, and I want to transition this loop so that it accesses the file writing and started writing on a network. It also enables me to check that the data is being stored in the file and that it is corrupt.

    I started with just the basics, but when I pass the second loop to read the file that is is always written off mistakes, saying that she met at the end of the file. It does if I put the count 1, -1 or anything in between. It illuminates, however, the end of the file output.

    I have the entry in the file tdms on PDM read wired to a local variable, just as I do writing PDM, they all have both read the same thing and I get an iterations of a data value of the reading, so, apparently, file access is no problem. And I have to someone who cringed to local variables, ensure that reading and writing are not activated until the local variable is updated.

    Try to set the "group name" entry on «TDMS read» If you write more than one group, you can use "View the contents of the DDHN" in order to get a list of groups.

    Herbert

  • How to increment a PDM file name

    Hello

    I have a vi that register data in a PDM file. So I'm using tdms open file and write to the file of PDM. In addition, I want to increment the file name. The user must write the name of the file, for example if the file is named test I want to the next file is called test1, test2, etc.. Now, if I forgot to change the file, simply replace automatically and I lose all my saved data.

    Can you help me to get an easy method to save the data in the file with the incremented automatically name please.

    Thank you

    Hi Nico_AT

    Maybe what your are looking for? The just VI tries to start the file. Is there no mistake it will be close and start the following and so on.

    Concerning

    Tobias

  • Internal error of screw, PDM file storage

    I use LabView 8.5.1, DAQmx 9.0.2. and a module OR USB6216.

    I have set up on my request a task as follows: 15 channels activated with a sampling rate of 1sample/10 s (very slow). My purchase has to work for a few days or more.

    Sometimes, I get the error "Internal storage screw" (code - 2500). so I can't read my file TDMS (see attached file) and I can't deal with my data.

    You know the exact meaning of this error on the case of a PDM file. Yo have a solution to process my data?

    Best regards, Daniel.

    This tdms.dll was released with LabVIEW 2010. TDMS.dll is backwards compatible, it means that you can still use this dll with LV 8.5.

    You can right-click on tdms.dll and choose "details" to see the version.

  • End of the file has detected the error for more than one column of a PDM file playback

    Hello fans of LabVIEW,.

    I write the data in several columns of a PDM file. After that, I would like to read the data in each column to treat it.

    writing data works without any problem, if I get a PDM file with say 4 columns of data. When I try to read these columns now, LabVIEW always gives me error 4 "end of file" for all but a PDM read functions. Regardless of the number of columns I've read or how big they are, its still the same. LabVIEW reads a column and gives the error for all other tdms read functions.

    Does anyone has an idea how to solve this problem?

    A picture of my VI and the error is attached.

    Pls find attached extract

Maybe you are looking for

  • Custom mail photo

    Mail now shows my picture of ident of computers. How can I remove or place it with my initials? Thank you

  • "In Windows Live Hotmail why I can't", answer, to, BCC, CC ' contacts? All I can do is enter addresses manually and type a message.

    "Why I can't,' come in, to, BCC, CC ' contacts?  All I can do is enter addresses manually and type a message.  When I try to "convey, or answer ' previous mail is not displayed.  I get a blank page in the format.  McAfee security has been removed and

  • Visio 2013

    I can't activate.  I get a "" server temporarily unavailable"message and it is never available.

  • VPN router Cisco 2611XM VPN client

    I have 2611XM router on a Central site with two FastEthernet interfaces? XA; (FastEthernet0/0 and FastEtherne0/1). FE0/0 has private ip address?xa;192.168.1.1/24 and it connects on LAN 192.168.1.0/24. FE0/1A public? XA; address x.x.x.x/30 and his con

  • Nodes political foreclosure

    Hi allI have a problem on a stretched production cluster, running node 2 RAC Oracle 11 GR 2 located in two different sites.The problem we face is, node 1 of the cluster on site 1 lost the external connectivity on both private and public interconnecti