LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get labview to write continiously to spreadsheet, writes one column each time program is run, then appends data the next time it is run.

I am attempting to write load cell, linear transducer and time stamp to EXCEL. Due to the limited room in EXCEL I have a sample rate of 10/second. This is accomplished by setting the DAQ assistant to one sample (HW timed) in the acquisition mode of the task timer. A wait timer set at a loop rate of 1000 millaseconds is included in the "while" loop to slow the sampling rate down. This works well. Now the data is taken outside of the loop and entered into a "build array" block and then into a "write to spreadsheet" block. This generates only one row of data (3 columns wide) each time the program is run. I need it to run for 5 minutes and collect data every 1/10 of a second, and save it to file even! I have tried setting the sample rate in the DAQ to continuious or N samples, but the program then fails to run.
 
Can someone please give me some guideance? This is my first vi and the fun ended yesterday when I was to have this test run.
Thank you.
Jim Steinmeyer
Jim Steinmeyer
Design Engineer
Reinke Mfg.
PO 566
Deshler NE 68340
jimsteinmeyer@reinke.com
0 Kudos
Message 1 of 4
(2,154 Views)
I could be wrong, but from what I gleaned from your explanation was that you should get rid of the "build array" outside your loop, and set the tunnel to "autoindex".  Just right click and select "Enable Indexing".  See the pic. The reason this happens is if you've got indexing disabled, you will only get the data from the last iteration of the loop.  Indexing generates an array and appends the data to that array every loop iteration. Hope this helps.

Message Edited by Novatron on 05-26-2006 03:08 PM

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

Novatron,

Thank you for your rapid responce. I have attempted to follow your suggestions with no success. I did save the "build array" and move it inside the loop to bring the 3 data streams together. I then enabled indexing and had the same results as before, one row three columns. You are correct that what I am getting is the last data point when the program is stopped. I will attempt to attach a screen shot if that may help better understand what I am doing, however this hasn't been working when I preview the post. How do you attach the jpg on the screen?

Again thank you.

Jim Steinmeyer
Design Engineer
Reinke Mfg.
PO 566
Deshler NE 68340
jimsteinmeyer@reinke.com
0 Kudos
Message 3 of 4
(2,138 Views)
You have not enabled indexing out of the while loop. If you had, the array out would be a 2D array and the type of line would change.
0 Kudos
Message 4 of 4
(2,123 Views)