LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"LabVIEW Code Generation failed to execute"

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

 

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

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

0 Kudos
Message 2 of 7
(3,525 Views)

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

0 Kudos
Message 3 of 7
(3,518 Views)

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...

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 7
(3,512 Views)

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.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 7
(3,503 Views)


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:

  • The "bad news" is that you didn't attach your code, so other than telling you to avoid the DAQ Assistant and "Learn 10 Functions in NI DAQmx and Handle 80 Percent of your Data Acquisition Applications" (Google that), we can't see if there is something "obvious" in your code.  It may be too late now, but even a "picture" (which I've been know to rail against!) would have helped.
  • The "not-so-bad" news is that if you had attached your code, many of the more experienced users of the Forum (and I'm including myself) wouldn't be able to open it, as I'd guess that very few of us have loaded the latest LabVIEW release.  Some (such as I) have never installed 64-bit LabVIEW (but I may be tempted to try it out on a VM just to see if it works for me ...).  This makes the former "bad news" not so bad -- a Picture here is worth 1000 VIs-that-we-can't-open.

Bob Schor

 

 

0 Kudos
Message 6 of 7
(3,501 Views)

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.

0 Kudos
Message 7 of 7
(3,453 Views)