05-28-2019 11:46 PM
Good day. I have vibration data in txt format. The problem is for each second there are about 4 data points. For example, for 0 seconds, the amplitudes are -0.897,-0.9191,-0.891,1.021. I want to pull out only the first data for each second into an array. How I should do that in labview?
05-29-2019 12:01 AM
How is the data arranged in the file? If you have one row per second, load the entire file into a 2D array with four columns, then get the first column using "index array". Check the help on how to wire it up.
05-29-2019 12:34 AM
please refer to the picture.
i want to extract from 0s, 0.0001s, 0.0002s....1s... i want labview to read and extract only first data for each second..how to make it using for loop
05-29-2019 01:57 AM
05-29-2019 03:03 AM
So you want to keep all rows where the value in the first column is different from the previous row? This is not every second, but every small fraction of a second.
All you need is a FOR loop, a shift register, and a conditional indexing output tunnel.
Where does the data come from? Is the first column guaranteed to be nondescending? Are you sure adjacent similar values are truly equal or do you need to protect from potential issues comparing floating point values?
It is important to fully define the problem and so far you have not.
If you have LabVIEW 2019, you could make a simple solution using a map.
05-29-2019 06:28 AM
Can you attach a vi? I think that I know what you have, but the vi would verify that and provide better opportunity for help.
05-29-2019 03:03 PM
Are you specifically interested in the instantaneous measurement each second, or are you more interested in the average? You could read every fourth measurement, or you could average the values of each group of four. The latter approach would exhibit less apparent noise.
05-29-2019 04:35 PM
Since all four measurements have the same timestamp, l am assuming that you have four sensors. If not, please explain the experiment in more details.
05-29-2019 09:20 PM - edited 05-29-2019 09:23 PM
0 1.05601 to 0 1.05601
0 0.98198 0.0001 0.87057
0 0.947786 0.0002 0.315342
0 0.925151
0.0001 0.87057
0.0001 0.801475
0.0001 0.699657
0.0001 0.603108
0.0001 0.534849
0.0001 0.440993
0.0002 0.315342
0.0002 0.206156
from this input array (left), i want to get the output like this right array. take first data for each second..
remarks:
first column is seconds, right column is amplitude
05-29-2019 09:22 PM
0 1.05601 to 0 1.05601
0 0.98198 0.0001 0.87057
0 0.947786 0.0002 0.315342
0 0.925151
0.0001 0.87057
0.0001 0.801475
0.0001 0.699657
0.0001 0.603108
0.0001 0.534849
0.0001 0.440993
0.0002 0.315342
0.0002 0.206156
from this input array (left), i want to get the output like this right array. take first data for each second..
remarks:
first column is seconds, right column is amplitude