Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

share analog trigger for analog input and output

Solved!
Go to solution

Hi,

I am trying to make a labview program to read out a voltage on one channel and output another voltage on another channel of PCIe 6251, the voltage input/output should be triggered by the same analog trigger. I have checked online and read some example, the program I have written is as below. My question is: will the two channels triggered at the same time? or there maybe some time difference between the AO/AI? If they are not triggered at the same time, will the time difference be a fair enough constant?

Thanks!

 image.png

 

 

0 Kudos
Message 1 of 3
(3,011 Views)
Solution
Accepted by topic author gy10c

It's close, but not quite right.  There's nothing to enforce execution order between the tasks so it's possible the AI trigger will be asserted before the AO task is started and "listening" for it.  That'll prevent the AO task from running as expected.

 

You can fix this by adding a dataflow dependency (such as "Merge Errors") to force the AO task to start before the AI task starts. Thus the AO task will be ready when the AI task asserts its trigger.

 

There's another approach I tend to prefer that syncs tasks via sample clock rather than trigger.  You basically do the same kind of sequencing described above, remove the start trigger config from the AO task, and configure the AO timing to use the AI sample clock.

   This approach is especially useful for maintaining sync between tasks on different boards.  When your tasks are on the same board, syncing via trigger alone should work just fine.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 3
(2,954 Views)

Thanks a lot!

0 Kudos
Message 3 of 3
(2,947 Views)