LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with "Write to spreadsheet File.vi" in Labview 8.2

Solved!
Go to solution

Hi,

 

I wrote an vi for reducing noise from my signal source (voltage). When I wrote to spreadsheet file, it only saved 10 rows of data. How can I continue to record the signal until it I stop the vi.

 

Thanks in advance,

 

Michael

Download All
0 Kudos
Message 1 of 6
(3,287 Views)

There is a boolean input to the Write to Spreadsheet File VI to append to the file.  Make sure this is set to TRUE.

 

A better way would to create the file before your loop starts, write to it inside of the loop, and close it after the loop.  Use the Array to Spreadsheet String to format the data and Write Text File to write the data to the file.  I tell you to do it this way because the Write to Spreadsheet file will just keep opening and closing the file each time it writes.  This is an expensive operation and can slow down your application.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(3,278 Views)

Hi MichaelCKW,

 

Refer to the help file on what each terminals of the Write to Spreadsheet File.vi is for. From looking at your code, what you are trying to do is that you are trying to store 10 rows of data for every loop iteration? If so, perhaps you can try to create a true constant and connect it to "append to file?" terminal.

 

If you put it as false (in default it is false), what you are trying to do is that you are replacing the same rows every loop iteration. By making "append to file?" value as true, you are to append data to the existing file

 

Write to Spreadsheet File.vi

http://zone.ni.com/reference/en-XX/help/371361J-01/glang/write_to_spreadsheet_file/

 

 

Hope it helps.

 

Warmest regards,

Lennard.C

Learning new things everyday...
0 Kudos
Message 3 of 6
(3,273 Views)

Hi,

 

First of all, thanks for your help and prompt reply.

 

I found out that my problem is not really related to "write to spreadsheet File.vi". I used "highlight execution" to find out that my "shift register for loop" stopped after generating 10 data points. I don't understand why it stoped at the shift register stopped at #10. Would you suggest a way to solve this problem?

 

Thanks,

 

Michael

0 Kudos
Message 4 of 6
(3,230 Views)
Solution
Accepted by topic author MichaelCKW
How many samples are you taking with the DAQ Assistant? Could it be ten?

Please pay attention to the responses. You will never record more than one iteration until you fix the Write to Spreadsheet File.

Post your VI if you still have issues after fixing the VI.
0 Kudos
Message 5 of 6
(3,228 Views)

Thanks Dennis. You solved my problem.

 

I will take Crossrulz and Lennard's comments seriously. I just want to solve one problem at a time. Before writing the data to a spreadsheet, I would like to make sure I have a good set of data points first.

 

Thanks again for your help!

 

Michael

0 Kudos
Message 6 of 6
(3,221 Views)