Academic Hardware Products (myDAQ, myRIO)

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Pause Trigger

I have attached a VI where I pause the trigger to analog input channel 0 based on a counter0 signal I am generating.  I would also like to do this for analog input channel 1, but I would like to pause the trigger based on a different counter signal (counter1).  I get a shared resource error when I try to do this.  I think part of the problem is I do not start generating counter1 until the falling edge of counter 0 has occured.  How can I still pause my trigger on analog input 1 based on the counter1 (This is essential).  My attached VI will help you better understand my application.  I basically want to have the same application for ai input 0 and ai input 1, but I need to base the pause off different counter values.  Thank you so much!
 
-David
0 件の賞賛
メッセージ1/2
7,036件の閲覧回数

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-

Tom W
National Instruments
0 件の賞賛
メッセージ2/2
7,025件の閲覧回数