03-27-2023 03:27 AM
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!
Solved! Go to Solution.
03-27-2023 08:33 AM
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
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.
03-29-2023 06:27 AM
When I run `import numpy`, the same error occurs.
I use the vs2012 and use C language to program, it works.
03-29-2023 07:05 PM
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
03-30-2023 09:16 PM
It doesn't work this way. I write a python script and run with command `python filename.py`, the same error occurres.
03-31-2023 04:31 PM
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.
04-04-2023 01:27 AM
I've given up using python and I'll use the C language with VS2012, it works well.