Starts a timer to generate digital pulses at a specified frequency and duty cycle. Use cbPulseOutStop() to stop the output.
C/C++
int cbPulseOutStart (int BoardNum, int TimerNum, double *Frequency, double *DutyCycle, unsigned int PulseCount, double *InitialDelay, int IdleState, int Options);
Visual Basic
Function cbPulseOutStart(ByVal BoardNum&, ByVal TimerNum&, Frequency#, DutyCycle#, ByVal PulseCount&, InitialDelay#, ByVal IdleState&, ByVal Options&) As Long
BoardNum
The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99. The specified board must have a pulse-type counter.
TimerNum
The timer to start output pulses. Valid values are zero (0) up to the number of timers on the board – 1.
Frequency
The desired square wave frequency in Hz. The timer clock will be divided down by integer values to calculate the frequency. The actual frequency output will be returned. Valid values are dependent on the timer clock and timer resolution.
DutyCycle
The width of the pulse divided by the pulse period. This ratio is used with the frequency value to determine the pulse width and the interval between pulses.
PulseCount
The number of pulses to generate. Setting the pulse count to zero will result in pulses being generated until the cbPulseOutStop() function is called.
InitialDelay
The amount of time in seconds to delay before starting the timer output after enabling the output.
IdleState
The resting state of the output. Set it to one of the IdleState constants. Choices are:
0 = IDLE_LOW
1 = IDLE_HIGH
Options
Bit fields that control various options. This field may contain any combination of non-contradictory choices from the values listed in the Options argument values section below.
| Exttrigger | If this option is specified, output pulses are not generated until the trigger condition is met. You can set the trigger condition to rising edge, falling edge, or the level of the digital trigger input (TTL) with the cbSetTrigger() function. Refer to board-specific information. |