NI-DAQmx .NET Framework 4.0 API Reference

CIChannelCollection.CreateDutyCycleChannel Method

  • Updated2023-02-21
  • 2 minute(s) read
CIChannelCollection.CreateDutyCycleChannel Method
Creates CIChannel to duty cycle of a digital pulse.

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

Syntax

public CIChannel CreateDutyCycleChannel(
	string counter,
	string nameToAssignChannel,
	double minimumFrequency,
	double maximumFrequency,
	CIDutyCycleStartingEdge edge,
	string customScaleName
)
Public Function CreateDutyCycleChannel ( 
	counter As String,
	nameToAssignChannel As String,
	minimumFrequency As Double,
	maximumFrequency As Double,
	edge As CIDutyCycleStartingEdge,
	customScaleName As String
) As CIChannel

Parameters

counter
Type: SystemString
The name of the counter to use to create virtual channels.
nameToAssignChannel
Type: SystemString
The name to assign to the created channel. To use the physical channel name as the local virtual channel name, set this value to Empty.
minimumFrequency
Type: SystemDouble
The minimum frequency you expect to measure.
maximumFrequency
Type: SystemDouble
The maximum frequency you expect to measure.
edge
Type: NationalInstruments.DAQmxCIDutyCycleStartingEdge
Specifies between which edges to measure the frequency or period of the signal.
customScaleName
Type: SystemString
The name of a custom scale to apply to the channel.

Return Value

Type: CIChannel
The newly created CIChannel.

Exceptions

ExceptionCondition
DaqExceptionThe NI-DAQmx driver returned an error.

Remarks

With the exception of devices that support multi-counter tasks, you can create only one CIChannel at a time with this function because a task can contain only one CIChannel. To read from multiple counters simultaneously, use a separate task for each counter.

If you do not provide a value for nameToAssignChannel, NI-DAQmx uses the physicalChannelName as the local virtual channel name. If you use nameToAssignChannel to create a name for the local virtual channel, you must use this name in other properties and methods.

See Also

Log in to get a better experience