Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

python doesn't recognize devices

Solved!
Go to solution

Hello

I am trying to use python nidaqmx to acquire data from NI devices

for starters I am trying to acquire data from a simulated device. the device is recognized by NI max, but python doesn't seem to recognize it.

 

I am attaching screenshots of my code, the error message and my NI MAX screen. I also tried replacing "cDAQ1_1" with "cDAQ1Mod1_1" and got the same error message.

 

would be thankful for any assistance.

Nathan

Download All
0 Kudos
Message 1 of 4
(984 Views)

You need to specify the channel string as per this syntax - https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8qaSAC&l=en-US

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 4
(964 Views)

thank you for your answer Santo.

I am unable to understand the correct channel name. I tried

cDAQ1_1/cDAQ1Mod1_1

cDAQ1_1/a0

cDAQ1_1/Mod1_1

cDAQ1_1/Mod1

 

and for all of them I obtained the error "Physical channel specified does not exist on this device."

 

the documentation wrote " The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system." But I dont understand how to access this constant.

 

would be thankful for additional assistance. would be also thankful for any youtube tutorials etc that could teach me how to use python with NI devices

0 Kudos
Message 3 of 4
(958 Views)
Solution
Accepted by Nathan_Blanc

You should use <InstrAlias>/<channel> format

 

In your case, the instrument alias is cDAQ1Mod1_1 and the channel would be ai0.

 

Use "cDAQ1Mod1_1/ai0" as a Physical channel, you don't need to consider the cDAQ chassis name in the format.

 

Edit: DAQmx physical channel constant is for LabVIEW

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 4 of 4
(954 Views)