Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxCreateAOVoltageChan error -200220

Solved!
Go to solution

I want to send a signal on my NI USB-6009 using the NI-DAQmx C implementation. I want to sent a continuous signal and implement this function in Python 3. For this, I first tried the example of scipy cookbook, which I adapted

 

First I try to use the this example, but I always get the error -200220: 'Device identifier is invalid.' when calling DAQmxCreateAOVoltageChan, even though the device is listed as "Dev1" in Ni MAX.

0 Kudos
Message 1 of 2
(4,654 Views)
Solution
Accepted by topic author smiddy

I got the error on myself:

 

The error is the wrong assignment of the device: In Python 3, to hand over the physicalChannel property, the string has to be in bytes. Hence a quick fix to

 

        self.CHK(nidaq.DAQmxCreateAOVoltageChan( self.taskHandle,
                                   b"Dev1/ao0",
                                   "",
                                   float64(-10.0),
                                   float64(10.0),
                                   DAQmx_Val_Volts,
                                   None))

 solves the problem

0 Kudos
Message 2 of 2
(4,652 Views)