LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS write improper Data Type

TDMS write doesn't appear to be stable in terms of setting the data type of the channel.  See the attached VI.  In this VI, Channel1 will usually (And I've seen it change from run to run) dt_long.  That doesn't sound correct as I'm writing U16.  Regardless, channel 2 should also be the same data type.  But it comes out as dt_double, even though I'm writing U16!

 

I'm looking at data type via the Excel plugin.

 

I've tried this on my RT and Windows system.  Both behave the same.

 

Is this a known problem (With a work around hopefully)?  I am trying to get a cluster array written out to TDMS as a set of channels for each cluster element with the correct data types.

 

Thanks,

 

XL600

0 Kudos
Message 1 of 6
(3,535 Views)

A bit more experimentation and this looks to be a issue in the Excel TDMS viewer.  If I write all the data types to a TDMS file, then read back their data types, this is what it looks like:

 Test_TDMS_Write_Excel_vs_LV.jpg

 

I'm using the latest version 15.0.0.  The listed types map roughly to standard Excel data type names.  It appears the intent was to identify the Excel type rather than the TDMS type.  Can someone at NI please write a white paper or update the user guide on the add-in?  How it maps data types, deals with time stamps, etc.. etc..?

 

Message 2 of 6
(3,504 Views)

Thanks for the kudo!

 

On this same topic, is there an NI provided type cross reference vi that will reliably map the data type provided by the variant information vi to the corresponding tdms NI_DataType seen above and vice versa?  It's easy enough to make one, but that may not work in follow on labview versions if the type enums change (which they have before, especially in the labview 7 to 8 days).

 

Thanks,

 

XL600

0 Kudos
Message 3 of 6
(3,478 Views)

The help file has a complete list of "Type Codes" under the heading "Type Descriptors" for each data type.  an easy search of the help will answer that.

 

Of Note: and, a point you might be missing, is that the TDMS import add-on converts LabVIEW Data Types to Excel data types.  The Excel file DT_xxxxx fields apear to be the import wizards output data type (Excel Data type) not the source (LabVIEW) Data types.


"Should be" isn't "Is" -Jay
Message 4 of 6
(3,470 Views)

@JÞB wrote:

The help file has a complete list of "Type Codes" under the heading "Type Descriptors" for each data type.  an easy search of the help will answer that.

 

Of Note: and, a point you might be missing, is that the TDMS import add-on converts LabVIEW Data Types to Excel data types.  The Excel file DT_xxxxx fields apear to be the import wizards output data type (Excel Data type) not the source (LabVIEW) Data types.



Hi Jeff,

the only problem I have is the mismatch between the help file and the actual code of NI:

According to the help the Type Code for string is 30 and when reading it using the TDMS function "Get Properties" I am getting 20 - and - the type code for time stamp comes out to be 44 which I do not find anywhere in the help.

 

Herbert

(using LV 2014)

0 Kudos
Message 5 of 6
(3,182 Views)

Hi Herbert

I guess you refer to this help

http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/type_descriptors/

 

could you attach the code or a screenshot of what you are getting?

0 Kudos
Message 6 of 6
(3,167 Views)