LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D data to spreadsheet problem

Hi,
I am acquiring data and writing it (2D array)to a spreadsheet (using write to spreadsheet File.VI).
The problem I am having is for every acquisition the data is written 1400 times in the excel file (repetition on 1400 lines instead of just writing it once).
Have anyone seen this before?
Thanks

LV 8.2
0 Kudos
Message 1 of 7
(3,493 Views)
Hi RJP,

Can you post your code?
0 Kudos
Message 2 of 7
(3,492 Views)
THats my code...I hope it's clear for you.
0 Kudos
Message 3 of 7
(3,490 Views)
Are you sure the values aren't all the same?  You are collecting 1000 samples at a rate of 4000/sec.  Temperatures don't generally change much in 1/4 second.  I'm not sure where you get 1400 samples from, because your code is set for 1000.


Message Edited by Ravens Fan on 04-23-2008 02:07 PM
0 Kudos
Message 4 of 7
(3,479 Views)

I cannot tell, because I don't have DAQ installed, but how big is the 2D array inside the inner loop? Do you ever start a new file or are you appending forever? Place an indicator in the 2D array to see what's written.

Some other things that caught my eye:

  1. A value(sgnl) property makes no sense if you don't have event structures. Use a local variable.
  2. It is confusing to place the clearing of the chart history on the right side. It is more convenient to place this on the left side of the main code. I either case, it will happen at the start of the program because there is no data dependency.
  3. Instead of a combo box and scanning operation inside the inner loop (DAQ rate) use a ring, it will output the correct value directly if so configured.
  4. All these properties in the inner loop only need to get written when the controls change, not with every iteration of the loop.
  5. I am sure you are aware that you are not really writing any excel file, right?
0 Kudos
Message 5 of 7
(3,478 Views)
Why is the second "Express Write Measurement File.vi" in there when you are writting with the "Write to Spreadsheet File.vi" ???
I cleaned things up a bit and used simulated hardware and did not get the error...
I think the bigger question though is why write so much temp data anyways? You more than likely only a temp reading every 100ms even on temp critical tasks...
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 6 of 7
(3,472 Views)
The second "Express Write Measurement File.vi" was just for test purposes.
It's working fine now.
Thanks guys for all the help...
0 Kudos
Message 7 of 7
(3,461 Views)