Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using a counter to simultaneously trigger AO and AI

Hi all,

 

I'm currently working on a VI with one AO task and one AI task running in parallel. These tasks are generating/acquiring the same (finite) number of samples and at the same rate. In addition, the two tasks are triggered with the same counter (Ctr0).

 

While running the VI, I can look at the counter output and the signal generated by the AO on a scope. Both look fine. The AO use Ctr0InternalOutput as trigger source.

 

My problem is that the AI task never sees the trigger. I tried different solutions for the trigger source of the AI (using Ctr0InternalOutput, using ao/StartTrigger), to no avail.

 

Can somebody have a look and tell me if there is something obvious I missed ? I looked at the forums and didn't find any solution.

I'll also appreciate comments to improve the design ! Smiley Happy

 

The main program is Metal.vi. The AO task is in the sub-vi Metal_DAQ_Start.vi. The counter task is in Metal_FG.vi.

 

Thanks a lot for your help !

All the best,

Julien

 

 

 

NB: I'm using a USB-6251 and Labview 2014.

____________________
JB
0 Kudos
Message 1 of 3
(3,696 Views)

Hi,

 

I'm still investigating on this problem.

I wrote a smaller "quick and dirty" VI with only the AO, AI and counter tasks to help understanding what happen.

 

  • When I disable the AI loop, I can see on the scope the output of the counter and the output of the AO task: it works fine.
  • When I disable the AO loop, and enable the AI loop, the AI task works fine.
  • The problem is there only when the two tasks are running in parallel: in that case, the AO works OK, but the AI always go in time out.

I don't know what to do next...

 

I attach my test program (for Labview 2014).

 

Thanks for your help !

 

____________________
JB
0 Kudos
Message 2 of 3
(3,664 Views)

Ok, problem solved.

When using two tasks in parallel on the same device, it seems to be necessary to use the internal memory for one of the tasks.

When I use internal memory with the AO, it works.

____________________
JB
0 Kudos
Message 3 of 3
(3,648 Views)