Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I route an AI Start Trigger to an output terminal?

Hi. I'm using a PCI-6010 with VB.NET and I want to generate a digital output transition when I initiate an analog read using ReadMultiSample. The best I can gather from the documentation is that an AI Start Trigger is generated when the reading starts. And, according to the NI 6010 Help documentation:

 

-------

You can route ai/StartTrigger out to any PFI <6..9> terminal.

The output is an active high pulse.

The device also uses ai/StartTrigger to initiate pretriggered DAQ operations. In most pretriggered applications, a software trigger generates ai/StartTrigger. Refer to AI Reference Trigger Signal for a complete description of the use of ai/StartTrigger and ai/ReferenceTrigger in a pretriggered DAQ operation.

-------

 

This certainly sounds like what I want to do, however I don't have a clue as to how. I can't get any directions on how to route the ai/StartTrigger to one of the digital outputs. The above mentioned "AI Reference Trigger Signal" article in the help documentation actually doesn't mention the ai/StartTrigger at all.

 

Can anyone tell me how to go about this?

 

Thanks,

 

Tim

 

0 Kudos
Message 1 of 8
(5,646 Views)

Hello Tim1050,

 

Here is a link to an explanation of how the AI Start Trigger works:

 

http://digital.ni.com/public.nsf/allkb/DE4BF9FF0EA331A586256B3A006C0E44?OpenDocument

 

After reading this, please post back follow-up questions. Also, describe exactly what you want to achieve with your setup.

 

Regards,

 

Jeff L.

0 Kudos
Message 2 of 8
(5,639 Views)

Jeff,

 

That still leaves me wondering if the AI Start Trigger signal is also initiated by a software read, such as ReadMultiSample, as implied by the documentation.

 

Also, and this is my fault for not making it clearer, I need to know what statements to use to "route ai/StartTrigger out to any PFI <6..9> terminal"

 

The closest thread I can find to my situation is this one, although it's specifiic to Labview instead of Measurement Studio.

 

http://forums.ni.com/t5/Multifunction-DAQ/how-do-you-create-ai-StartTrigger-in-multi-function/td-p/1...

 

Tim

0 Kudos
Message 3 of 8
(5,628 Views)
Spoiler
 

Hi Tim,

 

According to the daq user manual...

 

For a detailed description of which routes are possible on your device,
in Measurement & Automation Explorer (MAX), select Devices and
Interfaces, your device, then select the Device Routes tab.

 

if there is a direct connection between the ai trigger and pfx then you can make connections with software

 

in LabVIEW

 

DAQmx Export Signal.vi and
DAQmx Connect Terminals.vi

 

and in DAQmx .Net Classes

 

DAQSystem.ConnectTerminals

ExportSignals

 

You need the string names of the terminals to connect

 

Hope this helps

 

Curt

0 Kudos
Message 4 of 8
(5,626 Views)

Curt,

 

I already checked that out in MAX and determined that there is a direct connection. So I know it can be done, I just don't know how.

 

Tim

0 Kudos
Message 5 of 8
(5,621 Views)

Hi Tim

 

try this, assuming you already have a a reference set to DAQmx

 

use the string names list in the source rows and destination columns in NI-MAX

 

Try

            DaqSystem.Local.ConnectTerminals("/Dev1/ai/StartTrigger", "/Dev1/PFI0")

        Catch daqex As DaqException
            MessageBox.Show(daqex.Message)
        Catch ex As Exception
            MessageBox.Show(ex.Message)

        End Try

 

Curt

Message 6 of 8
(5,613 Views)

Thanks Curt. I'm using a simulated device right now and I get the error;

 

"Specified route cannot be satisfied, because the hardware does not support it.  Source Device: Dev6 Source Terminal: ai/StartTrigger Destination Device: Dev6 Destination Terminal: PFI0  Status Code: -89136"

 

Maybe the simulated device isn't detailed enough to support this function. I'll try it out on a real board when I get a chance, either tommorow or early next week. But at least it looks like the kind of thing I'm looking for. Strange that the documentation for this is so obscure. I don't think I ever would have found that on my own.

 

Tim

0 Kudos
Message 7 of 8
(5,609 Views)

It is 6 years after your post and the situation has not improved. I googled around for a whole day just to find out "how to connect a trigger to a terminal". Nowhere online or in the documentation I could find it - just that "I have to do it". My colleagues began to give me arkward looks after I started screeming at my screen "And HOW do I achieve this!!1!" 😉

 

Thanks for all of your posts.

0 Kudos
Message 8 of 8
(3,503 Views)