From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spectral Analysis from TDMS

Solved!
Go to solution

Hello Smiley Very Happy

 

I got measurments from my mic in the TDMS file, and now I have to load it in other program and do a Spectral Analysis. 

Program must be easy to build, I did something but when I try to run program, it shows me error. 

 

Can anyone see what is wrong?

 

ps. I don't know how to choose from that to which the sample program to do the analysis.

 

Sorry for my bad English. 

 

Thank you very much

Jurij

0 Kudos
Message 1 of 19
(3,159 Views)

Please post your data file also.  Without your data we cannot tell what is happening. You may need to change the file extension to attach the data file.  If the file is large, please try to make a smaller one which shows the problem.

 

What error do you get? The exact error message may help determine the problem.  Be as specific as possible in describing what is not working as you expect.

 

Lynn

0 Kudos
Message 2 of 19
(3,151 Views)

 I want to make my program do a spectral analysis on the first chart and to display on the second chart dependence volts from time.

Here is my tdms file - http://www.speedyshare.com/vswuy/ZSXD.tdms (0.5 MB) It's just a sample 🙂

 

I loaded my error also.

 

Thank You

0 Kudos
Message 3 of 19
(3,101 Views)

Ok I've got the solution 🙂 Read Measurmets should be not in While Loop, and everythin is ok 🙂

 

I just don't know how to make to program choose from that to which the sample program to do the analysis. For example - sampling has 5000 samples and i want to do analysis from sample 3000 to 3500.

0 Kudos
Message 4 of 19
(3,091 Views)
Solution
Accepted by topic author Jurij

You can attach the files directly here. Just change the .tdms extension to .txt or add the .txt extension: ZSXD.tdms.txt

 

By getting rid of the Dynamic Data Type (also called the evil Dynamic Data Type (DDT) by some experienced LV users) you can use straightforward data manipulation functions to get what you want.

 

The attached VI shows one possibility. I replaced the Read From Measurement File Express VI with the TDMS Open, TDMS Read, and TDMS Close functions. The Read function returns an array of waveforms rather than the DDT. Your file onlyhas one waveform in the array. Inside the loop I used WDT Get Waveform Subset.vi to select a portion of the waveform. I replaced the Spectral Measurements Express VI (and more DDT) with FFT Spectrum (Mag-Phase).vi and the Statistics Express VI with RMS.vi and some primitives. The Event structure causes the while loop to only iterate when you change the index controls or press the Stop button. The timeout shift register allows the loop to run one time at startup and after that only when a control is changed. Your original progam spins the loop as fast as it can read the file whether anything changed or not.

 

Lynn

Message 5 of 19
(3,076 Views)

I don't know what to say 🙂 

I'am suprised and schocked that you spent your time to help me.

Everything looks really clear for me,

thank you very much 🙂

0 Kudos
Message 6 of 19
(3,064 Views)

It did not take much time. Many of us who participate in the Forums help for several reasons: We were new at this once and someone helped us. We often learn something ourselves by helping. And by helping newcomers learn to use LV effectively, NI will keep selling it so it is available for us to use.

 

Lynn

0 Kudos
Message 7 of 19
(3,059 Views)

Maybe it did not take you a lot of time, but I'm very grateful. Really.

 

Taking the opportunity, perhaps you have a good example of a modal analysis software?
The TDMS which I get from a modal hammer and an accelerometer I've got to load in program and do a modal analysis.

I do not want you to think that I hope that you will do me the program, just ask if you had no contact with this once and maybe you got some materialas which will be useful for me 🙂

0 Kudos
Message 8 of 19
(3,054 Views)

I have not done modal analysis.  I suggest you start a new thread asking for help with that.

 

Lynn

0 Kudos
Message 9 of 19
(3,052 Views)

Ok, I did it 🙂 

 

Thank you one more time for specetral analysis

0 Kudos
Message 10 of 19
(3,035 Views)