# PulseOutStart()

Starts a timer to generate digital pulses at a specified frequency and duty cycle. Use PulseOutStop() to stop the output. Use this method with counter boards that have a timer-type counter.

Member of the MccBoard class.

## Function Prototype

Public Function

VB .NET

Public Function PulseOutStart(ByVal timerNum As Integer, ByRef frequency As Double, ByRef dutyCycle As Double, ByVal pulseCount As Integer, ByRef initialDelay As Double, ByVal idleState As MccDaq.IdleState, ByVal options As MccDaq.PulseOutOptions) As MccDaq.ErrorInfo
Public Function PulseOutStart(ByVal timerNum As Integer, ByRef frequency As Double, ByRef dutyCycle As Double, ByVal pulseCount As UInteger, ByRef initialDelay As Double, ByVal idleState As MccDaq.IdleState, ByVal options As MccDaq.PulseOutOptions) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo PulseOutStart(int timerNum, ref double frequency, ref double dutyCycle, uint pulseCount, ref double initialDelay, MccDaq.IdleState idleState, MccDaq.PulseOutOptions options)
public MccDaq.ErrorInfo PulseOutStart(int timerNum, ref double frequency, ref double dutyCycle, int pulseCount, ref double initialDelay, MccDaq.IdleState idleState, MccDaq.PulseOutOptions options)

## Parameters

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 PulseOutStop() method 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 constants in the "idleState parameter values" section below.

options

Bit fields that control various options. Refer to the constants in the "options parameter values" section below.

## Returns

- An ErrorInfo object that indicates the status of the operation.

### idleState parameter values

All of the idleState settings are MccDaq.IdleState enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the IdleState enumeration, for example "variable = MccDaq.IdleState.IdleHigh".

High | Sets the output resting state high.
Low | Sets the output resting state low.

### options parameter values

All of the options settings are MccDaq.PulseOutOptions enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the PulseOutOptions enumeration, for example "variable = MccDaq.PulseOutOptions.ExtTrigger".

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 SetTrigger() method. Refer to board-specific information.