LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write entire array to text file after completing data collection

Solved!
Go to solution

I discovered the add attachments, I'll try and load my vi.  I hope I don't bring down the server...

 

Cheers,

Troy

 

 

0 Kudos
Message 11 of 14
(1,104 Views)
Solution
Accepted by topic author tzarcone

The main issue (I think) is that you are saving a 3D array into a 2D csv structure.

array to file vi.jpg

 

I would not use the 'build array' and 'transpose array' function.

 

Perhaps it's better to store the data with TDMS primitives inside your while loop.

 

you mentioned timing, but what kind of timing do you have. your while loop does not have a pause, and you are only reading one sample at a time.

Looked at your posted code, why don't you use the 'N-samples N-channels' instance from the DAQmx read?

 

Look at the examples there should be one for 'Continous data and storage' (or something similar.)

 

Ton

Message Edited by TCPlomp on 12-05-2010 11:04 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 12 of 14
(1,103 Views)

TCPlomp,

 

You did it!  You spotted the key detail I was overlooking.  I had a 3D array feeding into a 2D spreadsheet. I changed the code and now I get the data I want (without the timestamp) in the format I want.  Turns out that the timestamp really isn't necessary.   

 

I hope to follow up on the other data storage methods you mentioned.  I am still at the stage (and I think it will be a long stage) where I don't know what I don't know.  

 

Thank you for all your advice.

 

Cheers,

Troy

0 Kudos
Message 13 of 14
(1,083 Views)

Thank you all!  This was my second time trying the Discussion Forum and I learned more than just what I was asking.  Thank you especially for the advice about posting code. 

 

Cheers,

Troy

0 Kudos
Message 14 of 14
(1,076 Views)