LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why Do I Get Error -200397 Unable to link NIDAQmx library nicaiu.dll

I'm using PXI RT Controller. in my laptop MAX, i can see all the PXI devices under "Remote". when i run a simple program to reset the device. i get the eroor of -200397.
Below is my code.
Please refer to the attachment for the error message.
 
thank you.
 
#include <windows.h>
#include <ansi_c.h>
#include "NIDAQmx.h"
#include <cvirte.h>
extern int CVIFUNC RTIsShuttingDown (void);
void CVIFUNC_C RTmain (void)
{
 char strTemp[88];
 
 if (InitCVIRTE (0, 0, 0) == 0)
  return;    /* out of memory */
 /* your initialization code */
 while (!RTIsShuttingDown ())
 {
  /* your code */
  /* sleep for some amount of time to give the desired loop rate */
  /* if you do not sleep lower priority threads will never run   */
  
  printf ("WebSuite\t\t\t");
  DAQmxGetSystemInfoAttribute (DAQmx_Sys_DevNames, strTemp, 88);
  
  DAQmxResetDevice ("PXI1Slot13");
   
  Sleep (5);
 }
 /* your cleanup code */
 CloseCVIRTE ();
}
 

 
0 Kudos
Message 1 of 8
(8,251 Views)
What version of CVI RT and DAQmx are you using?

I suspect that you installed CVI RT after you ran the DAQmx installer and therefore you are missing LabWindows/CVI Real-Time Support for DAQmx

You can check for LabWindows/CVI Real-Time Support for DAQmx by looking for NIDAQmx_lvrt.lib in the <CVI>\bin directory.  If you do not find NIDAQmx_lvrt.lib, then you should go to Control Panel >> Add/Remove Programs >> National Instruments Software, select Change/Remove, select NIDAQmx, and select the Modify button.  This will re-run the DAQmx installer.  Make sure that the LabWindows/CVI Real-Time Support item under NIDAQmx is selected in the installer and install it.  When the installer is finished, verify the presence of <CVI>\bin\NIDAQmx_lvrt.lib.

After installing, you should also go to MAX, expand your target, select the Software subitem, and select Add/Remove Software.  Install (or re-install) DAQmx to the real-time target.

Then rebuild and re-run your program on the real-time target.

Hopefully this fixes the problem.  If not, reply back and we'll try to figure it out.

-Jeff



0 Kudos
Message 2 of 8
(8,211 Views)

thanks for your response.

I got 2 version of CVI. which is 8.1 & 8.0.1. for CVI RT i only have 8.0.1. DAQmx is 8.5.

i saw NIDAQmx_lvrt.lib in the folder of CVI 8.1 bin directory. i tried your matter but i not work.  i believe is because i cant see the NIDAQmx_lvrt.lib in 8.0.1 bin folder. but after i copy the file it's still not function.

Please advice. thank you.

J.T

0 Kudos
Message 3 of 8
(8,138 Views)
J.T.,

Did you rebuild your project before running it again?  If not, try that.

If you have NIDAQmx_lvrt.lib in the <CVI80>\bin directory, then CVI 8.0.1 should automatically link in that copy of the import library when building real-time projects.  As long as you have DAQmx installed on your real-time target via MAX, then your DAQmx calls should work as expected.

Assuming your project still doesn't work, what error message do you get now?  Did it still say nicaiu.dll could not be found or did it say nicaip.dll could not be found?  Note that one filename ends with a U and the other with a P.  That would help me figure out what is going wrong.

If the error still says nicaiu.dll, then that means CVI 8.0.1 is not really linking in NIDAQmx_lvrt.lib as expected.  You could try adding NIDAQmx_lvrt.lib as a file in your project (Edit >> Add Files To Project... >> Library).  That should guarantee that CVI links in the correct library.  Then try rebuillding your project and running it again.

Let me know how it works.

-Jeff

0 Kudos
Message 4 of 8
(8,020 Views)
Hi,
 
 I tried to re-build also can not.
 
my error message still nicaiu.dll could not be found. i tried to copy the nicaiu.dll to RT Target. c:\ni-rt\system\. and added a path in the ni-rt.ini in the startup line. but it still the same problem.
 
what i believe is the nidaqmx is not installed in RT Target. but i can see from the MAX Remote System is installed.
 
J.T
 
0 Kudos
Message 5 of 8
(7,955 Views)
What do you mean "I tried to re-build also can not"?  Does rebuilding fail with a compiler or linker error?  Or did you rebuild successfully, but you still got the same nicaiu.dll error at run-time?

The problem is that your project is linking against NIDAQmx.lib, which requires nicaiu.dll at run-time, which does not exist on a real-time system and will not work even if you copy it to the real-time system.

Instead, you need to link against NIDAQmx_lvrt.lib, which requires nicaip.dll, which should already be installed on the real-time system by MAX.

-Jeff
0 Kudos
Message 6 of 8
(7,322 Views)
Jeff,
 
     i tried to start from the templates, and re-build also fail. there is no compiler or linker error.
 
    included the NIDaQmx_lvrt.lib is fail also.
 
   thank you.
J.T
0 Kudos
Message 7 of 8
(7,258 Views)

Hi J.T.,

We would like to help solve your CVI RT issue but we are having a little trouble grasping your entire situation (discussion forums are not always the best median sometimes). I talked with Jeff and we think it’s probably best if you go ahead and contact your local tech support team to get a service request created on this issue. This way we can have somebody talk with you live and then if needed relay relay that information back to us

Our support teams are really great so go ahead and give them a call.  You can request support here.

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 8 of 8
(7,223 Views)