pulse_out_start()

Starts a timer to generate digital pulses at a specified frequency and duty cycle. Use pulse_out_stop() to stop the output.

Prototype

pulse_out_start(board_num, timer_num, frequency, duty_cycle, pulse_count=0, initial_delay=0, idle_state=<TimerIdleState.LOW: 0>, options=<PulseOutOptions.NONE: 0>)

Parameters

board_num (int)

The number associated with the board when it was installed with InstaCal or created with create_daq_device().

timer_num (int)

The timer to start output pulses. Valid values are zero (0) up to the number of timers on the board – 1.

frequency (float)

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’s clock and the timer resolution.

duty_cycle (float)

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.

pulse_count (int, optional)

The number of pulses to generate. Setting the pulse count to zero (0) will result in pulses being generated until pulse_out_stop() is called. Defaults to 0.

initial_delay (float, optional)

The amount of time in seconds to delay before starting the timer output after enabling the output. Defaults to 0.

idle_state (TimerIdleState, optional)

The resting state of the output. Defaults to TimerIdleState.LOW.

options (PulseOutOptions, optional)

Flags that control various options. This field may contain any combination of non-contradictory choices from the values listed in the options parameter values section below. Defaults to PulseOutOptions.NONE.

Returns

options parameter values

EXTTRIGGERIf 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 set_trigger(); refer to board-specific information.