LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Export Waveforms to Spreadsheet is writing unexpected blank cells

When I use Export Waveform to Spreadsheet with ";" as delimiter, I'm always getting an unexpected last row as follows:

 

12/8/2009  23:11:05.398942;-7.687175E-1;
12/8/2009  23:11:05.399042;-9.970543E-1;
12/8/2009  23:11:05.399142;-8.439648E-1;
12/8/2009  23:11:05.399242;-3.688040E-1;
12/8/2009  23:11:05.399342;2.480941E-1;
12/8/2009  23:11:05.399442;7.699599E-1;
;

;

 

12/8/2009  23:11:05.398942;-7.687175E-1;
12/8/2009  23:11:05.399042;-9.970543E-1;
12/8/2009  23:11:05.399142;-8.439648E-1;
12/8/2009  23:11:05.399242;-3.688040E-1;
12/8/2009  23:11:05.399342;2.480941E-1;
12/8/2009  23:11:05.399442;7.699599E-1;
  

Why this unexpected rows "  ;            ;" after ( if not before) having writen my Waveform. How to remove it? is this the header?

Please refer to my attachement (Waveform made of 100 points). Please see also my VI.

 

Suppose I have contiguous waverforms,  how to have them saved in my Excel file without separation between my waveforms?

 

Download All
0 Kudos
Message 1 of 7
(2,945 Views)
It looks like to me that you are getting a blank line because you are sending no data when you start your program. I add a first call to the code see if that helps.
Tim
GHSP
0 Kudos
Message 2 of 7
(2,938 Views)

Thank you for the reply.

I will try your code and lets you know.

Do you mean that my error was that at every execution of my timed-loop, I was writing empty data first and them my Waveform?

I though that my Shared Variable will block at the first call until there is something in the Shared Variable (I'm using a Shared Variable with RT FIFO Enabled).


0 Kudos
Message 3 of 7
(2,923 Views)

I thought that you were adding the data to the top when you updated. I looked at your code again and that is not true so what I did may not help. You are probably reading one extra time before shutting the program down. You get a write after you have quite taking data. I would look for something in your code that would cause that.

Tim
GHSP
0 Kudos
Message 4 of 7
(2,919 Views)
That extra row is being caused by the fact that you are using Insert Into Array. Why, I have no idea. Thus, the Export Waveform to Spreadsheet File is receiving an array of two waveforms. The first is the one with actual data. The second is the one you initialized at the start of the program, which contains no values.
0 Kudos
Message 5 of 7
(2,907 Views)
This one should work better.
Tim
GHSP
0 Kudos
Message 6 of 7
(2,904 Views)
Thank you very much.

You are absolutely right about the cause (Insert Into Array) of the problem. I will try the latest proposed correction and let you know.
0 Kudos
Message 7 of 7
(2,901 Views)