12-06-2011 01:50 PM
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
12-07-2011 10:06 AM
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.
12-07-2011 11:32 AM
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.
Tim
12-07-2011 11:56 AM
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
12-07-2011 12:58 PM
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
12-07-2011 02:58 PM
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
12-07-2011 03:56 PM
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
08-24-2017 06:29 AM
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.