Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

digital start ref trigger for analog input with another task (DaqmxBase)

Hello,

 

I am using the C API of Daqmx Base with a 6212 USB.

 

I can successfully create analog input task with a digital start ref trigger.

I can successfully create a counter output or a analog output.

 

Once the task is created I loop to do the following:

Start AI task – read AI data – Stop AI task

 

By doing so I can kind of reproduce the Digital Edge Reference Trigger, except that I do not have pre-trigger samples.

 

Anyway this works great. The problem arises when I create a counter task (or even an analog OUTPUT task). If I create another task the (Start AI task – read AI data – Stop AI task) loop will work at the first occurrence, but at the second I have a nasty error on the start task.

 

Does anyone encounter this kind of error? Were you able to solve it?

0 Kudos
Message 1 of 2
(3,332 Views)

Hi Novatrex,

 

Can you elaborate on the details of the error, do you have a specific error code and mesage? If so, you could you paste them here or give a screenshot showing the error. Also it may be beneficial if you were able to attach a copy of your code so that I can take a look at it.

 

 

Best Regards,

 

James Kent

James Kent | Applications Engineer | National Instruments UK & Ireland
w: uk.ni.com | ireland.ni.com
0 Kudos
Message 2 of 2
(3,288 Views)