GenerateClock(double, bool)
- Updated2026-01-12
- 1 minute(s) read
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
| Name | Type | Description |
|---|---|---|
| frequency | double | Specifies the clock frequency in Hz. |
| selectDigitalFunction | bool | If true, sets the SelectedFunction of the pins to Digital. |
Exceptions
| Type | Description |
|---|---|
| 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. |