From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Qt NIDAQmx Error with sample code DAQmxErrChk(DAQmxCreateTask("MyTask", &taskHandle));

I am using qt and the following import and include statements in my project file to link the library and the compiler

LIBS += "C:/Program Files (x86)/National Instruments/Shared/ExternalCompilerSupport/C/lib64/msvc/NIDAQmx.lib"
INCLUDEPATH += "C:/Program Files (x86)/National Instruments/Shared/ExternalCompilerSupport/C/include"

 When I build the sample code to obtain just some voltage samples, I am receiving an error 

DAQmx Error: Internal Software Error occurred in MIG software. Please contact National Instruments Support.
Task Name: MyTask

Status Code: -229771

 

from the first statement 

    DAQmxErrChk(DAQmxCreateTask("MyTask", &taskHandle));

 If anyone has any ideas on how to fix this issue please let me know as soon as possible. I have attached screenshots of my project file and my main file for additional reference as well. Thank you in advance!

 

 

Download All
0 Kudos
Message 1 of 2
(1,074 Views)

Hello,

you are mixing quite a few different things from what I see:

- C and C++

- QT and LabWindows (?)

- Windows (paths) and Linux/QNX

My (wild) guess is that the runtime does not initializes properly. For instance are you sure those paths should be in DOS syntax and not in Linux syntax ? Do you have ways to check how the niDAQmx library is loaded: via a (CVI?) runtime, a dynamic library or a static library. I'd probably run ldd on you executable and then run it with

strace -e trace=open

to see what's going on.

0 Kudos
Message 2 of 2
(1,029 Views)