LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write comment and headers to spreadsheet file

Hi, 

I am using Labview 2010 to run IV measurement. After getting IV data (2D array), I am using "write to spreadsheet file.vi" to save my data. However, I want to add some comments and time&date into that file. How can I do that?

 

Thanks,

Joyce

0 Kudos
Message 1 of 8
(5,205 Views)

Use either Write to Text file, or another Write to spreadsheet file (string format) before that.

Message 2 of 8
(5,200 Views)

Hi,

 

Have a look at the attached VI.


Regards,

Nitzz

(Give Kudos to good Answers, Mark it as a Solution if your problem is Solved;)) 

Message 3 of 8
(5,191 Views)

 

Thanks.

I have another question when I convert number to string.

So my comment string is like: Voc(V)  0.511.

The number 0.511 is calculated from measurement data.

So I am converting this  number to string by using "number to fractional string", then using "concatenate strings" to concatenate string "Voc(V)", then use "Write to text file" to append to the file. However, the final result came out like this: "Voc(V) 0.000000"

 

Why is that?

 

Thanks,

 

Joyce

0 Kudos
Message 4 of 8
(5,148 Views)

hanks.

I have another question when I convert number to string.

So my comment string is like: Voc(V)  0.511.

The number 0.511 is calculated from measurement data.

So I am converting this  number to string by using "number to fractional string", then using "concatenate strings" to concatenate string "Voc(V)", then use "Write to text file" to append to the file. However, the final result came out like this: "Voc(V) 0.000000"

 

Why is that?

 

Thanks,

 

Joyce

0 Kudos
Message 5 of 8
(5,147 Views)

See the attachment.  What do you get at the output of the concat string?  Is it 0.00 at that point?  Post your code if you are able.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 6 of 8
(5,141 Views)

Here is my code. I concate all my comments about Voc, Jsc, FF,efficiency etc and then write to text file. the final number which I have converted to string came out as 0.00000.

Thanks,

Joyce

0 Kudos
Message 7 of 8
(5,130 Views)

You almost certainly have race conditions caused by the use of local variables.  The Jsc and other local variables are probably read as soon as the loop starts an iteration. The values written to the indicators occur near the end of each iteration.

 

Solution: Remove the local variables and wire the data directly.

 

Read up on all the problems locals can cause.  If you have not done so, work through the LabVIEW tutorials.

 

Lynn

0 Kudos
Message 8 of 8
(5,121 Views)