Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How does DAQmxCfgDigEdgeStartTrig work with starting a task?

I am looking for more information on the DAQmxCfgDigEdgeStartTrig function.  I am setting up an analog output channel to begin generating data on a rising edge digital trigger, but I don't know exactly how the DAQmxCfgDigEdgeStartTrig function works.   When i call that function does it hold the program execution until it receives a trigger? 
It doesn't seem like that is the case because some examples i have looked at still call DAQmxStartTask directly after the EdgeStartTrig function.   In that case, does the task not generate any samples until the trigger has been received even though it has been started? 
 
Also, if i have other functions of my program that i don't want to start happening until that trigger event occurs is there a way to know when that happens? 
 
Lastly, do i need to create a digital input channel to use a digital trigger?  To be more specific since i am calling the DAQmxCfgDigEdgeStartTrig function do i need to have a digital input channel associated with that?  Or, do i just need to provide it with an appropriate pin to monitor?
 
Thanks,
Gerry
 
 
 
0 Kudos
Message 1 of 3
(9,170 Views)

Hi Gerry,

The DAQmxCfgDigEdgeStartTrig will configure the trigger then the program will progress until the generation step and wait for a trigger. If you would like to start other functions based on this trigger you can monitor the PFI line that the trigger is coming in on and based on the value proceed to those various function. You will not need a digital channel associated with your trigger you can specify which PFI to monitor, but if you would like to know the value of the line then you will need to set up a digital task to monitor the line. I have found the following Developer Zone article to be useful, Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 2 of 3
(9,158 Views)

Thanks for the information.   That clears a lot of things up for me.

Regards,
Gerry

0 Kudos
Message 3 of 3
(9,155 Views)