Configures and initiates clock generation on the specified channel(s), or pin(s) and pin group(s).

Syntax

Namespace: NationalInstruments.ModularInstruments.NIDigital

public void GenerateClock(double frequency, bool selectDigitalFunction)

Parameters

NameTypeDescription
frequencydouble

Specifies the clock frequency in Hz.

selectDigitalFunctionbool

If true, sets the SelectedFunction of the pins to Digital.

Exceptions

TypeDescription
Ivi.Driver.SelectorNameException

An instance of DigitalPinSet references a pin or pin group name not loaded in the pin map.

System.InvalidOperationException

GenerateClock is called while the specified channel(s) is in use in a pattern burst or clock generator.

Ivi.Driver.OutOfRangeException

The value for frequency  is invalid.

Ivi.Driver.IviCDriverException

The underlying NI-Digital driver returned an error.

System.ObjectDisposedException

GenerateClock was accessed after the associated NIDigital or DigitalDriverUtility object was disposed.