Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Handling data from DAQ

I am using a NI9215 on the USB port to read two analog signals. After a lot of troubleshooting I can finally display both of them on an XY Graph (It turnes out that displaying one signal alone is not a problem, but displaying two on the same graph is a whole different story). I am using the array to spreadsheet function, which successfully works in some other applications, but in this case I am having problems converting my input data to the correct format suitable for the to spreadsheet function.

My question is, what is the easiest way to write the aquired data to a file? I continuously read two channels with 100 datapoints every 100ms for a couple minutes. Also, I want to assign a running number to each datapoint. So I basically have two arrays, each having a signal and a running number. How can I handle this data in an easy way, or in other words, what is the easiest way to save it to a file?

Thanks.

0 Kudos
Message 1 of 3
(3,107 Views)

Have a look at the following DevZone article. 

http://zone.ni.com/devzone/cda/epd/p/id/5345#0requirements

 

There is an example program that is prebuilt that reads in one channel and writes it to a spreadsheet, in this case a CVS file, which is directly opened with excel.

 

All you have to do is change the Physical Channel Control to Dev1/ai0:1 or something to accommodate both you channels, and set the sampling rate and number of samples accordingly.  From you description, a sampling rate of 1kHz, and samples to read of 100 as is the default setting. 

 

Chris

Message Edited by Chris_K_ on 12-26-2008 11:45 AM
0 Kudos
Message 2 of 3
(3,078 Views)

This is how can save it to an excel file without having to pay for the stupid MS Office Tool Kit.

 

when you open up excel it will say something about having to convert the data... Just press "Yes", and don't worry about it. You can turn this off in the Excel options if you want.  How ever you do need to us the".xls" file type versus the new ".xlsx".  This is a long and jerky story by Microsoft that created this problem...

 

You can even embed macros in it from here.

0 Kudos
Message 3 of 3
(3,024 Views)