LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

activeX excel aquisition

Hello,
 
I am trying to aquire data straight into excel using active X. I found a sample code below that will do exactly what I want. It generates random data and writes it to excel on demand by user selecting a button. The data it writes now is just random data. I added a DAQ with 6 channels that will aquire one sample on demand which is what I want, and I would like to write this data into excel instead of the random data. I tried replacing the random data by the DAQ data using a conversion from DDT, but then the loop indexing does not work, and it would not let me disable indexing. I am sure this is a simple solution and I would like your help.
 
Cheers,
Alloush
0 Kudos
Message 1 of 4
(2,259 Views)
I now know the problem, which is the random data had indexing which determined the indexing for the for loops in write to active cell case. I need to replace this random data with the aquired data, and the aquired data should specify the index. Help!!!!
 
 
Alloush
0 Kudos
Message 2 of 4
(2,252 Views)

The random data you are generating is a 2 dimensional array of floating point numbers, the data coming out of your DAQ is a 1 dimension array of floating point numbers.

That is why your for loops aren't indexing properly. If you only want to acquire one column of data, insert a 'build array' function to add a dimension to your 1D array of data.

If you want to add a new set of captured data each time you press the 'Write to active cell' button you will need to store the last row or column index and add it too the row or column value you started with. 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 3 of 4
(2,248 Views)

got it,

 

Thankx Man

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