- class nidaqmx._task_modules.di_channel_collection.DIChannelCollection(task_handle, interpreter)
Contains the collection of digital input channels for a DAQmx Task.
- add_di_chan(lines, name_to_assign_to_lines='', line_grouping=LineGrouping.CHAN_FOR_ALL_LINES)
Creates channel(s) to measure 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 the 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.
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.
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.
- 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.