LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Repeated gated single pulse generation

Hello,

 

I am trying to upgrade a (quite) old nidaq legacy software, and I am blocked on a generation of gated single pulse signal using a counter. 

 

I am using a PCI 6733, and I want that after each digital trigger on PFI9, the counter 0 generates a single pulse of controlled delay and duration.

Using the provided NI examples, I succeeded with the following code to generate the pulse after the first trigger. However, the following digital signals do not trigger the pulse.

 

TaskHandle taskHandle

 

DAQmxCreateTask("",&taskHandle)

DAQmxCreateCOPulseChanTime(taskHandle,"Dev1/ctr0","",DAQmx_Val_Seconds,DAQmx_Val_Low,1.00,0.50,1.00);DAQDAQmxCfgDigEdgeStartTrig(taskHandle,"/Dev1/PFI9",DAQmx_Val_Rising);

 

DAQmxStartTask(taskHandle);

 

How could I rearm the counter, so that it generate the pulse after each trigger, and not only the first one ?

As a side question, is possible to specify which clock to use to count the delay ?

 

Thanks

0 Kudos
Message 1 of 1
(856 Views)