NI-DAQmx .NET Framework 4.0 API Reference

COChannel Class

  • Updated2023-02-21
  • 9 minute(s) read
COChannel Class
Encapsulates one or more counter/timer output channels and the properties for a counter/timer output channel.

Inheritance Hierarchy

SystemObject
  SystemMarshalByRefObject
    NationalInstruments.DAQmxChannel
      NationalInstruments.DAQmxCOChannel

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

Syntax

public class COChannel : Channel, IFilteredTypeDescriptor
Public Class COChannel
	Inherits Channel
	Implements IFilteredTypeDescriptor

The COChannel type exposes the following members.

Properties

  NameDescription
Public propertyAutoIncrementCount
Specifies a number of timebase ticks by which to increase the time spent in the idle state for each successive pulse.
Public propertyConstrainedGenerationMode
Specifies constraints to apply when the counter generates pulses. Constraining the counter reduces the device resources required for counter operation. Constraining the counter can also allow additional analog or counter tasks on the device to run concurrently. For continuous counter tasks, NI-DAQmx consumes no device resources when the counter is constrained. For finite counter tasks, resource use increases with the frequency regardless of the constraint mode. However, fixed frequency constraints significantly reduce resource usage, and fixed duty cycle constraint marginally reduces it.
Public propertyCount
Indicates the current value of the count register.
Public propertyCounterTimebaseActiveEdge
Specifies whether a timebase cycle is from rising edge to rising edge or from falling edge to falling edge.
Public propertyCounterTimebaseDigitalFilterEnable
Specifies whether to apply the pulse width filter to the signal.
Public propertyCounterTimebaseDigitalFilterMinimumPulseWidth
Specifies in seconds the minimum pulse width the filter recognizes.
Public propertyCounterTimebaseDigitalFilterTimebaseRate
Specifies in hertz the rate of the pulse width filter timebase. NI-DAQmx uses this value to compute settings for the filter.
Public propertyCounterTimebaseDigitalFilterTimebaseSource
Specifies the input terminal of the signal to use as the timebase of the pulse width filter.
Public propertyCounterTimebaseDigitalSynchronizationEnable
Specifies whether to synchronize recognition of transitions in the signal to the internal timebase of the device.
Public propertyCounterTimebaseMasterTimebaseDivisor
Specifies the divisor for an external counter timebase. You can divide the counter timebase in order to generate slower signals without causing the count register to roll over.
Public propertyCounterTimebaseRate
Specifies in Hertz the frequency of the counter timebase. Specifying the rate of a counter timebase allows you to define output pulses in seconds rather than in ticks of the timebase. If you use an external timebase and do not specify the rate, you can define output pulses only in ticks of the timebase.
Public propertyCounterTimebaseSource
Specifies the terminal of the timebase to use for the counter. Typically, NI-DAQmx uses one of the internal counter timebases when generating pulses. Use this property to specify an external timebase and produce custom pulse widths that are not possible using the internal timebases.
Public propertyDataTransferMechanism
Specifies the data transfer mode for the device. For buffered operations, use DMA or USB Bulk. For non-buffered operations, use Polled.
Public propertyDataTransferRequestCondition
Specifies under what condition to transfer data from the buffer to the onboard memory of the device.
Public propertyDescription
Specifies a user-defined description for the channel.
(Inherited from Channel.)
Public propertyEnableInitialDelayOnRetrigger
Specifies whether to apply the initial delay to retriggered pulse trains.
Public propertyIsGlobal
Indicates whether the channel is a global channel.
(Inherited from Channel.)
Public propertyMemoryMappingEnable
Specifies for NI-DAQmx to map hardware registers to the memory space of the application, if possible. Normally, NI-DAQmx maps hardware registers to memory accessible only to the kernel. Mapping the registers to the memory space of the application increases performance. However, if the application accesses the memory space mapped to the registers, it can adversely affect the operation of the device and possibly result in a system crash.
Public propertyOutputState
Indicates the current state of the output terminal of the counter.
Public propertyOutputType
Indicates how to define pulses generated on the channel.
Public propertyPhysicalName
Specifies the name of the physical channel upon which this virtual channel is based.
(Inherited from Channel.)
Public propertyPrescaler
Specifies the divisor to apply to the signal you connect to the counter source terminal. Pulse generations defined by frequency or time take this setting into account, but pulse generations defined by ticks do not. You should use a prescaler only when you connect an external signal to the counter source terminal and when that signal has a higher frequency than the fastest onboard timebase.
Public propertyPulseDone
Indicates if the task completed pulse generation. Use this value for retriggerable pulse generation when you need to determine if the device generated the current pulse. For retriggerable tasks, when you query this property, NI-DAQmx resets it to .
Public propertyPulseDutyCycle
Specifies the duty cycle of the pulses. The duty cycle of a signal is the width of the pulse divided by period. NI-DAQmx uses this ratio and the pulse frequency to determine the width of the pulses and the delay between pulses.
Public propertyPulseFrequency
Specifies the frequency of the pulses to generate. This value is in the units you specify with PulseFrequencyUnits or when you create the channel.
Public propertyPulseFrequencyInitialDelay
Specifies in seconds the amount of time to wait before generating the first pulse.
Public propertyPulseFrequencyUnits
Specifies the units in which to define pulse frequency.
Public propertyPulseHighTicks
Specifies the number of ticks the pulse is high.
Public propertyPulseHighTime
Specifies the amount of time that the pulse is at a high voltage. This value is in the units you specify with PulseTimeUnits or when you create the channel.
Public propertyPulseIdleState
Specifies the resting state of the output terminal.
Public propertyPulseLowTicks
Specifies the number of ticks the pulse is low.
Public propertyPulseLowTime
Specifies the amount of time that the pulse is at a low voltage. This value is in the units you specify with PulseTimeUnits or when you create the channel.
Public propertyPulseTerminal
Specifies on which terminal to generate pulses.
Public propertyPulseTicksInitialDelay
Specifies the number of ticks to wait before generating the first pulse.
Public propertyPulseTimeInitialDelay
Specifies in seconds the amount of time to wait before generating the first pulse.
Public propertyPulseTimeUnits
Specifies the units in which to define high and low pulse time.
Public propertyReadyForNewValue
Indicates whether the counter is ready for new continuous pulse train values.
Public propertySynchronizationUnlockBehavior
Specifies the action to take if the target loses its synchronization to the grand master.
(Inherited from Channel.)
Public propertyType
Indicates the type of the virtual channel.
(Inherited from Channel.)
Public propertyUsbTransferRequestCount
Specifies the maximum number of simultaneous USB transfers used to stream data. Modify this value to affect performance under different combinations of operating system and device.
Public propertyUsbTransferRequestSize
Specifies the maximum size of a USB transfer request in bytes. Modify this value to affect performance under different combinations of operating system and device.
Public propertyUseOnlyOnBoardMemory
Specifies whether to write samples directly to the onboard memory of the device, bypassing the memory buffer. Generally, you cannot update onboard memory directly after you start the task. Onboard memory includes data FIFOs.
Public propertyVirtualName
Gets the name of the virtual channel.
(Inherited from Channel.)
Top

Methods

  NameDescription
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose
Releases all resources used by Channel.
(Inherited from Channel.)
Protected methodDispose(Boolean)
Releases the managed and unmanaged resources used by Channel or optionally releases only the unmanaged resources.
(Inherited from Channel.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodToString
Returns a string representation of the object.
(Inherited from Channel.)
Top

Remarks

Use the COChannels property to create or access a counter/timer output channel. A COChannel might contain more than one virtual channel because the COChannel is defined by providing a valid NI-DAQmx channel string to the COChannels indexer or to a COChannelCollection create channel method. If you set a property on a COChannel object that represents multiple channels, that property is set for all of the channels that the object represents.
Tip Tip
Example applications are located in the Public Documents\National Instruments\NI-DAQ\Examples\DotNET4.x directory or in the Start menu at National InstrumentsNI-DAQmxNI-DAQmx Examples.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Log in to get a better experience