Failed to Load Shared Library imaq.dll on Real-Time Controller

Updated Dec 22, 2023

Reported In

Software

  • LabVIEW Real-Time Module

Driver

  • NI-IMAQ
  • NI-IMAQdx
  • Vision Acquisition Software

Issue Details

I wrote a LabVIEW VI to acquire images from a GigE camera connected to my Real-Time target, as shown below:

However, when deploying the VI on the remote target from my LabVIEW project, I got the following error:

xxx.VI loaded with errors on the target and was closed.
LabVIEW: Failed to load shared library imaq.dll
Ensure that the library is present on the RT target. Use either MAX to install NI software or FTP to transfer custom libraries to the RT target.

 


How can I fix this error?
 

Solution

You have to check the following things:
  1. check which image acquisition driver supports your camera model: in fact, there are three different drivers (all contained in Vision Acquisition Software), NI-IMAQ, NI-IMAQdx, and NI-IMAQ I/O, which need to be used based on the camera. For example, in order to acquire images from a GigE or USB camera you will need to use NI-IMAQdx driver
  2. ensure that your code is using the proper driver version. The code in the screenshot above, for example, is using NI-IMAQ VIs, which are not correct in case of GigE cameras and should be replaced with NI-IMAQdx VIs. You can find NI-IMAQ and NI-IMAQdx function palettes in LabVIEW block diagram under Vision and Motion palette
  3. ensure that the right driver (NI-IMAQ or NI-IMAQdx) is properly installed on your Real-Time target. You can install software on a Real-Time target in Measurement & Automation Explorer (NI MAX)