11-16-2018 03:47 PM - edited 11-16-2018 03:48 PM
Hi NNovak,
Please take a look at our Knowledge Article that provides a solution to the behavior that you're seeing:
"Error -200077 Using Analog Output Task in Python"
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019UBpSAM&l=nl-NL
You'll need to change the way you define the task as described in that article.
Best,
Ben
11-16-2018 04:08 PM
Hi Ben,
thank you for your replay, I will have a look.
best
NNovak
11-16-2018 04:25 PM
Hi,
I try the code you recommended:
import nidaqmx
with nidaqmx.Task() as task:
task.ao_channels.add_ao_voltage_chan("Dev1/ao0", 0, 5,)
print('1 Channel 1 Sample Write: ')
print(task.write(1.0))
task.stop()
It does not work, it gives the same error!
NNovak
11-16-2018 04:29 PM
OK, now it works I forgot name_to_assign_to_channel which even if you do not have specified you have to add ''!
Thanks
NNovak