cancel
Showing results for 
Search instead for 
Did you mean: 

windows python nidaqmx error

SOLVED
KengPower
Member
Solved!

windows python nidaqmx error

Message contains an image

I try to program with Python3 to read the DAQ data. But when I "import nidaqmx", an error window "Python has stopped working" pops up (as shown in Figure). I don't know how to fix it. Is there any suggestion? 

 

I also try to use the C program language but I have to install VS2008 or VS2012 which the Microsoft doesn't support now. Will the MinGw work? I only want to read the data from the DAQ.

 

Thanks for any answer!

 

running ui and my OS informationrunning ui and my OS information

6 REPLIES 6
ZYOng
Trusted Enthusiast

Re: windows python nidaqmx error

Message contains a hyperlink Message contains an image

Are you seeing the "Python has stopped working" issue when using another library like numpy?

 

For ANSI C programming, you can use any version of Visual Studio. From NI-DAQmx 21.8 Readme

ZYOng_0-1679923959801.png

The VS2008 or VS2012 is the version from which the example project was created from. They have not been updated for many years but they will run in the newer version of Visual Studio without any issue.

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
KengPower
Member
Solution

Re: windows python nidaqmx error

When I run `import numpy`, the same error occurs. 

I use the vs2012 and use C language to program, it works.

eduardomp8
Member

Re: windows python nidaqmx error

Message contains a hyperlink

You are trying to import numpy on your console. Instead of doing that, create a script and name it whatever you would like, and save it as a .py file. This script can then be run from your windows console using python -m name_of_your_script or python name_of_your_script.py

 

This video should be more easy to follow: https://www.youtube.com/watch?v=Shf5m_Uol9g 

KengPower
Member

Re: windows python nidaqmx error

It doesn't work this way. I write a python script and run with command `python filename.py`, the same error occurres.

Tags (1)
Highlighted
eduardomp8
Member

Re: windows python nidaqmx error

Very strange, did you try running it on another computer?

 

Sometimes python behaves strange in windows, I installed the other day a vector/image software (pretty good) inkscape, but it won't allow me to run python if I am already using inkscape.

 

I would try to run it again in another computer.

KengPower
Member

Re: windows python nidaqmx error

I've given up using python and I'll use the C language with VS2012, it works well.