LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data acquisition and online time/frequency visualization

Hi, I am reading a serial data stream from serial port. This stream contains 9 channels data at 10 kHz sampling rate. I am trying to visualize these data at 1 second refresh rate and at the same time compute the Power Spectral Density on Line. Before the visualization I convert the 24 bitsdata stream to int32, and I play with the array to extract one specific channel's data. This section works. The problem is that the script first acquires the data (for example 5 secconds) and only after shows the 1 s by 1 s update of the time and frequency plot. I am not an expert of Labiview, but I hope that posting my script I can get some suggestions. Please find my script attached. Tom
0 Kudos
Message 1 of 4
(2,191 Views)
0 Kudos
Message 2 of 4
(2,190 Views)

Hi Tom,

 

can you disable the spectrum function for testing? Does the same behavior occure?

As a second step, set a breakpoint before the build waveform vi. and watch the time. Does the vi gets the delay untill it reaches the breakpoint?

 

Let me know,

 

 

Regards,

 

Philipp

 

Application Engineer

NI Germany

0 Kudos
Message 3 of 4
(2,179 Views)

Problem solved. The two functions that I used to divide string acquisition and data conversion needed to be rearranged in a different way.

The old file exectues the string acquisition loop and only after the all data is acquired starts the conversion, writing and visualization.

 

This new file really executes all the steps in a 1 second loop step!!

 

Thanks anyway!

0 Kudos
Message 4 of 4
(2,176 Views)