nidaqmx.task.co_channel
- class nidaqmx._task_modules.channels.co_channel.COChannel(task_handle, virtual_or_physical_name)[source]
Bases:
nidaqmx._task_modules.channels.channel.Channel
Represents one or more counter output virtual channels and their properties.
- property chan_type
Indicates the type of the virtual channel.
- property channel_names
Specifies the unflattened list of the virtual channels.
- Type
List[str]
- property co_auto_incr_cnt
Specifies a number of timebase ticks by which to increase the time spent in the idle state for each successive pulse.
- Type
int
- property co_constrained_gen_mode
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.
- property co_count
Indicates the current value of the count register.
- Type
int
- property co_ctr_timebase_active_edge
Specifies whether a timebase cycle is from rising edge to rising edge or from falling edge to falling edge.
- property co_ctr_timebase_dig_fltr_enable
Specifies whether to apply the pulse width filter to the signal.
- Type
bool
- property co_ctr_timebase_dig_fltr_min_pulse_width
Specifies in seconds the minimum pulse width the filter recognizes.
- Type
float
- property co_ctr_timebase_dig_fltr_timebase_rate
Specifies in hertz the rate of the pulse width filter timebase. NI-DAQmx uses this value to compute settings for the filter.
- Type
float
- property co_ctr_timebase_dig_fltr_timebase_src
Specifies the input terminal of the signal to use as the timebase of the pulse width filter.
- Type
str
- property co_ctr_timebase_dig_sync_enable
Specifies whether to synchronize recognition of transitions in the signal to the internal timebase of the device.
- Type
bool
- property co_ctr_timebase_master_timebase_div
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.
- Type
int
- property co_ctr_timebase_rate
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.
- Type
float
- property co_ctr_timebase_src
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.
- Type
str
- property co_data_xfer_mech
nidaqmx.constants.DataTransferActiveTransferMode
: Specifies the data transfer mode for the device. For buffered operations, use DMA or USB Bulk. For non-buffered operations, use Polled.
- property co_data_xfer_req_cond
nidaqmx.constants.OutputDataTransferCondition
: Specifies under what condition to transfer data from the buffer to the onboard memory of the device.
- property co_enable_initial_delay_on_retrigger
Specifies whether to apply the initial delay to retriggered pulse trains.
- Type
bool
- property co_mem_map_enable
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.
- Type
bool
- property co_output_state
Indicates the current state of the output terminal of the counter.
- property co_output_type
Indicates how to define pulses generated on the channel.
- property co_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.
- Type
int
- property co_pulse_done
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 False.
- Type
bool
- property co_pulse_duty_cyc
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.
- Type
float
- property co_pulse_freq
Specifies the frequency of the pulses to generate. This value is in the units you specify with co_pulse_freq_units or when you create the channel.
- Type
float
- property co_pulse_freq_initial_delay
Specifies in seconds the amount of time to wait before generating the first pulse.
- Type
float
- property co_pulse_freq_units
Specifies the units in which to define pulse frequency.
- property co_pulse_high_ticks
Specifies the number of ticks the pulse is high.
- Type
int
- property co_pulse_high_time
Specifies the amount of time that the pulse is at a high voltage. This value is in the units you specify with co_pulse_time_units or when you create the channel.
- Type
float
- property co_pulse_idle_state
Specifies the resting state of the output terminal.
- property co_pulse_low_ticks
Specifies the number of ticks the pulse is low.
- Type
int
- property co_pulse_low_time
Specifies the amount of time that the pulse is at a low voltage. This value is in the units you specify with co_pulse_time_units or when you create the channel.
- Type
float
- property co_pulse_term
Specifies on which terminal to generate pulses.
- Type
str
- property co_pulse_ticks_initial_delay
Specifies the number of ticks to wait before generating the first pulse.
- Type
int
- property co_pulse_time_initial_delay
Specifies in seconds the amount of time to wait before generating the first pulse.
- Type
float
- property co_pulse_time_units
Specifies the units in which to define high and low pulse time.
- property co_rdy_for_new_val
Indicates whether the counter is ready for new continuous pulse train values.
- Type
bool
- property co_usb_xfer_req_count
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.
- Type
int
- property co_usb_xfer_req_size
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.
- Type
int
- property co_use_only_on_brd_mem
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.
- Type
bool
- property description
Specifies a user-defined description for the channel.
- Type
str
- property is_global
Indicates whether the channel is a global channel.
- Type
bool
- property name
Specifies the name of the virtual channel this object represents.
- Type
str
- property physical_channel
nidaqmx.system.physical_channel.PhysicalChannel
: Specifies the name of the physical channel upon which this virtual channel is based.
- save(save_as='', author='', overwrite_existing_channel=False, allow_interactive_editing=True, allow_interactive_deletion=True)
Saves this local or global channel to MAX as a global channel.
- Parameters
save_as (Optional[str]) – Is the name to save the task, global channel, or custom scale as. If you do not specify a value for this input, NI-DAQmx uses the name currently assigned to the task, global channel, or custom scale.
author (Optional[str]) – Is a name to store with the task, global channel, or custom scale.
overwrite_existing_channel (Optional[bool]) – Specifies whether to overwrite a global channel of the same name if one is already saved in MAX. If this input is False and a global channel of the same name is already saved in MAX, this function returns an error.
allow_interactive_editing (Optional[bool]) – Specifies whether to allow the task, global channel, or custom scale to be edited in the DAQ Assistant. If allow_interactive_editing is True, the DAQ Assistant must support all task or global channel settings.
allow_interactive_deletion (Optional[bool]) – Specifies whether to allow the task, global channel, or custom scale to be deleted through MAX.
- property sync_unlock_behavior
Specifies the action to take if the target loses its synchronization to the grand master.