nidaqmx.utils
- nidaqmx.utils.flatten_channel_string(channel_names)[source]
Converts a list of channel names to a comma-delimited list of names.
You can use this method to convert a list of physical or virtual channel names to a single string prior to using the DAQmx Create Channel methods or instantiating a DAQmx Task object.
- Parameters
channel_names (List[str]) – The list of physical or virtual channel names.
- Returns
The resulting comma-delimited list of physical or virtual channel names.
- Return type
str
- nidaqmx.utils.unflatten_channel_string(channel_names)[source]
Converts a comma-delimited list of channel names to a list of names.
You can use this method to convert a comma-delimited list or range of physical or virtual channels into a list of physical or virtual channel names.
- Parameters
channel_names (str) – The list or range of physical or virtual channels.
- Returns
The list of physical or virtual channel names. Each element of the list contains a single channel.
- Return type
List[str]