TDM header

Ich habe einige Fragen zum Header.
Ich möchte ein Programm in MATLAB umschreiben. Dieses konnte DIADEM 8 Daten in MATLAB einlesen. Im neuen DIADEM 9 wird jedoch ein anderes Speicherformat verwendet.  Soweit ich den neuen Header entziffern kann, wird im Bereich <usi:include> die Datenlänge-, typ, offset,.. angegeben. In diesem Bereich sind jedoch mehr Datenblöcke als DIADEM Kanäle aufgelistet. Einige dieser Blöcke enthalten anscheinend die Daten aus den Kanälen  andere werden als <flags external=...> verwendet.
Was bedeutet <flags external=...>? Wie erkenne ich, wo im tdx file meine Daten sind?

Hallo Alexander,
die Dokumentation zum TDM Dateiformat ist in der Hilfe zu DIAdem 10.0 beschrieben.
Im Abschnitt 'Include Block' <usi:include> werden die Massendaten in der TDX-Datei definiert - Datentyp, Offset...
Die Verbindung des Kanals mit den Kanalwerten (Massendaten des Kanals) erfolgt in der ValueSequence der zugehörigen 'LocalColumns'. Dabei werden die Werte mit <values external="inc0"/> definiert . 'inc0' verweist dabei auf einen gleichnamigen Eintrag im Include Block.
Sind einige der Werte eines Kanals ungültig -NOVALUES- so wird dies durch sogenannte 'flags' signalisiert. Dabei handelt es sich um einen Vektor von Flaggen in dem gültige Werte mit '15' gekennzeichnet sind. Diese Flaggen werden ebenfalls in der TDX-Datei abgelegt. Somit erfolgt die definition analog zu den Werten mit <flags external='inc1'/>

