LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Internal Trigger

Hello everyone!

 

I have a PCI 6115 DAQ card.  I have created a finite analog input task and a finite digital output task.  I wish to have both tasks start at the same time through the use of a trigger.  It is my understanding that, even though these tasks are running at different frequencies, their sample clocks derive from the same base clock, so as long as the tasks start with the same trigger, then they will be synchronized.

 

I have never used a trigger before, so I've been doing alot of learning.  However, I'm a bit stuck, and I would appreciate some input.  It is my understanding (which could very well be wrong) that the digital output task and the analong input task on the PCI 6115 card can only be triggered from a PFI or a RTSI source.  However, I want the trigger to be generated internally, not from an external source.  As such, I've put together the following sequence to make this happen:

trigger.png

In this example code, the following sequence happens:

1) create analong input task

2) make analog input task wait for trigger from RTSI0 in order to start

3) create counter channel

4) export counter signal to RTSI0 line.  (I would have used a DIO channel, but the PCI 6115 doesn't allow this)

5) When user presses trigger button control, the RTSI0 line is sent high.  This triggers and start the analog input task

 

I tested this and it seems to work.  My questions are as follows:

 

1) Am I doing things "correctly"?  Is there a simpler solution?  It feels kind of hokey writing a counter to a RTSI line just to trigger an internal channel

2) On an actual PCI 6115 card, this code seemed to work fine. However, on a MAX-simulated PCI 6115 card, the analog input task immediately started without waiting for the trigger.  I assume that this is simply a limitation of the simulation software for dealing with external input sources - correct?

 

Thank you for your comments and assistance!

Message 1 of 1
(3,383 Views)