nidaqmx.task.co_channel_collection
- class nidaqmx._task_modules.co_channel_collection.COChannelCollection(task_handle)[source]
Bases:
nidaqmx._task_modules.channel_collection.ChannelCollection
Contains the collection of counter output channels for a DAQmx Task.
- add_co_pulse_chan_freq(counter, name_to_assign_to_channel='', units=FrequencyUnits.HZ, idle_state=Level.LOW, initial_delay=0.0, freq=1.0, duty_cycle=0.5)[source]
Creates channel(s) to generate digital pulses that freq and duty_cycle define. The pulses appear on the default output terminal of the counter unless you select a different output terminal.
- Parameters
counter (str) – Specifies the names of the counters to use to create the virtual channels. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.
name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.
units (Optional[nidaqmx.constants.FrequencyUnits]) – Specifies the units in which to define pulse frequency.
idle_state (Optional[nidaqmx.constants.Level]) – Specifies the resting state of the output terminal.
initial_delay (Optional[float]) – Is the amount of time in seconds to wait before generating the first pulse.
freq (Optional[float]) – Specifies at what frequency to generate pulses.
duty_cycle (Optional[float]) – Is the width of the pulse divided by the pulse period. NI-DAQmx uses this ratio combined with frequency to determine pulse width and the interval between pulses.
- Returns
Indicates the newly created channel object.
- Return type
- add_co_pulse_chan_ticks(counter, source_terminal, name_to_assign_to_channel='', idle_state=Level.LOW, initial_delay=0, low_ticks=100, high_ticks=100)[source]
Creates channel(s) to generate digital pulses defined by the number of timebase ticks that the pulse is at a high state and the number of timebase ticks that the pulse is at a low state. The pulses appear on the default output terminal of the counter unless you select a different output terminal.
- Parameters
counter (str) – Specifies the names of the counters to use to create the virtual channels. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.
source_terminal (str) – Is the terminal to which you connect an external timebase. A DAQmx terminal constant lists all terminals available on devices installed in the system. You also can specify a source terminal by specifying a string that contains a terminal name.
name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.
idle_state (Optional[nidaqmx.constants.Level]) – Specifies the resting state of the output terminal.
initial_delay (Optional[int]) – Is the number of timebase ticks to wait before generating the first pulse.
low_ticks (Optional[int]) – Is the number of ticks the pulse is low.
high_ticks (Optional[int]) – Is the number of ticks the pulse is high.
- Returns
Indicates the newly created channel object.
- Return type
- add_co_pulse_chan_time(counter, name_to_assign_to_channel='', units=TimeUnits.SECONDS, idle_state=Level.LOW, initial_delay=0.0, low_time=0.01, high_time=0.01)[source]
Creates channel(s) to generate digital pulses defined by the amount of time the pulse is at a high state and the amount of time the pulse is at a low state. The pulses appear on the default output terminal of the counter unless you select a different output terminal.
- Parameters
counter (str) – Specifies the names of the counters to use to create the virtual channels. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system.
name_to_assign_to_channel (Optional[str]) – Specifies a name to assign to the virtual channel this function creates. If you do not specify a value for this input, NI-DAQmx uses the physical channel name as the virtual channel name.
units (Optional[nidaqmx.constants.TimeUnits]) – Specifies the units in which to define pulse high and low time.
idle_state (Optional[nidaqmx.constants.Level]) – Specifies the resting state of the output terminal.
initial_delay (Optional[float]) – Is the amount of time in seconds to wait before generating the first pulse.
low_time (Optional[float]) – Is the amount of time the pulse is low.
high_time (Optional[float]) – Is the amount of time the pulse is high.
- Returns
Indicates the newly created channel object.
- Return type
- property all
nidaqmx._task_modules.channels.channel.Channel
: Specifies a channel object that represents the entire list of virtual channels on this channel collection.
- property channel_names
Specifies the entire list of virtual channels on this channel collection.
- Type
List[str]
- count(value) integer -- return number of occurrences of value
- index(value[, start[, stop]]) integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.