03-06-2013 04:18 AM
Hi everybody,
I want to write a TDMS file that includes NOVALUES. Because of different datatypes for different channels these NOVALUES also have different definitions. In the former DAT format it is possible to specify the value that is used as NOVALUE in each channelheader. But for TDMS I only found the property “novaluekey” which tells if the channel contains NOVALUES or not. Unfortunately I don't get anything from the TDMS file format internal structure documentation or DIAdem Help.
So how can I set the NOVALUE definition in the TDMS file format? I want to write this file on my own and read it with DIAdem 2012.
And in addition: is there any documentation on the properties that can be interpreted by DIAdem (e.g. DIAdem can read the scaling properties that are only mentioned in the context of LabVIEW)?
Thanks
Cynthia
03-06-2013 09:06 AM
Hi Cynthia,
TDMS supports channel values being set to NoValue using the IEEE denormals for SGL (Float32) and DBL (Float64) data types. In LabVIEW, you can write a NoValue to a data channel by writing a "NaN" real number. You just plop down a DBL or SGL constant and type in "NaN" instead of 3.14 or any other real number. Then wire that orange "NaN" constant to an element in an array and send that array to a channel in the TDMS file.
On the property reading front, use any of the IEEE standard integer and real number data type, plus string and date/time. You'll need to also make sure to name the property with only letters (A-Z), numbers (0-9) and the underscore character ("_"), and you can't start the name with a number.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-06-2013 10:00 AM
Hi Brad,
so am I right that - except for float and double types - it is not possible to use NOVALUES with the TDMS file format (concerning DIAdem)?
Regards
Cynthia
03-06-2013 11:06 AM
Yes you are right. There is no Novalue replacement value for other datatypes.
Even DIAdem does no longer use those DAT mechanisms but stores a flag for each invalid value in TDM format.
So there is no Value that is interpreted as a NaN in a Int16 channel available in TDMS.
03-07-2013 02:43 AM
So this means that if I want to use TDMS with NOVALUES I have to write e.g. a new property or separate “external flag channels” like in TDM or something similar on my own. And if I want DIAdem to interpret this correctly I could e.g. write a script that supports my new changes. But I don't understand why the property “novaluekey” is supported by TDMS although it cannot be used in the way TDM and DAT do this. Can anybody tell me about the reasons / background?
03-07-2013 03:56 AM
The property "novaluekey" is a property that DIAdem uses to remember some things about a channel.
If data is loaded DIAdem checks the existence of some properties.
Minimum, Maximum, Monotony, Novalues
If one of this properties is missing they are calculated.
This is done for report generation. To efficiently plot a graph the algorithms can significantly speed up if it is known that there are no NOVALUES in a channel. So if you load a int16 channel from TDMS the property will always result in FALSE.
03-12-2013 06:29 PM
Hi Cynthia,
The "NoValueKey" channel property tracks whether there are any IEEE NaN, -infinity, +infinity values in the SGL or DBL array of values for that channel on disk. This is important to know when you want to graph that channel as quickly as possible, along with the other three (minimum, maximum, monotony).
Again, TDMS supports NoValues for DBL and SGL channels using the IEEE denormal bitsets, but it offers nothing for channels with any other data types.
Brad Turpin
DIAdem Product Support Engineer
National Instruments.