Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Python with NI USB-8451 OEM

Solved!
Go to solution

Hello everybody.

 

My main goal is to use python to control some NI devices which I could do it with the NI USB-6501 OEM version but not the 8451.

I used nidaqmx in python and it's not working because I think the NI device is not recognized like the 6501 (not shown in NI device monitor)

I can see it with NI MAX and I renamed it into Dev3.

When I run these python line code for see every device connected it doesn't appear :

 

import nidaqmx

system = nidaqmx.system.System.local()

for device in system.devices:
     devices = str(device)
     print(devices)

 

console return :

Device(name=SimDev1)

 

 

I uninstall reinstall several time the NI 845x driver 17 (and 18, I'm using version 17)

 

I've try also with this http://www.ni.com/example/8911/en/

but according to the exemple 2 I've tried this :

I use -> physicalChannel = "Dev3" , not sure if it's correct but I've tried Dev3/ai0, Dev3/port0/line0 and it always return the same error.

 

Python 2:

Line 55 : returnValue = dll.DAQmxCreateAIVoltageChan(taskHandle, physicalChannel, channelName, terminalConfig, minVal, maxVal, units, customScaleName)

return : -200220

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019PCxSAM&l=fr-CH

Error -200220 occurred.
Possible reason(s):
Device identifier is invalid.

 

Python3 :

Line 55 again

return : -200088

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019QMjSAM&l=fr-CH

Error -200088: Task specified is invalid or does not exist.

 

If anyone can help me with that, because now I'm struggling and ruining out of idea .

 

Best regards

 

Adrien

0 Kudos
Message 1 of 5
(2,976 Views)

Hi Adrien,

 

the USB-8451 is no DAQmx Device so it will not work with the Python-DAQmx Library.

Unfortunately there is no Python Library available for this device yet.

--------------------------------------------------------------------------------------------------------
Work with NI Hard- and Software for about 15 years now.

Certified LabVIEW Developer & TestStand Developer/Architect

--------------------------------------------------------------------------------------------------------

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 2 of 5
(2,952 Views)

Okay thank you for your answer.

 

But it means that even with the dll it will not work either ? Because we need to use the device name which implies to be an "DAQmx device" ?

 

Regards

 

Adrien

0 Kudos
Message 3 of 5
(2,948 Views)
Solution
Accepted by topic author aguilem

Hi Adrien,

 

in the Readme of the DAQmx Driver you can find a list of supported Devices.

--------------------------------------------------------------------------------------------------------
Work with NI Hard- and Software for about 15 years now.

Certified LabVIEW Developer & TestStand Developer/Architect

--------------------------------------------------------------------------------------------------------

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 4 of 5
(2,938 Views)

Okay thank you, I checked and there isn't the 8451.

 

thanks for you answers.

0 Kudos
Message 5 of 5
(2,924 Views)