LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting data Please Help

Solved!
Go to solution

This is what I am trying to do. I have a  file periodic_chan3.bin which is sampled values from three channels of periodic waveforms in interleaved format. The data is stored in binary format in DBL (double procession floating point long) and big endian representation. I am trying to read the file and plot all three waveforms on one waveform graph. The data were recorded starting at time zero with a sampling frequency of 100 samples per second. Then I scale the X axis of your waveform graph so it displays time in seconds.

 

So, on the wave from graph I am trying to create three sets of cursors and have the Y cursors display the mean value of each of the three waveforms. The color of the Y cursor for the mean of a given signal should match the display color of that waveform on the graph. For example if the graph of the signal is  displayed in red the Y cursor displaying the mean of that signal should be red.

 

So what happens when I do open the file I see a white mesh outline of a sine graph, a square graph, and a sawtooth graph. I can't seem to get to plot all the three waveforms seen clearly with the three distinct colors mentioned above. I can't seem to sort it properly and represented it like mentioned above.

 

I would also like some help with calculating the mean or expected of each of the three periodic waveforms.

 

Attached are the files please help. Pgm4 is the VI and periodic_chan3 contains the data that needs to be sorted.  I would greatly appreciate if somene were able to fix the and submit the changes so I can see how it works. Thanks.

 

Edit: I am getting an error that says periodic_chan4.bin "does not have a valid extension for an attachment" so I am not able to uplad it. Is there any othe way I could upload it?

 

 

0 Kudos
Message 1 of 3
(2,447 Views)
Solution
Accepted by topic author Xtasy26

Xtasy26,

 

In your post you mention that you are trying to display 3 waveform averages, however your code is showing that you are disseminating 4 values. This could be the reason why your getting the various forms of data. Instead of getting an array of all waveform 1, then an array of all waveform 2, and an array of waveform 3, you may be getting a mix of all three in each of your waveforms. 

 

To calculate a running average or mean there is actually a built in to the example finder in LV its called 'Calculating Running Avereage.vi"

You may also want to check out the attachment to see Multiple Channel waveforms displayed on a single graph. 

Sam S
Applications Engineer
National Instruments
Message 2 of 3
(2,405 Views)

Thank you. That was indeed the problem. I appreciate you talking the time to help.

0 Kudos
Message 3 of 3
(2,366 Views)