09-02-2025 06:58 AM
I've got a small program that does data acquisition via a couple of tasks on a CompactDAQ USB chassis. LabVIEW is 2023 Q1, NI-DAQmx is 2023 Q4. Everything works fine, and has for years.
I'm attempting to compile a version of the application to run on a computer without a full LabVIEW license. I've done that many times in the past, with various types of data acquisition, and never had any issues before.
However, after installing the correct LabVIEW Runtime Engine, NI-DAQmx, and importing hardware and task configurations, when I run the .exe it opens but immediately dies on an "unknown" error in DAQmx Start Task.vi:7220001. Looking around, it appears that the issue is that the .exe expects to have a specific version of DAQmx Start Task, and is not finding it. The issue is, I cannot figure out what it's missing, or how to install it.
I have what appears to be the correct runtime of both LabVIEW and NI-DAQmx, and when I compare the installed components on the development computer to the target computer, everything matches except NI-DAQmx ADI. I tried building a full installer with the runtimes and installing that, same result. I tried repairing the entire NI-DAQmx install and checking all the optional add-ons, which took several hours, still the same result.
Any suggestions what the particular package I'm supposed to be using is?
When the .exe is used on a computer that has the full version of LabVIEW installed, it runs fine, with the exact same configuration and version of NI-DAQmx / NI-MAX installed, so the compiled application isn't broken, I just can't figure out how to get the correct LabVIEW DAQ components installed without a full LabVIEW install.
09-02-2025 08:29 AM
I'm not an "expert" in building LabVIEW executables, but I know that if you build an executable on your "LabVIEW" machine, you can run it on that machine because it has the required LabVIEW RunTime installed. My colleagues who have more experience than I on running LabVIEW Executables on machines without LabVIEW tell me that you can either (a) build an "Installer", which packages up the LabVIEW Executable and also all the run-time packages required on the "target" machine, or you can go to the Target Machine and install LabVIEW Run Time separately. Note that some LabVIEW packages (such as LabVIEW Vision) require a separate (paid-for) license (which is probably true even if you use the LabVIEW Installer option).
I think NI has more information -- look up "Install LabVIEW Runtime Engine".
Bob Schor
09-02-2025 02:09 PM
Thank you for the suggestions, Bob.
Unfortunately, nothing there I haven't tried; I tried both building an installer (with the runtime packages included), and manually installing the runtimes (along with just about everything else I could think of), neither worked.
Interestingly, when I finally tried running my pre-built installer on a third machine, it didn't throw the same error, so that seems to point to there being something hosed with the NI install on this machine that even running a "repair" did not fix. Apparently a complete uninstall and reinstall is the next step. Given the several hours the last uninstall-reinstall cycle took I'm not particularly looking forward to it, but oh well.
09-03-2025 02:18 PM
This is mostly in case someone else runs into the same problem, although if there are any other suggestions I'd love to hear them.
I've narrowed it down to something wrong with this particular computer; the LabVIEW-built installer that includes the runtimes works just fine on other machines I've tried it on, but this particular computer absolutely will not run the .exe without complaining about the DAQmx vi no matter what I do.
I've done multiple rounds of uninstalling and reinstalling the runtimes, NI-DAQmx, and even went so far as to untinstall absolutely everything even peripherally related to NI--including the JKI and IVI stuff--then go and manually delete all the (almost completely empty) National Instruments folders in C:\Program Files, C:\Program Files (x86), and C:\ProgramData, THEN reinstall from scratch, still the same error. I even tried installing a full demo version of LabVIEW rather than just the runtimes, same error again.
I don't understand what in the guts of Windows has some remnant that just will not uninstall, and isn't fixed by reinstalls, but it's there. Weirder still, it worked on this same machine at one point, but a separate pre-built LabVIEW IVI driver was not, so I had done an uninstall and reinstall to try to fix that.
The only lesson I've learned from this so far is "If you get weird errors, reinstall Windows, because no amount of NI uninstalls or repairs will ever fix it." Were only that this wasn't a client computer and I had that option.
09-04-2025 08:10 AM
Shot in the dark, but on the computer experiencing the error, in WIndows start Services and see if the NI Device Loader service is running.
In the past I have experienced issues due to Windows/Corporate updates taking precedence and the service never started up, setting it to Delayed Start fixed the DAQmx errors that were being thrown.
-AK2DM
09-05-2025 02:25 PM
I am something of an expert here. So, there are a few things about your code that I need to ask (and suggest)
09-05-2025 02:40 PM
Appreciate the suggestion, AnalogKid2DigitalMan, anything was worth a try. That service was, however, up and running just fine.
09-05-2025 02:54 PM - edited 09-05-2025 03:01 PM
Thank you for the interest, JÞB.
- The tasks are created in NI-MAX, not in the program itself. They're selected from a standard DAQ task control.
- And no, I did not initially have the full MAX export set up in the installer (it was originally supposed to be a quickie job so I had not originally even built an installer, just manually installed the runtimes and imported the .nce by hand. I should in general be building with the export in the installer, though, which is a good point.
That said, I'm 99% certain that the task setup has nothing to do with the point of failure I'm seeing. In that: A) The exact same compiled .exe and/or installer works perfectly fine on other computers. And B) In normal operation, if I run the program with no tasks yet set up (and/or nonexistent tasks selected in the controls), I will get a regular LabVIEW error output from the DAQmx Start Task. It of course won't actually start the task, because it can't, but the top-level program will continue running and the error output cluster will indicate why it couldn't start the task.
In this case, the instant it tries to run DAQmx Start Task, the entire program dies completely with the message:
LabVIEW: (Hex0x3FA) Unspecified Error Occurred.
The Top-level VI "[VI in question]" was stopped at unknown on the block diagram of "DAQmx Start Task.vi:7220001".
The program only calls that start task a single time, for a single DAQmx task, so I know that it dies as soon as it hits it. In many years of dealing with various flavors of DAQmx errors, I have never seen that before, and it appears to be rooted in the runtime being unable to find the code it's supposed to be running for that .vi.
Which, after a bunch more fiddling, maps to what seems to have happened: In the process of the computer owner's previous attempt to install a demo version of LabVIEW with a bunch of extras, then using NI Package Manager to uninstall all of that, something internal got broken to the point no amount of reinstall, repair, or removal will fix it.
After several cycles of the above, I can no longer even install LabVIEW--I figured I would try doing a full reinstall of the demo version of LabVIEW and run the actual .vi instead of the complied version to see if it was even possible to get around the runtime error, but the LabVIEW installer now dies on one of the sub-component installs and will not progress.
Unless there's a downloadable "Really, REALLY uninstall everything form NI" that I'm not finding, a Windows reinstall seems to be the only way forward at this point.
[Also, an aside if anyone else runs into this thread with a similar problem: I am not certain, but suspect, that Kaspersky antivirus may have contributed to this situation. It was not disabled (and uninstalled) until after the first round of install and uninstall, and somewhere in there it detected the LabVIEW installer as malware, so I know it was being a nuisance. Uninstall/reinstall with Kaspersky gone didn't help, and it's possible that was a red herring, but my working theory is that it broke something early on that's now unfixable.]