LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need helo in FFT writing file

Hi, 

I am trying to do open loop system where can generate a signal continuously to actuate the motor and measuring signal continuously as well. However, I have faced problem in writing the date of FFt in the file where after running the code the error appeared as can be shown th attached file. I have attached the VI file. If you help me I will be eternally grateful.

 

Khalid

 

Download All
0 Kudos
Message 1 of 9
(3,613 Views)

any help would be appreciated .Smiley Very Happy

0 Kudos
Message 2 of 9
(3,585 Views)

Pass the data you read with the Analog read to another loop through a queue with a producer/consumer architecture.  Do the FFT calculations and the write to measurement file there so it doesn't slow down the DAQ loop.

0 Kudos
Message 3 of 9
(3,571 Views)

Dear Ravens Fan,

 

I have done what you have mentioned. However, the type of file is TDMS. How I change the file to Excel or LVM.

 

I have attached my VI.

 

Khalid

0 Kudos
Message 4 of 9
(3,566 Views)

You are the one that replaced the Write to Measurement File in you first VI. Why did you replace it if you didn't want to use the Write to Binary File?

0 Kudos
Message 5 of 9
(3,564 Views)

HI Dennis,

 

Actually, when I tried to connect the DAQ mx Read (Analog Wfm 1Chan NSamp) to Enqueue Element give me an error (you have connected two terminals of different types. The type of the source is waveform (DBL)). Therefore, I have changed the DAQ mx Read  to (Analog 1 D Wfm NChan NSamp). 

 

Khalid

 

0 Kudos
Message 6 of 9
(3,559 Views)

The VI you attached doesn't show a wiring problem.

 

Do you have the problem in a different version of your VI?

 

If so, you just need to make sure that the datatype you wire into the Obtain Queue matches the wire you sent into the Enqueue Element.

0 Kudos
Message 7 of 9
(3,536 Views)

Hi RavensFan and Dennis,

 

I have done what you mentioned. I have question in regards of writting the FFt in file . In the file what I got after executing the code, there is a time column and the amplitude column . the time that is written in the first column represent what?
Also, how i write the frequence instead of writing the time in this column ?

 

Khalid

0 Kudos
Message 8 of 9
(3,510 Views)

You've converted the magnitude cluster to a 1D array. The data saved is then going to be a little strange since you are not using the expected format for dynamic data and the Write to Measurement File. Since I seldom use the Express VIs, I am unsure how to get the correct labels in the file. If you had converted to a waveform data type, the file would report f0 as t0 and df as dt. The time and magnitude columns would be correct as far as data - just label differences. Start with converting the magnitude cluster to a waveform data type with the Build Waveform and go from there.

0 Kudos
Message 9 of 9
(3,495 Views)