03-06-2014 03:30 PM
Hello,
I am trying to create a noise source in multisim, so I decided to create a source from a file. The problem is that the file has to be in tdm format, which I cannot seem to get. Any help would be appreciated!
03-06-2014 04:35 PM
You can create a DataPlugin (see ni.com/dataplugins or use the DIAdem DataPlugin Wizard) to read your txt file. Then use the "Convert to TDM or TDMS VI" from the Storage/Dacan taPlugin VIs Palette to convert the file to TDM.
OR
You can try to make an LVM file out of your txt file (see LVM spec) by adding an LVM header on top and use a LVM source instead (please consider changing seperators accordingly, please note Delta_X (see red marks)):
LabVIEW Measurement
Writer_Version 2
Reader_Version 2
Separator Tab
Decimal_Separator ,
Multi_Headings Yes
X_Columns No
Time_Pref Relative
Operator operator
Date 2014/03/06
Time 16:21:54,0805568695068359375
***End_of_Header***
Channels 1
Samples 100
Date 2014/03/06
Time 16:21:54,0805568695068359375
X_Dimension Time
X0 0,0000000000000000E+0
Delta_X 0,001000
***End_of_Header***
X_Value Sine Comment
0,000000
0,063418
0,126580
0,189233
03-18-2014 09:45 AM
I think doing the LVM is easier then, thank you. Once I add the header to the top of my text file, how could I convert that file to lvm format?
03-18-2014 10:20 AM
I wrote a vi to convert my comma delimited oscilloscope data and then plot. You should be able to modify it for any delimiter you choose from within the Read From Measurement File Express VI.
03-18-2014 03:25 PM
Thanks that really helped and I got the right result on the scope. For some reason, however, when I upload the tdms file to the tdms source on multisim, it is not outputting the same thing as it is on labview. Could you help me out with that?
03-18-2014 09:42 PM
Sorry, my mistake. I just noticed you were looking to convert to .tdm. My vi converts text file to .tdms file (purely binary data). Your application requires a .tdm file which has an xml header (from my understanding anyway). This is almost certainly the reason for the discrepancy. I don't have the vi in front of me, but I will see if I can easily modify the vi to output .tdm when i get back to the office tomorrow.