Hey there, i am currently trying to execute a simple example and i am getting the above mentioned error. The card i am trying to connect to is a PCI-DIO-96, i am running windows 7/ python 3.7.3 and using Pycharm. I have also installed the NI-DAQmx driver.
Traceback ( most recent call last):
File "C:/pycharm/prolog.py", line 11, in
task.CreateDOChan("/Dev2/port0/line0:7","",PyDAQmx,DAQmx_Val_ChanForAllLines)
NameError: name 'PyDAQmx' is not defined
Hey there, i am currently trying to execute a simple example and i am getting the above mentioned error. The card i am trying to connect to is a PCI-DIO-96, i am running windows 7/ python 3.7.3 and using Pycharm. I have also installed the NI-DAQmx driver.
I found the example code here : https://pythonhosted.org/PyDAQmx/examples/digital_output.html
Code below:
from PyDAQmx import Task import numpy as np
data = np.array([0,1,1,0,1,0,1,0], dtype=np.uint8)
task = Task() task.CreateDOChan("/TestDevice/port0/line0:7","",PyDAQmx.DAQmx_Val_ChanForAllLines) task.StartTask() task.WriteDigitalLines(1,1,10.0,PyDAQmx.DAQmx_Val_GroupByChannel,data,None,None) task.StopTask()
Error :
Traceback ( most recent call last): File "C:/pycharm/prolog.py", line 11, in
task.CreateDOChan("/Dev2/port0/line0:7","",PyDAQmx,DAQmx_Val_ChanForAllLines)
NameError: name 'PyDAQmx' is not defined
Any idea what could be the problem?