LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array confusion and saving data problems. Need helps plz!!!

Hello, I got a problem with arrays. As you can see in my file, The values in flow array and pressure array after I put the values in the main data stream are not correct. I want to separate them by using the loops with correct No. each value.

It is supposed to be;

Flow   No.     Pressure     No.

12      1            2             1

7        2            5             2

8        3            4             3

 

for instances. Could you please take a look at my loops plz if there is anything wrong?

 

+ I also want to save in in the text files too. The saving pattern are like above..

 

Thanks a lot

 

0 Kudos
Message 1 of 4
(2,467 Views)

I'm going to make some comments that I believe may have already been made to you in other message threads.

 

1.  Why is your delimiter for the Write to Spreadsheet File Date/Time\tChannel\s0\tChannel\s1\n   ???  That just doesn't seem right.

2.  In that string constant, you have it set for normal display.  So sending \t is actually a backslash and a t.  It is not a tab character.  You need to enter \t while the constant is in \display.

3.  Why is this in a big while loop?  You are just creating a very long file or overwriting the same file as fast as you can.

 

Clean up those things.  Put some default data in your main data stream control and set it to be default before saving.  Then upload the vi again.  That way we have some actual data we can work with.

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

Hello Ravens Fan,

 

The string that I have in the string constant is "code display" already. I already tried to check by right click to see what typr of code it is.

 

The code "\t" works as I have tested in the file. It separates between each column of data in Notepad even though it's not so organized well.

 

I think my array is fine already as I tried to fix it but I still have some problems with plotting on the chart. I want to have each line to represent each value of each number as I defined in the data mainstream.

 

This programming is just a model to save data into the text files receiving from the test bench by using DAQ. Each row of the data mainstream will be plugged in with each channel of DAQ USB. What should I do if I delete the big while loop?

 

 

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

As explained in one of your previous posts, what you have wired to the delimiter input of Write to Spreadsheet File is just plain wrong. And you are completely wrong in saying it is set for '\' Codes Display. If at some point you changed it and used a \t, then it is not reflected in the code you attached.

 

Your Main Data Stream array is EMPTY. If you have some typical data, then what you must do is select Edit>Make Current Values Default and then save the VI.

 

p.s. Starting a new thread with the same question as well repeating the same mistakes is pretty irritating.

Message 4 of 4
(2,447 Views)