Similar Messages

  • Using the TDM Header Writer VI's

    I'm using the TDM Header Writer VI's to create a .TDM file for a binary file created during a test.  However, when I attempt to view the .TDM file in DIAdem, none of the data or header info is present.  The icon for the .TDM file in the navigation view of DIAdem is a "?".  If I open the .TDM file in notepad, the header information is all there.  I am not receiving any errors from the header writer VI's during execution either.   When I probe the refnum created by Create TDM File.vi, I get an invalid refnum, but everything still seems to work.   Any help would be appreciated.

    Hey John,
    Have you tried creating a TDM with the examples that came with those VIs and opening the new TDM in DIAdem? If so then what is the result? Here's the link again just in case. There are some examples in the Examples folder and the TdmHW Examples.llb
    Regards
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • TDM Header Writer C API: Newer version available?

    Hello support team,
    we are using in our software the library "nilibddc.dll" for importing TDM data. The library "niTdmHW1_0.dll" is used to export data into the TDM data format. Now, our requirement is to support text channels. The library "niTdmHW1_0.dll" does not support the "STRING" data type but various numeric data types and cyclic channels (implicit). On the other hand, the library "nilibddc.dll" supports the data type "STRING" but only a few numeric data types (UINT8, INT16, INT32, FLOAT and DOUBLE).
    Our export must support the following data types:
    INT8
    INT16
    INT32
    INT64
    UINT8
    UINT16
    UINT32
    UINT64
    FLOAT
    DOUBLE
    STRING
    Impilict channel
    What is the best way to solve our problem? Maybe, it exists a newer version of the library "niTdmHW1_0.dll" which supports creating text channels?!
    Thank you very much for your help.
    Best regards,
    Henrik

    No, the values are not limited. The value count is free and each value of the channel can differ. The character count can be either fixed or non fixed.
    For example:
    0s -> "Test1"
    1,5s -> "Test2"
    5s -> "Hello"
    The text channel should be some kind of a marker channel (event-oriented).  Its appropriate time channel is not cyclic.

  • TDM/TDMS Java Interface?

    Hello there, has anyone developed an interface in Java that can read TDM and TDMS files?  From all the googling and poking around on NI's site, my gut feeling is no, but I just wanted to ask anyway just to be sure. I see there is a Java Header Writer (http://zone.ni.com/devzone/cda/epd/p/id/6280), existing questions about external interfaces (http://digital.ni.com/public.nsf/allkb/A3663DE39D6A2C5A86257204005C11CA), and pre-existing C and Excel readers, but I can't see any mention of a Java API for reading these files.
    If there isn't, I'm just looking for a confirmation that there isn't, and whether or not one might be developed in the future.  If there isn't, how are other people solving this problem?  Using JNI with the C library to get TDM(S) data into Java apps?  
    Thank you kindly for your support.
    Derek
    PS: I didn't know where to post this as I did not see a separate TDM category. Thanks.
    Solved!
    Go to Solution.

    Here is a post of "TDM Header Writer Java API":
    http://zone.ni.com/devzone/cda/epd/p/id/6280
    If there's no available API for reading, then it seems you have to make your own API based on the file formats, for TDMS, the file format structure is here:
    http://zone.ni.com/devzone/cda/tut/p/id/5696
    Message Edited by YongqingYe on 12-06-2009 07:55 PM

  • TDMS digital data

    Hello,
    we are developing datalogging system for our customer and we need to save analog and digital data to TDMS file. There is probably no problem with analog data streaming. But on the other side writing digital data inside TDMS file looks like a problem... So we tried to use background streaming (DAQmx Logging) where size of file is acceptable (8xDI(1B) x 512samples + TDMS header). But we need to log analog and digital data with timestamp channel so we can not use DAQmx background streaming instead we must program our application. When we used TDMS write for digital waveform, digital data result in TDMS viewer and DIAdem is OK but file size is (8x1B for each digital channel). We also look at TDMS by DAQmx logging where internal file structure (attached file  tdms_tsdata.png) contains parameter NI_DigitalLine which is bit in data byte index (i think). Another parameter is NI_DataType = 5 (UInt8). From these two params I deduced some ideas and do some tests with unsatysfying results. Only one of tested ways was to write direct UInt8 of DI (entire port) to ensure file size ... 8xDI=1B x samples. However those TDMS can not be correctly read by TDMS Viewer as structure of digital inputs but only as number.
    Is there any chance to write manually and effectively digital data in TDMS file (like DAQmx logging)?
    Thank you in advance for any hint.
    Michal.
    Attachments:
    tdms_tsdata.png ‏40 KB

    Hi kel072,
    You are right, you can not write just as one  byte and expect Diadem, or TDMS file viewer to interpret directly as 8 lines boolean data.
    This is an expected behavior because there is no information about the number of lines.
    Therefore, I have two suggestions:
    1. You can build your custom TDMS file viewer (pack your data as u8 bit, transfer it into the TDMS file and later build your own VI that will read from TDMS, reconstruct the data in boolean 1D array and display the data). In this scenario, Diadem will still not be able to interpret them as 1 bit data.
    2. Write your data to a binary file in the format you specify. Then you can read it directly in LV or any other programming language that supports that format, or you can build a data plugin for Diadem that will allow it to interpret the data in the particular way you want ( and use it for your application). This method requires the most programming but gives you the most flexibility (packing data, display in Diadem, display in LabVIEW etc).
    Check the links bellow for more information on the data plugin:
    1. http://www.ni.com/white-paper/13803/en/
    2. http://www.ni.com/example/29822/en/

  • TDM vi's work in Admin account, but not Limited user

    I have an app that I wrote using the TDM VIs that works perfectly in the development environment and as an executable in an Admin account in WindowsXP. I am trying to deploy the app for use in a limited user account, and I am getting an error about an unrecognized file type. Is there a way to enable this functionality?
    The VI is used to create a file map of a custom TDM file that was created using the TDM header writer VIs. I've included the VI and the executable in the archive, as well as a sample file to read (select the .tdm, not the .bin in the path control when running the program).
    The actual error text is:
    Error -2564 occurred at Open Storage
    Possible reason(s):
    LabVIEW: The software installed on this computer does not support the file format you requested. The Storage VIs access files through plug-in libraries LabVIEW and DIAdem install. Visit ni.com to download the library you need.
    Thanks,
    Chris
    Attachments:
    cTDM Map Test.zip ‏868 KB

    The TDMS VIs probably are better, but I started this project before they were available, and I spent a considerable amount of time with the TDM Header Writer VIs to create my file format. I don't use the TDM VIs to write the files; I do that all with my own binary format that is fast and efficient. I also stripped out all the extraneous gunk that the TDM files like to put in, and customized the files with my own properties. Unfortunately, I am disappointed with the time necessary to read and write properties, but it's too late now to replace the whole system with a database backend.
    Anyway, I'm hopeful that there is a solution to this problem. I doublechecked all the options in the installer and app build specifications, and I didn't see the checkbox for Storage VI Support. I have a fuzzy memory of this; is it possible that it existed in a previous version of the builder?
    Chris

  • Running Activate Database Views activity in parallel in TDMS 4.0

    Hello Colleagues,
    We are running TDMS4.0 and as we need to hasten the process, we would like to ask if the activity ACTIVATION OF DATABASE VIEWS can run in parallel with activity DATA SELECTION START  FOR TDMS HEADER TABLE? In the guided procedure, the ACTIVATION OF DATABASE VIEWS is dependent on the completion of DATA DELETION START IN RECEIVER SYSTEMS (which is already completed as per screenshot)
    As per searching other KBA's database views are activated that may be de-activated after drop of tables in the receiver system. Which was why the prerequisite of this is completion of DATA DELETION START IN RECEIVER SYSTEMS.
    Thus, we would like to know if the activity ACTIVATION OF DATABASE VIEWS can run in parallel with activity DATA SELECTION START  FOR TDMS HEADER TABLE? Kindly see screenshot
    Many thanks,
    Meinard

    Hello Meinard,
    Yes, you can start activity "Activation of data base views" in parallel to activity "Data selection start for TDMS header tables". Once activation of database views is completed you can start "Data Transfer" activity.
    Thanks
    Anita

  • Can't un-write protect TDM files

    I am using the storage VIs to manipulate a TDM file that was created using the TDM header writer API. When I try to do any operations on it (specifically, deleting a channel), i get error -2561 "Data storage is write-protected.". I have checked the permissions on the file and they should be correct.
    I ran some tests and found that i can create a TDM file using the storage VIs and delete a channel without any issues. According to LabVIEW, the file created using this method has the same permissions of the problem file.
    Do you think this could be a bug with the TDM header writer VIs? Or am i missing something obvious?
    I have attached  files showcasing the issue.
    Thanks in advance for any help.
    Attachments:
    TDM test.zip ‏131 KB

    Bazookazuz-
    The standard is described in the Developer Zone described above.  TDM files are binary files written such that it follows a particular pattern.  That way the data can be easily retrieved and interpreted later.  It is written in the fashion to save disk space and to be created/modified quickly.  All TDM files acquiring data from multiple channels follow the same format alternating between each channel taking each sample (also described in the Developer Zone article).  By converting the data to End-to-End, it makes all the data for each channel together. 
    In order to distinguish between the modified and unmodified tdm files, there is no way to just look at the file type and know without a naming scheme.  Programmatically, you can parse out the first few data sets and see if they are the same channel and then you can determine from there. 
    Regards,
    Mike S
    NI AE

  • How to configure tdms advanced read

    Hi
    I am trying to read a tdms file using advanced TDMS VIs to get a faster reading speed but when I disable the system buffering then I get error -2544 which says that "the array sizes and file positions must be integer multiple of the disk sector size". My disk's sector size is 512 and I am using a buffer of 256 samples with I16 data type which is an integer multiple of the sector size. I have attached the code snippet.
    If I use the example VI "TDMS Advanced - Finite Asynchronously Read.vi" it works fine with the file created for the example VI but it doesn't work with my file which has data in I16 format. I am also attaching the example VI.
    What could be the reason? please help me out
    thanks!
    Mani
    Solved!
    Go to Solution.
    Attachments:
    TDMS Asynchronous Read.png ‏48 KB
    TDMS Advanced - Finite Asynchronously Read.vi ‏22 KB

    According to error -2544, either array sizes or file positions is not disk sector size aligned. In your case, since the error is thrown by "Set Next Read Position", probably the target file position is not disk sector size aligned. Is your TDMS file created by TDMS Standard API or Advanced API ? In the latter case, each TDMS head (which contains meta information) is 4K aligned thus easily to set to a sector size aligned position. If it's created by "TDMS File Write", the sample position you want to read from is probably not sector aligned, thus returns error -2544.

  • TDM Block mode for Diadem 9.1

    I create TDM- Headers with the "TDM Header Writer C API". When I run the example "Single-Channel Binary File"everthing is allright, but when I run the example "Multiple Binary Files" I can't see my data in Diadem. The length of the channel is 0. I use Diadem 9.1.
    Where is my problem?

    Hi ccabek,
    DIAdem, LabVIEW and CVI sit on top of a data management layer called the Universal Storage Interface (USI).  The C library you are using creates only the TDM header file, but does not provide the USI layer with which this TDM file can be read.  USI is installed by each of these 3 host applications, and the most recent version of USI always wins and always stays on the computer (even if the installing application is uninstalled).  There is a similar api to the one you are using with LabVIEW wrapper VIs, and each VI has a little documentation attached to it-- here's an excerpt from the VI that declares a block of interleaved binary values:
    Note that interleaved (Block) channels described in a TDM file will only load correctly in LabVIEW or DIAdem when USI version 1.1.1.2245 or later is installed (LabVIEW 8.0, DIAdem 9.1 SP2, or later versions).
    Note that interleaved (Block) channels with "Block Length (# samples)" = 0 in a TDM file will only load correctly in LabVIEW or DIAdem when USI version 1.2 or later is installed (LabVIEW 8.0, DIAdem 10.0, or later versions.)
    In short, a TDM header which declares an interleaved binary block requires that DIAdem 9.1 with SP2 is installed, which you can get from the site:
    http://digital.ni.com/softlib.nsf/websearch/E1DEFED2895BF62086256FBF004AB6FE?opendocument&node=13207...
    Note that the SP2 will force you to uninstall DIAdem 9.1 before installing SP2.  Despite the SP2 name, it really is a full DIAdem installation.
    Finally, if you really are declaring BlockLength = 0, you will need DIAdem 10.0 or later.  You can always install the evaluation version of DIAdem 10.0, then uninstall it, and you will retain the newer USI version.
    That should help,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Error 6210 using TDMS C DLL

    Hi,
    I am trying to read a TDMS file using TDMS C DLL in visual studio 2012. I am getting the following error message. Error 6210 : The file passed to library is read only and cannot be modified, when I try to open the file using DDC_Openfile.The program I used is TDMSTesting.zip downloaded from this link
    http://forums.ni.com/t5/LabWindows-CVI/TDMS-DLL/td-p/792269
     The sample code given in the Zip file is properly running with the testtdms.tdms available in the file but I am getting the error 6210 with any other tdms files generated from labview.
    It would be of great help if anyone could help me to resolve this and I have attached the sample tdms file which I used to run the code.
    Thank you
    Padma Priya

    If you want to export to tdms
    pszFileName = "C:\out.tdms"
    use "TDMS" as file type.
    If you want to export TDM
    pszFileName = "C:\out.tdm"
    use "TDM".
    If you are looking for a simple way to export to tdm
    http://zone.ni.com/devzone/cda/tut/p/id/2824
    may be a solution for you. It has the capability to
    write a tdm header to an existing binary file given in
    a specified format (one header/one dll but TDM export only).
    P.S.: What error code did you get?
      Did a logfile appear?
      What do you mean by DIAdem error?

  • 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

  • Storage solutions using TDM

    Hello,
    the TDM format looks very promising. However I couldnt yet find in-depth information at the NI website for best practices and solutions. For example, what is the best way to store 2D data (x- and y-array)? In particular if I need to store several 2D data sets in one file. Store the arrays of each 2D set together in a group? Is it possible to build sub-groups like this:
    [tdm-root]
    [measurement1]
    [xy1]
    waveform1
    waveform2
    [/xy1]
    [xy2]
    waveform1
    waveform2
    [/xy2]
    [/measurement1]
    [measurement2]
    [xy1]
    [/measurement2]
    [/tdm-root]
    Is there a way to store arbitrary scalar values in the properties of a group? With respect to the above structure, store sensor data and othter info that applies to all waveforms in the group in the properties of [measurement1],[measurement2]? The wizzard vi's seems to allow only 3 str values...
    I would appreciate any hints and tips on this topic. Maybe I missed some important part of the documentation?
    thanks
    klaus

    Hello Klaus,
     sorry but, but your example doesn’t work. It’s only possible to have 3
    hierarchies in the TDM-format. These are the Root, Group, and Channel
    hierarchies.
    You should use for every array a separate group, but you can implement 2
    channels in one group.
    I’ve some interesting links for you:
     NI TDM Data Format
    http://zone.ni.com/devzone/conceptd.nsf/webmain/8F​07969FB2FA71C1862570DF006B0190?opendocument&node=5​050_US
    ntroduction to the LabVIEW TDM Header Writer VIs
    http://zone.ni.com/devzone/conceptd.nsf/webmain/11​7CB3D512ED96928625707B004DC4E9

  • Script commands for data header manipulation eg. HDLoad / HDSave / FileHDComment(n)

    I'm using the header manipulation commands extensively on DIAdem DAT files, these commands seems to not work with TDM files.
    What are the equivalent commands for manipulation the TDM header?

    Hi Sabcat,
    What I have done to get similar functionality is to register-load the data set and used the standard DIAdem variables such as ChnName, ChnComment to read off the attributes from the registered channels, instead of out of the TDM header.  File registration is available for TDM files and all other files which have a DataPlugin and is almost always instantaneous, because all it does is read the header info into the DataPortal-- not the data values themselves.  The command to programmatically register-load a data file is:
    Call DataFileLoad("FilePath", "TDM", "Register")
    Ask if you have further questions,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Select a Vi to acquire, save and read continuous analog voltage

    Hi,
    i'd like to get a Vi to acquire a continuous voltage in a chart or graph to measure a load cell. I would like to save it in binary format (ASCII) or DIadem format and then to be able to display and use it in Diadem.
    I have already tried lots of vis but it is not easy to find one that can do all those functions.
    At the momemt I am using the Continuous Acq&Graph Voltage-Int Clk and I mixed it with other vis to be able to save it in a binary file. So at the moment I can save it witout errors if the samples number, the frequency rate and the loop time are not too high.
    But I have sometimes errors and I don't know how to read this saved file in LabView or Diadem.
    In Labview the VI that normally read binary file (graph or chart) doesn't read my chart...?
    Attachments:
    Continuous data acquired (diagram).jpg ‏162 KB

    Hi Intern2005,
    For continuous streaming, I would recommend to create the binary data file yourself with the standard LabVIEW file I/O VIs, then create a header file to describe the binary file that you've streamed.  Here you have the choice of a TDM header file or a DAT header file.  The DAT header file approach requires downloading the LabVIEW-DIAdem Connectivity VIs:
    http://digital.ni.com/softlib.nsf/websearch/5121C7F322C9392886256EDF005BB4FF?opendocument&node=13206...
    The TDM header approach requires using a new set of TDM header VIs wrapped around a C++ DLL, which you can not yet download, but which I'm providing below.
    Both approaches are wrapped up in the ZIP file below, with examples, and both approaches are 100% readable by DIAdem.
    Ask if you have questions,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    TdmHW.zip ‏1246 KB

