I'm attempting to use the Python nidaqmx library to make current measurements from one of my NI devices. I keep running into an issue where I'm told that I'm using the wrong I/O type for my virtual channel.
Physical Channel Name: ao0
Virtual Channel Name: Dev1/ao0
I/O Type Required for Virtual Channel: DAQmx_Val_AI
I understand that this is saying I need to use an analog input channel, but that is what I'm using.
with nidaqmx.Task() as task:
current_channel = task.ai_channels.add_ai_current_chan("Dev1/ao0")
current_channel.ai_max = 10.0
current_channel.ai_min = -10.0
You're specifying an ao channel, you should be specifying ai0.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).