NI-DAQmx .NET Framework 4.5 API Reference

COChannelCollection.CreatePulseChannelTicks Method

  • Updated2023-02-21
  • 2 minute(s) read
COChannelCollection.CreatePulseChannelTicks Method
Creates a COChannel to generate digital pulses defined by the number of timebase ticks that the pulse is at the high and low states. This method adds one or more channels to the COChannelCollection.

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

Syntax

public COChannel CreatePulseChannelTicks(
	string counter,
	string nameToAssignChannel,
	string sourceTerminal,
	COPulseIdleState idleState,
	int initialDelay,
	int lowTicks,
	int highTicks
)
Public Function CreatePulseChannelTicks ( 
	counter As String,
	nameToAssignChannel As String,
	sourceTerminal As String,
	idleState As COPulseIdleState,
	initialDelay As Integer,
	lowTicks As Integer,
	highTicks As Integer
) As COChannel

Parameters

counter
Type: SystemString
The names of the counters to use to create the virtual channel.
nameToAssignChannel
Type: SystemString
One or more names to assign to the created local virtual channels. To use the physical channel name as the local virtual channel name, set this value to Empty.
sourceTerminal
Type: SystemString
The terminal to which you connect an external timebase.
idleState
Type: NationalInstruments.DAQmxCOPulseIdleState
The resting state of the output terminal.
initialDelay
Type: SystemInt32
The number of timebase ticks to wait before generating the first pulse. Specify the terminal name.
lowTicks
Type: SystemInt32
The number of timebase ticks that the pulse is low.
highTicks
Type: SystemInt32
The number of timebase ticks that the pulse is high.

Return Value

Type: COChannel
The newly created COChannel.

Exceptions

ExceptionCondition
DaqExceptionThe NI-DAQmx driver returned an error.

Remarks

This method creates a local virtual channel for every physical channel name you specify. If you create multiple local virtual channels with one call to this method, you can specify a comma-delimited list of names for nameToAssignChannel. If you provide fewer local virtual channel names in nameToAssignChannel than you create, NI-DAQmx automatically assigns names to the local virtual channels.

If you do not provide a value for nameToAssignChannel, NI-DAQmx uses the counter 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.

The NI-DAQmx driver does not determine if the requested settings are possible until the task is verified. CreatePulseChannelTicks(String, String, String, COPulseIdleState, Int32, Int32, Int32) 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(TaskAction) with Verify.

See Also