Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

windows python nidaqmx error

Solved!
Go to solution

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

0 Kudos
Message 1 of 7
(1,568 Views)

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.

 

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 7
(1,546 Views)
Solution
Accepted by topic author KengPower

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

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

0 Kudos
Message 3 of 7
(1,513 Views)

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 

0 Kudos
Message 4 of 7
(1,506 Views)

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

0 Kudos
Message 5 of 7
(1,484 Views)

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.

0 Kudos
Message 6 of 7
(1,471 Views)

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

0 Kudos
Message 7 of 7
(1,420 Views)