Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control which 2nd timer is used for finite pulsetrain generation

I am generating a finite pulsetrain with the following code:

myTask = New Task(String.Empty)
mNIClockChannel = myTask.COChannels.CreatePulseChannelFrequency(mClockChannelName, _
String.Empty, COPulseFrequencyUnits.Hertz, COPulseIdleState.Low, 0.0, _
mFrequency, 0.5)
myTask.Timing.ConfigureImplicit(SampleQuantityMode.FiniteSamples, HowFar)
myTask.Start()

It appears to use the timer that I specify in the variable 'mClockChannelName' for the pulses, and an unspecified 2nd timer to count the pulses.

Is there a way to explicitly pick which timer the code will use for the pulse bookkeeping?
0 Kudos
Message 1 of 2
(3,037 Views)
Hello Anatoly2,

Thank you for contacting National Instruments.

When you set up a finite pulse train like this, NI-DAQmx automatically assigns the output counter's pair as the gating counter (i.e. counters 0&1, 2&3, etc...).

The only way to specify which counter you wanted to gate the output would be to manually set up the finite counter configuration. You would set one counter to output a continuous pulse train and another counter to output a single pulse whose length equals the length of time it takes to generate X pulses on the output counter. Then use the single pulse as a gate for the finite pulse train counter.

Sincerely,

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,021 Views)