LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

construct a signal from saved amplitude &time values in excel sheet

 

hi

 

i have an excel sheet consisting of signal amplitudes as shown in below example with respect to their time,please tell me how to construct a signal from them.i am attaching my saved signal excel file

 

eg:        time    amplitude 

 

              712    0.0424805

              713    0.0297852

                to       to

             1800  0.000283

    

0 Kudos
Message 1 of 11
(3,350 Views)

Hello illa,

 

your task has two main parts: reading the file and outputting the signal.

 

The easiest way to read the file is to use the Scan from File VI.

First you have to save your Excel sheet to Text (Tab delimited) format, and you have to delete the first line that contains the labels. The resulting file can be read by the Scan from File VI.

Please see my attached example.

About generating an analog signal you can find a lot of well documented examples in the Example Finder (Help menu -> Find examples). Search for the keyword 'analog output'.

 

Daniel

Dániel Fülöp
Field Application Engineer (CLA, CTA)
National Instruments
Message 2 of 11
(3,346 Views)

thank you for your reply, i  converted to text file and tried with READ FROM TEXT example but i couldnt get the graph.i am attaching my saved text file please provide me a solution

 

 

0 Kudos
Message 3 of 11
(3,336 Views)

If you have that kind of file format all you need to use is the Read From Spreadsheet File. You didn't say what kind of graph you wanted, so I just used an XY graph since I didn't know if the data was always going to be evenly spaced.

 

Message 4 of 11
(3,330 Views)

the waveform you got is the one exactly  i want,but i couldnt find the VI which is conncetd form Read from spreadsheet file, is it an insert in to array,( i rounded it in the attachement)

 

actually my aim is to plot FFT and power spectrum from then plotted grqph 

0 Kudos
Message 5 of 11
(3,299 Views)

My picture is a Snippet. You can drag and drop it onto a block diagram. For reference, that's Index Array.

 

Have you done some LabVIEW tutorials? To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. There are also several Technical Resources. You can also take the online courses for free.

0 Kudos
Message 6 of 11
(3,285 Views)

thank you very much,i am able to display the grap.i need one help from you i want to caluclate the power spectrum of the signal and FFT of the signal is it

possible. from past 9 months i am working mainly Compact RIO configuration and signal acquisition.i never used these file functions.

0 Kudos
Message 7 of 11
(3,280 Views)

LabVIEW has FFT and Power Spectrum functions. You will need to specify some parameters, such as the FFT window. The functions are available in the Signal Processing -> Spectral and Signal Processing -> Transforms palettes. There are also Express VI version if you really want to use those, but I don't think you'll need to. If you open the Example Finder and search for FFT, for example, you will find a number of examples.

0 Kudos
Message 8 of 11
(3,276 Views)

i am able to do display the graph but i am unable to proceed to FFT i have given my VI in the attached 

 

please help me regarding that error 

0 Kudos
Message 9 of 11
(3,255 Views)

I don't use Express VIs, so I didn't know that somewhere along the way the Spectral Measurements Express VI changed its "Signals" input from dynamic data to the waveform datatype. You need to take your array of values and put them as the Y component of the waveform datatype. The waveform datatype consists of 4 components: starting time, delta time, array of values, and attributes. You can create a waveform datatype using the Build Waveform function. See attached example.

 

Alternatively, you can use the FFT VI that's in the Signal Processing -> Transforms palette.

Message 10 of 11
(3,234 Views)