From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Python nidaqmx error 200430 (wrong I/O type)

Solved!
Go to solution

Hi all,

 

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

 

 

Not sure what the issue is.

0 Kudos
Message 1 of 3
(1,831 Views)
Solution
Accepted by topic author jsmith2020

You're specifying an ao channel, you should be specifying ai0.

 

 

-Kevin P

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).
0 Kudos
Message 2 of 3
(1,815 Views)

Not, useful. How can we apply voltage in device "NI USB-9264" through python code could you please guide me?

0 Kudos
Message 3 of 3
(1,225 Views)