Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Does the PCI-6220 DAQ board support starting and stopping acquisition at different times for each analog channel separately?

I have three completely unrelated systems that each contain one motor and one load cell.  I plan to control the motors with a 7330 motor controller.  Also, I need to acquire load and position data and would like to do this with one DAQ board.   The events that need to be captured for each of the three systems will not by synchronized but will overlap in time.  Acquiring load and position for one system is straightforward.  However, I have been unable to start acquiring data on channel 1,2 and then start on channel 3,4 a few seconds later (while channel 1,2 are still active).  Can this be done?
 
One possibility is that I will need to acquire data on all channels and just throw away what I don't need.  For instance, I could start acquisition on all channels together and then put the Read block inside a loop to periodically grab all data from the buffer and append it to an array.  When I really want to start capturing data, I could first empty the array and then let the array fill until I want to stop capturing data, at which point I would just write that array to a text file.  I'd rather just acquire only the data I want, but haven't found a way to control the analog channels separately.
 
Thanks for any ideas.
0 Kudos
Message 1 of 4
(3,239 Views)

Hi jtrout,

All analog input channels are grouped together as one task with all the parameters (input range, sampling, timing, etc.) being the same. This also means that you can’t have different channels with different triggering, etc. The solution is the approach you’ve mentioned: gather the data and then discard it. You could do this in LabVIEW by the method you suggested: throwing away the unwanted data. That can be done in LabVIEW using the array functions to get subsets of the buffer data, etc., or writing to file and then trimming it afterwards.

Hope that helps you get started!

Mark E.
Precision DC Product Support Engineer
National Instruments

0 Kudos
Message 2 of 4
(3,219 Views)
Thank you.  I thought that might be the most realistic option, but I wasn't sure if you absolutely couldn't trigger the various analog input lines separately.  One thing I haven't checked is whether or not there is an NI board that supports this type of acquisition.  BTW your assumption that I might be programming in Labview is correct.  I had forgotten to mention that.  If I remember correctly, in the past to get somewhat "live" plot updates from my data acquisition, I used a DAQmx Read inside a loop to grab chunks of data from the buffer as the data acquisition continued at a constant rate.  I suppose I could do this without too much difficulty, especially since the sampling rates would be relatively slow (~1kHz).
0 Kudos
Message 3 of 4
(3,215 Views)

Hi jtrout,

There are no NI boards that can split one type of task into separate channels with different parameters. It’s due to the fact that all analog input is one task, analog output is one task, etc. Each task has one set of parameters for all channels/lines associated with it.

I only partially assumed you were using LabVIEW. I caught the subtle phrase about you using a read “block” inside a loop. It sounded like graphical programming and graphical programming = LabVIEW!

I would suggest looking at our shipping examples that already take data and write to file. They’re found in LabVIEW by choosing Help » Find Examples. You could start with something like “Cont Acq&Graph Voltage – Write Data to File (TDMS).vi” (from Hardware Input and Output » DAQmx » Analog Measurements » Voltage) and modify it to work with .txt files, to discard data, etc.

It sounds like you’re on your way. Best of luck with your application.

Mark E.
Precision DC Product Support Engineer
National Instruments

0 Kudos
Message 4 of 4
(3,198 Views)