ConfigureSampleClock Method (String, Double, SampleClockActiveEdge, SampleQuantityMode)

NI-DAQmx 17.1 .NET Class Library Help

Edition Date: June 2017

Part Number: 370473J-01

»View Product Info
Download Help (Windows Only)

Timing Class See Also

Sets the source of the sample clock and the rate of the sample clock.

Namespace: NationalInstruments.DAQmx

Assembly: NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version:


Visual Basic (Declaration)
Public Sub ConfigureSampleClock ( _
	signalSource As String, _
	rate As Double, _
	activeEdge As SampleClockActiveEdge, _
	sampleMode As SampleQuantityMode _

public void ConfigureSampleClock(
	string signalSource,
	double rate,
	SampleClockActiveEdge activeEdge,
	SampleQuantityMode sampleMode


Type: System.String
The source terminal of the clock. To use the internal clock of the device, set this value to Empty.
Type: System.Double
The sampling rate in samples per second. If you use an external source for the sample clock, set this input to the maximum expected rate of that clock.
Type: NationalInstruments.DAQmx.SampleClockActiveEdge
The edges of sample clock pulses on which to acquire or generate samples.
Type: NationalInstruments.DAQmx.SampleQuantityMode
The duration of the task. A task is either finite and stops once the specified number of samples have been acquired or generated, or it is continuous and continues to acquire or generate samples until the task is explicitly stopped.


DaqExceptionThe NI-DAQmx driver returned an error.


The NI-DAQmx driver does not determine if the requested settings are possible until the task is verified. This method does not throw an exception for parameter values that are not compatible with your hardware or other settings in your task. To determine if all of the settings for a Task are valid, you must verify the task by starting the task, either with Start or by reading from or writing to the task, or by calling Control with Verify.

You cannot apply this method to a subset of devices in the task, and you must apply this method to the task as a whole. You must call this method on the instance of Timing returned from the Timing property on the Task class. Accessing this method on instances of Timing returned from the Item property throws an exception.

Note: Before calling this method, you must configure channels on the task using one of the channel collection properties (for example, CreateVoltageChannel on Task.AIChannels).

See Also


Timing Class

NationalInstruments.DAQmx Namespace


Not Helpful