ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ-9172 Internal signal as trigger source

Dear all,
 
I am using a cDAQ-9172 & MSVC++ 8 for my setup.  I tweaked and experimented with several analog voltage, both generate and acquire trigger examples.  I used "/cDAQ1/ai/xxxTrigger" or "/cDAQ1/ao/xxxTrigger" as my trigger source.  Recently, I acquired an NI 9401 module and the using the PFI signals as trigger source is very convenient.
 
This time again, I am using the original GenMultVoltUpdatesIntClk_DigStart example with.  My trigger source is: "/cDAQ1/ao/StartTrigger".  This is one of my internal signals.  Without program modification, is there a way that I could access it so that I can simulate a rising or falling edge?  I mentioned this because, when using the NI 9401 module, I connect a supply as in input to PFI0 pin.  Then to simulate the rising edge, I will turn on the PS and the falling edge would be the other way around.  In this manner, I can see in my scope that upon a rising or falling edge, it triggers a waveform to be generated from my output module.   
 
Thanks,
A
0 Kudos
Message 1 of 4
(3,619 Views)
Hi angelmcdoggie,

From your description, it sounds like you want to retrigger your analog output based on a digital trigger. In other words, for every rising edge of the trigger signal, you want to generate your analog waveform. If this is the case, please look at the Retriggerable Pulse Train Generation example. The underlying idea here is use a counter to create a sample clock for the analog task. The counter's output is a finite pulse train and can be restarted with a trigger. Each time the trigger is asserted, the counter generates a finite pulse train, and the analog output task uses that pulse train as its sample clock.

DAQmx - Retriggerable Pulse Train Generation - LabVIEW - CVI - ANSI C - VB.NET - C#.NET
http://sine.ni.com/devzone/cda/epd/p/id/2415

If this isn't the behavior you're looking for, please explain more clearly what kind of functionality you're looking for.
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
Message 2 of 4
(3,596 Views)
Hello Joe,
 
I will review the topic from the link carefully.  I would like to ask a related question to my post.  Can I use /cDAQ1/ai/StartTrigger or /cDAQ1/ao/StartTrigger as trigger source without program modfication?  There are no exception errors when executing the example but I see no activity from the output channel. 
 
Best regards,
A
0 Kudos
Message 3 of 4
(3,578 Views)
Hi angelmcdoggie,

Configuring /cDAQ1/ao/StartTrigger as the AO start trigger is possible but not particularly useful because that sets the source of the AO start trigger to be the AO start trigger, looping it back to itself. /cDAQ1/ao/StartTrigger is for when you want to trigger AI, counters, or external circuitry based on when the AO task starts. Note that if you don't configure an AO start trigger, DAQmxStartTask() (or the equivalent method if you're using Measurement Studio) will generate a pulse on /cDAQ1/ao/StartTrigger which you can use to start an AI task, counter task, or external circuitry (such as another DAQ device).

Brad
---
Brad Keryan
NI R&D
Message 4 of 4
(3,565 Views)