Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse Train & Pause Trigger

myTask.COChannels.CreatePulseChannelFrequency(...);
myTask.Triggers.PauseTrigger.ConfigureDigitalLevelTrigger(...);
myTask.Timing.ConfigureImplicit(SampleQuantityMode.ContinuousSamples, 1000);
myTask.Start();

How i can receive quantity of impulses up to a pause?
0 Kudos
Message 1 of 2
(2,867 Views)
Hello Pulse Train & Pause Trigger,

There are two methods you can use to determine the number of pulses you have generated. The first is to write a software algorithm which takes a time stamp before the acquisition and after the pause trigger and determines the time that has elapsed. Then, you could use the frequency you have specified to calculate the number of pulses that have occurred in between. This method may provide a rough estimate of the number of pulses but is dependant on the system clock of your PC, which is not accurate beyond milliseconds.

As a more precise method, you could use another counter to count the number of pulses generated by myTask. Pulse train generation requires two counters, so you would need an additional third counter to keep track of the number of pulses until the pause trigger. You could route the counter output of the generation to the counter input using
DAQmxSetCICountEdgesTerm without having to make any external connections. This would provide you an exact count of the number of pulses that have been generated.


Matt Anderson

Hardware Services Marketing Manager
National Instruments
0 Kudos
Message 2 of 2
(2,849 Views)