08-11-2022 03:25 AM
Hi all,
I am trying to use LabVIEW with an NI USB-6289 DAQ to create a simple PID control loop. However when i try and use DAQ assist to register inputs or outputs, once i've selected the appropriate channel and configured the setup and press "OK", I get the error stated in the title. I've noticed this issue has been posted sporadically over the past 10 years or so, and have followed the steps outlined in those. So far i have:
Uninstalled and reinstalled all NI programs from my computer, which included its own headache of registry editing to get the programs to install again. This included deleting temp data.
Uninstalled and reinstalled just LabView and DAQmx
Repaired LabView, DAQmx, and VISA, several times using the package manager.
If anyone has any other suggestions, it would be greatly appreciated.
Best,
Felix
08-12-2022 09:57 PM
You provided almost no helpful information to help you. No code (which can not only let us say "Oh, here's the problem ...", but, almost as important, can give us a clue not only what you are trying to do, but something abour your experience with LabVIEW). The only clue I could see is "DAQ Assist", which I think refers to what I call the "Dreaded DAQ Assistant" (and its Evil Twin, the Dynamic Data Wire).
I'm guessing it is likely the problem is in your code, not your LabVIEW installation. You also failed to tell us the LabVIEW version you are using.
Here's a suggestion -- attach your code. Compress the folder that includes all of the LabVIEW files in your Project, and attach that .ZIP files. This way, we can see what you did, see what version of LabVIEW you are using, get some idea of what you are trying to do, and maybe explain what is really happening with your code.
Bob Schor
08-13-2022 03:20 AM
Hi Bob,
Thanks for the reply. I am running Labview 2022 Q3 64bit
The issue is i have nothing to share really, no files, no code, as i can't get past the first step. I am just following the 2nd set of steps outlined in this: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P97CSAS&l=nl-NL using the DAQ assistant option to read and generate a voltage signal. But once i have selected and configured the appropriate AI/AO (selected timing options and input/output ranges) i am confronted with the "Labview code gen engine failed...". As i mentioned in my post i am trying to set up a PID controller which varies the voltage AO in order to match the AI with a set value, not dissimilar from the setup outlined in this video: https://www.youtube.com/watch?v=fkbt85mBzuM
Thanks again for taking the time to reply,
Felix
08-13-2022 08:17 AM
The simplest way to workaround (not solve) the issue is to go the DAQmx driver route than the DAQ Assistant.
If DAQmx were a bicycle, DAQ Assistant will be a bicycle with training wheels. DAQ Assistant will be good enough for you to get started but nothing beyond that. For your PID goal, you might be in a better place if you use the core DAQmx drivers instead of DAQ Assistant.
This is a great article to learn DAQmx drivers (skip the DAQ Assistant part) - https://www.ni.com/en-us/support/documentation/supplemental/06/learn-10-functions-in-ni-daqmx-and-ha...
08-13-2022 11:12 AM
The Daq Assistant is an Express VI. When you click on "OK", the Express VI's wizard creates or edits the underlying VI that's hiding inside the subVI. That wizard is running into a problem; could be something about your HW or SW that it can't handle, or it could be something is corrupt.
08-13-2022 11:15 AM
Felix,
I regret to tell you that I didn't read your original post carefully enough. Here's the critical line I missed:
@BurntOrange wrote:
Uninstalled and reinstalled all NI programs from my computer, which included its own headache of registry editing to get the programs to install again.
When uninstalling LabVIEW, you must "follow the rules" and specifically refrain from registry editing. Those of us (including myself, I regret to say, and twice before I learned my lesson) who tried "force-removing" generally ended up reformatting their C: drive, reinstalling Windows 10, reinstalling all their Apps, and restoring their Profile. [Needless to say, without taking that drastic step, I, for one, was not able to reinstall any version of LabVIEW, which prompted me to "repair my whole Windows installation"].
Two more (now somewhat minor) points:
Bob Schor
08-22-2022 08:23 AM
Hi, you may be running into the DAQmx bug listed at LabVIEW 2022 Q3 Known Issues. (Bug number 2065508.) Give the workaround listed in the known issues a try, if possible. Otherwise, another workaround is to switch to using the DAQmx API functions as others have recommended.