Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Reading Files Written by the TDMHW VIs

Primary Software: LabVIEW Development Systems>>LabVIEW Full Development System
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software: DIAdem

Problem:
I have created a TDM file by using the TDM Header Writer Example VIs (linked below). When I try to open this file in LabVIEW using the Open Data Storage VI, the VI returns error -2558, LabVIEW cannot open the data storage file. If I wire a "read-only" constant into the function input of the Open Data Storage VI, I do not get an error. Can I edit files created by the TDMHW VIs?

Solution:
TDM files use Universal Storage Interface (USI) technology. There are two ways to store data in TDM files: end-to-end and interleaved (also known as block). In end-to-end files, data from each channel is stored continuously as shown in the table below.

Channel 1, Sample 1
Channel 1, Sample 2
Channel 1, Sample 3
Channel 2, Sample 1
Channel 2, Sample 2
Channel 2, Sample 3


In interleaved, or block, TDM files, data from different channels are interleaved together as shown in the table below.

Channel 1, Sample 1
Channel 2, Sample 1
Channel 1, Sample 2
Channel 2, Sample 2
Channel 1, Sample 3
Channel 2, Sample 3


The TDM Header Writer VIs, which are used to stream data quickly to file, typically create interleaved TDM files. Interleaved TDM files are read-only to USI (you must have USI 1.1.1 to read them at all) because you cannot guarantee a consistent channel setup. Therefore, LabVIEW, DIAdem, and CVI can only open files created by the TDMHW VIs read-only. End-to-end data can be edited using USI so end-to-end files can be opened in edit mode by National Instruments software.

USI 1.1.1 installs with LabVIEW 8 or later, or DIAdem SP2 or later. If you need to upgrade your USI version to 1.1.1, an easy way to do so is by installing the DIAdem Service Pack 2 from the Drivers and Updates link below.



Related Links:
Developer Zone Tutorial: Introduction to the LabVIEW TDM Header Writer VIs
Developer Zone Example Program: LabVIEW TDM Header Writer VIs
Drivers and Updates: DIAdem

Attachments:





Report Date: 10/26/2005
Last Updated: 08/03/2007
Document ID: 3QPCJQOA

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit