LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

keep column order if data is empty

Hello,

I am logging 1D data to a spreadsheet using the write to measurement file function in LabVIEW 2013, and I am running into a data overlap when the data is empty. For instance I start with three columns of data:

timestamp                                  pressure1            pressure2

3/15/2016  10:15:25                      5000                      800

3/15/2016  10:15:35                      5000                      800

3/15/2016  10:15:45                      5000                      800

3/15/2016  10:15:55                      5000                      800

If pressure1 is not recorded at 10:16:05 (becomes the transducer is removed), I expect a blank in the pressure2 column of the spreadsheet rather during that instance, but rather the data overlaps.

3/15/2016  10:16:05                      5000                      800

3/15/2016  10:16:15                      800

3/15/2016  10:16:25                      5000                      800

 

This becomes very difficult to analyze data with thousands of rows that overlap. Is there a way to resolve this is LabVIEW? 

Thanks for your help

0 Kudos
Message 1 of 6
(3,725 Views)

I think you forgot to post your code. The problem can definitely be solved in LabVIEW but without seeing what you are doing at the moment, it would be difficult to help.

 

You might need to add in a 'blank' column when your transducer is removed so that the order/number of the columns is preserved.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 6
(3,717 Views)

Attached is the code.

I wish that I wouldn't have to change the code everytime I remove a transducer. I could certainly check the array to see if it's empty and write a blank, but I thought there would be a function that would simplify it even further.

 

Thanks!

0 Kudos
Message 3 of 6
(3,701 Views)
0 Kudos
Message 4 of 6
(3,699 Views)

Never mind. I did what I talked about.

 

Thanks,

0 Kudos
Message 5 of 6
(3,694 Views)

You need to either:

1) make sure that the global arrays always have a fixed size (or, check for that and write an empty string - you need to make sure that your string arrays are the same size according to the number of columns)

2) write to a different file (with a new set of headers) if the number of transducers/data points changes


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 6
(3,684 Views)