07-11-2005 08:25 PM
07-12-2005 06:27 PM
Hi David-
The shared resource error is actually not related to the counters at all! The NI-DAQmx driver (and in fact the hardware itself) is not able to handle seperate analog input tasks at the same time. All analog input operations must be grouped in the same task, and this will unfortunately preclude you from triggering the two channels independently.
One method to overcome this is to simply process out in software those samples that occurred during the different trigger steps. This will be just as reliable as the hardware-timed approach you are looking for and will work well for your application.
You will need to run both analog input channels continuously and process out the data with each read. Based on the parameters of your two counter tasks you should be able to take the analog sampling rate and determine the appropriate indices of the input arrays at which to remove data from the readings on each channel.
I hope this helps!
Thanks-