Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing data into excel

Hi,,
 
I tried to save data from NI USB-6210 in to excel, if I run my programme, it is importing only the last 100 (no. of samples) values. I wanted to import complete data!!!..I am attaching my programme so that u can understand wats going on.
 
Thanks
 
 
0 Kudos
Message 1 of 5
(3,756 Views)
You only get the result of the very last iteration of your while loop. That is the data you are passing out. You've got to put the write function inside the while loop or pass every the result of every iteration out of the while loop. You can right click on the exit tunnel and select Enable Indexing. This will create a 2D array that you wire to the Write to Spreadsheet. If you run the program for an extended time though, this will create performance issues. Using the write inside the loop will cause the acquisition to run a bit slower so you may want to place the write inside a separate loop and pass the data with a queue. The producer/consumer design patterns (File>New...>From Template>Frameworks) should help you get started with this.
0 Kudos
Message 2 of 5
(3,745 Views)
Thank you very much for helping out..
0 Kudos
Message 3 of 5
(3,742 Views)
As you mentioned couple of methods, I am able to get the first one which is just changing the index. You further said about the processing problems,,, so I tried to make use of write function in separate while loop. I am getting the data but it is separated in to different columns, each column containing no. of samples given in the DAQ assistant setup. I need all the data in a single column, can you help me out?
I am attching the modified programme?
 
Thank you
0 Kudos
Message 4 of 5
(3,722 Views)
You are not using a separate while loop like the example I mentioned. You are doing the second method. If you just want a single column and don't want to save inside the loop, use a shift register and a Build Array function inside the loop. Then you will have a 1D array that you can pass to the Write to Spreadsheet function.
0 Kudos
Message 5 of 5
(3,709 Views)