Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How to route an internal signal

Dear All,

Page 20, NI cDAQ-9172 User Guide & Specification:

Routing AI Start Trigger to an Output Terminal

You can route ai/StartTrigger to any output PFI terminal. The output is an

active high pulse.

 

What is the API to connect or disconnect an internal signal to another?  If I route the ai/StartTrigger to an output PFI,  then I use this ai/StartTrigger as trigger source, will I expect an active high pulse from that PFI pin?  Is this right?

Thanks.

Regards,   

A

0 Kudos
Message 1 of 3
(9,088 Views)

Hello A,

To route signals based on a task you can use the class CNiDAQmxExportSignals.  This class contains methods and data items available to route a signal as long as a task is active.  The method to use is ExportHardwareSignal( DAQmxExportSignal signal, LPCTSTR outputTerminal ).  The datatype signal and outputTerminal list can be found in the NI Measurement Studio Help.  The path to this particular class is NI Measurement Studio Help -> NI Measurement Studio Visual C++ Class Library -> Reference -> DAQmx -> DAQmx Classes -> CNiDAQmxExportSignals.  If you scroll down to the bottom of this class, all of the methods will be listed.  You are interested in the ExportHardwareSignal method.  If click on this method, you will get a page that explains each parameter in detail. 

Much of this routing can be done implicitly when a task is created.  For instance if you are creating an AI and AO task that you would like to start simultaneously, you can create a start trigger for the AO task that uses the AI start trigger as the digital signal to start it.  The NI Measurement Studio Help has more information on this, and check out the example SyncAIAO_DigStart in the examples directory for Measurement Studio.  This directory can be found in your computer in the path C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\MStudioVC2005\Synchronization\Multi-Function.  This example implicitly routes the AI start trigger to the AO start trigger so that AI and AO are synchronized when a digital line is triggered.  Hope this helps. 

Regards,
Browning G
FlexRIO R&D
Message 2 of 3
(9,048 Views)
Hello A,

I just wanted to add that the NI-DAQmx API includes functionality that Browning described above and that you can find the current latest version of NI-DAQmx online here.


Message Edited by Matt A on 04-18-2008 02:22 PM

Matt Anderson

Hardware Services Marketing Manager
National Instruments
Message 3 of 3
(9,047 Views)