01-03-2022 04:21 AM
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
Solved! Go to Solution.
01-03-2022 08:54 AM
You need to specify the channel string as per this syntax - https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8qaSAC&l=en-US
01-03-2022 09:55 AM
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
01-03-2022 10:02 AM - edited 01-03-2022 10:03 AM
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