02-27-2014 11:06 AM
Does anyone know if there is a TDMS Create Linear Scaling Info method in Measurement Studio? It appears that Labview and LabWindows/CVI has this functionality but Measurement Studio does not. I would like this feature for storing data in TDMS format from other sources besides NI hardware. It allows the original unscaled data to be stored with scale information.
Perhaps this might be added to Measurement Studio in a future upgrade?
02-28-2014 01:22 PM
I'm not aware of any method to do this. I think that compared other binary file types this is the biggest weakness of TDMS. There is no standard way of doing things. You can add any properties to a channel that you need. However, there is only a very limited number of known properties and they aren't described very well. I found this page (http://www.ni.com/white-paper/14252/en/) that shows some best practices but it doesn't have very many fixed or defined properties.
For your case it might be helpful to attach a property to each channel that defines a conversion type (None, Linear, Polynomial, Interpolation Table). Maybe you call that property ConversionType. Then you could have a set of well know properties for each conversion type that you would read. For example Linear would have two properties, Scale (m) and Offset (b). This would work great for your specific use case. Anyone else reading your file would need to see and understand the meaning of the custom properties before they could implement code to use them.
I think NI should go out of their way to make a set of well known properties that everyone could use. The list should be publicly available like the examples in the article I linked to. Here are some properties from that article ( I think the case of the characters is not correct but they might not be case sensitive. I haven't tried it).
| Name | Example | Required? | Description |
| Wf_XName | Time | Required | Name of the x-axis quantity |
| Wf_XUnit_String | s | Required | Unit of the x-axis quantity |
| Wf_Start_Offset | 0 | Required | Start offset value of the x-axis |
| Wf_Increment | 0.001 | Required | Increment value of the x-axis |
| Wf_StartTime | Optional | Start DateTime value of the time axis | |
| Wf_Samples | Optional | Number of values of the x-axis |
02-28-2014 01:27 PM
Looking at the NI assemblies available for TDMS, there doesn't seem to be a Scale TDMS Data method included in Measurement Studio. You could always incorporate a scale manually instead. You can also add your idea to the NI Idea Exchange forum by following the link below:
http://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas
Regards,
Brandon V.
Applications Engineer
National Instruments
03-03-2014 08:43 AM - edited 03-03-2014 08:56 AM
Thanks for checking. The NI created scales will automatically scale the data when reading using TDMS libraries/dlls. Manually creating the properties using TDMS methods does not work (data is not automatically scaled when reading) unless I manipulate the TDMS file at a binary level to match the structure of files made with the Advanced Scaling methods.
I added the idea to the idea exchange here: