nidaqmx.task.do_channel_collection

class nidaqmx._task_modules.do_channel_collection.DOChannelCollection(task_handle, interpreter)[source]

Bases: nidaqmx._task_modules.channel_collection.ChannelCollection

Contains the collection of digital output channels for a DAQmx Task.

add_do_chan(lines, name_to_assign_to_lines='', line_grouping=LineGrouping.CHAN_FOR_ALL_LINES)[source]

Creates channel(s) to generate digital signals. You can group digital lines into one digital channel or separate them into multiple digital channels. If you specify one or more entire ports in lines input by using port physical channel names, you cannot separate the ports into multiple channels. To separate ports into multiple channels, use this function multiple times with a different port each time.

Parameters
  • lines (str) – Specifies the names of the digital lines or ports to use to create virtual channels. The DAQmx physical channel constant lists all lines and ports for devices installed in the system.

  • name_to_assign_to_lines (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.

  • line_grouping (Optional[nidaqmx.constants.LineGrouping]) – Specifies how to group digital lines into one or more virtual channels. If you specify one or more entire ports with the lines input, you must set this input to one channel for all lines.

Returns

Indicates the newly created channel object.

Return type

nidaqmx._task_modules.channels.do_channel.DOChannel

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.