06-27-2012 11:59 AM
Hi,
Does anybody know how to save a Power Spectral Density to a TDMS file or should I be saving it to a different file type? I'm getting the 'Polymorphic terminal cannot accept this data type' when I try to wire the output to a TDMS Write.
Thank you,
Dan
06-27-2012 08:18 PM
typedef enum {
tdsTypeVoid,
tdsTypeI8,
tdsTypeI16,
tdsTypeI32,
tdsTypeI64,
tdsTypeU8,
tdsTypeU16,
tdsTypeU32,
tdsTypeU64,
tdsTypeSingleFloat,
tdsTypeDoubleFloat,
tdsTypeExtendedFloat,
tdsTypeSingleFloatWithUnit=0x19,
tdsTypeDoubleFloatWithUnit,
tdsTypeExtendedFloatWithUnit,
tdsTypeString=0x20,
tdsTypeBoolean=0x21,
tdsTypeTimeStamp=0x44,
tdsTypeDAQmxRawData=0xFFFFFFFF
} tdsDataType;
Above are the data types supported by TDMS.
06-28-2012 05:51 AM
Hi Donners,
I believe the power spectral density is a cluster of doubles. You could probably use an unbundle by name function and write the double values to a TDMS file.
I hope that helps.
Kind Regards,
06-28-2012 07:22 AM
Hi Laurence,
It's an array of clusters, so I'm gonna have to look for another way of saving it.
Cheers
06-28-2012 07:38 AM
Hi Donners,
Would it not be possible to use an auto-indexing FOR loop to unbundle the individual elements before placing them back in an array for writing to a TDMS file? I have attached a VI which will do this.
06-29-2012 12:01 PM
Cheers Laurance,
That's something I'd never have thought of. Is there any reason you choose TDMS format version 1?
07-03-2012 07:32 AM
Hi Donner,
There was no particular reason format 1.0 was chosen. To save time creating the example I reused one of LabVIEW's example code for writing TDMS files which had that file format chosen. If you want to find out more about the file formats the following page is very good:
http://www.ni.com/white-paper/5696/en
Kind Regards,
07-04-2012 07:41 AM
Hi Laurence,
How did you get it to auto-index at the input tunnel to the for loop? The option is greyed out for me.
Thanks
07-04-2012 07:48 AM - edited 07-04-2012 07:54 AM
This is what I'm talking about.....
07-04-2012 08:45 AM
Hi Donners,
Are you sure it is actually an array of clusters that you get from your express VI? You can check this by hovering over the wire with context help up. The reason I ask is that you would not be able to unbundle the wire if it were an array and it seems from your picture that the wire connects without indexing.
Kind Regards,