COChannel Class
- Updated2023-02-21
- 9 minute(s) read
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
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
| Name | Description | |
|---|---|---|
| AutoIncrementCount | Specifies a number of timebase ticks by which to increase the time spent in the idle state for each successive pulse. | |
| ConstrainedGenerationMode | 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. | |
| Count | Indicates the current value of the count register. | |
| CounterTimebaseActiveEdge | Specifies whether a timebase cycle is from rising edge to rising edge or from falling edge to falling edge. | |
| CounterTimebaseDigitalFilterEnable | Specifies whether to apply the pulse width filter to the signal. | |
| CounterTimebaseDigitalFilterMinimumPulseWidth | Specifies in seconds the minimum pulse width the filter recognizes. | |
| CounterTimebaseDigitalFilterTimebaseRate | Specifies in hertz the rate of the pulse width filter timebase. NI-DAQmx uses this value to compute settings for the filter. | |
| CounterTimebaseDigitalFilterTimebaseSource | Specifies the input terminal of the signal to use as the timebase of the pulse width filter. | |
| CounterTimebaseDigitalSynchronizationEnable | Specifies whether to synchronize recognition of transitions in the signal to the internal timebase of the device. | |
| CounterTimebaseMasterTimebaseDivisor | 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. | |
| CounterTimebaseRate | 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. | |
| CounterTimebaseSource | 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. | |
| DataTransferMechanism | Specifies the data transfer mode for the device. For buffered operations, use DMA or USB Bulk. For non-buffered operations, use Polled. | |
| DataTransferRequestCondition | Specifies under what condition to transfer data from the buffer to the onboard memory of the device. | |
| Description | Specifies a user-defined description for the channel. (Inherited from Channel.) | |
| EnableInitialDelayOnRetrigger | Specifies whether to apply the initial delay to retriggered pulse trains. | |
| IsGlobal | Indicates whether the channel is a global channel. (Inherited from Channel.) | |
| MemoryMappingEnable | 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. | |
| OutputState | Indicates the current state of the output terminal of the counter. | |
| OutputType | Indicates how to define pulses generated on the channel. | |
| PhysicalName | Specifies the name of the physical channel upon which this virtual channel is based. (Inherited from Channel.) | |
| Prescaler | 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. | |
| PulseDone | 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 . | |
| PulseDutyCycle | 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. | |
| PulseFrequency | Specifies the frequency of the pulses to generate. This value is in the units you specify with PulseFrequencyUnits or when you create the channel. | |
| PulseFrequencyInitialDelay | Specifies in seconds the amount of time to wait before generating the first pulse. | |
| PulseFrequencyUnits | Specifies the units in which to define pulse frequency. | |
| PulseHighTicks | Specifies the number of ticks the pulse is high. | |
| PulseHighTime | 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. | |
| PulseIdleState | Specifies the resting state of the output terminal. | |
| PulseLowTicks | Specifies the number of ticks the pulse is low. | |
| PulseLowTime | 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. | |
| PulseTerminal | Specifies on which terminal to generate pulses. | |
| PulseTicksInitialDelay | Specifies the number of ticks to wait before generating the first pulse. | |
| PulseTimeInitialDelay | Specifies in seconds the amount of time to wait before generating the first pulse. | |
| PulseTimeUnits | Specifies the units in which to define high and low pulse time. | |
| ReadyForNewValue | Indicates whether the counter is ready for new continuous pulse train values. | |
| SynchronizationUnlockBehavior | Specifies the action to take if the target loses its synchronization to the grand master. (Inherited from Channel.) | |
| Type | Indicates the type of the virtual channel. (Inherited from Channel.) | |
| UsbTransferRequestCount | 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. | |
| UsbTransferRequestSize | 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. | |
| UseOnlyOnBoardMemory | 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. | |
| VirtualName | Gets the name of the virtual channel. (Inherited from Channel.) |
Methods
| Name | Description | |
|---|---|---|
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Dispose | Releases all resources used by Channel. (Inherited from Channel.) | |
| Dispose(Boolean) |
Releases the managed and unmanaged resources used by Channel or optionally releases only the unmanaged resources.
(Inherited from Channel.) | |
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| ToString | Returns a string representation of the object. (Inherited from Channel.) |
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.
| 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.