Maybe you are looking for

  • How do I set up my time capsule with my PC and BT home hub

    Hi, I really need help. I have a new time machine I am having trouble setting up. I have a BT Home Hub that I have hard wired to the TC to the WAN port. I have Connected my PC to the Ethernet port. The PC will not find the TC. I also need to Wi-Fi at

  • 1 LISTENER 2 DATABASES

    Dear legends, I have a doubt that if i work on single DB with single Listener it works fine.. but after that i created another DB using the same listener.. Now what's the prob is in EM i can access both the DB's but while in case of CMD am listening

  • XFI: Problems with channelrouting after THX Se

    Hi, i?ve got a problem with XFi, hope somebody can help. Hardware: XFi Fatality, Asus A8N SLI Premium Board (Bios .0), Win XP prof., 2 GB RAM, all the latest Patches and Drivers for all Hard- and Software. System runs great without any problems. A 7.

  • IOS has suddenly decided to download hundreds of messages

    It's just streaming downloading messages going back into last summer in groups of 250 messages. Have no idea what it's doing or why. They all seem to be from a GoDaddy POP account. I have 489 unread messages, and it's just started another 250 batch.

  • Can I upgrade from 10.3.9 to 10.4?

    I have a iBook G4 933MHz 256 SDRAM can I upgrade to 10.4? What problems might I encounter?