Ce contenu n’est pas disponible dans votre langue préférée.

Le contenu est disponible dans une autre langue. Votre navigateur peut inclure des fonctionnalités qui vous aideront à traduire le texte.

Error 7 at the Call Library Function Node using LabVIEW

Updated Aug 31, 2023

Reported In

Software

  • LabVIEW

Issue Details

  • When running the executable on the target computer, there is an error code 7 at the Call Library Function Node. Why does this happen and how can I fix it? 
  • I moved a DLL to my RT PXI and have tried calling it but keep getting an error code 7.
  • When I try to run an application that calls a C DLL using the Call Library Function Node, I receive the following error message:
Error 7 occurred at Call Call Library function Node in ...
Possible reason(s):
LabVIEW: (Hex 0x7) File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.
 
error 7.png

Solution

This could be occurring because the target computer may be:
  • A different OS than the development computer - DLLs can change location or not even be available between different OS if you are calling a OS-specific DLL.
  • The path specified for the Call Library Function Node was built incorrectly or does not exist and the program cannot find the referenced DLL.

In order to troubleshoot this issue please follow the following steps:
  • Verify that both the development and target pcs have the same OS if you are calling OS-specific DLLs.
  • If the DLLs are from a 3rd party: Install the DLLs from the 3rd party software onto the target computer. Make sure that the referenced DLL is at the expected path.
  • If you are deploying the LabVIEW application using an executable to a different target PC, you can try adding the DLLs being referenced to the output folder of the built executable by following the instructions in this article: How Do I Add A DLL To A LabVIEW EXE?   
  • Open the VI being referenced in the error message, and make sure that the DLL(s) being called from this VI exists in the path defined in the Call Library Function Node. 
  • If you are specifying the DLL path on the block diagram and calling the DLL using subVIs, remove any hardcoded paths in the path input terminal, which will prevent issues if there is a path that is not setup correctly during runtime. 
  • If using subVIs to call the DLL and the "Specify path on diagram" option, double-check that the path input terminal is wired. 
  • If you are using the Current VI's Path Function to build the path at which the DLL is located, check that the built path matches the location of the DLL when using an executable. For more details check this article: Error 7 in Executable When Using the Current VI's Path Constant.
  • If the DLL was moved to a Real-Time PXI and built with Visual Studio, make sure that you have Microsoft Visual Studio Runtime Support installed under LabVIEW Real-Time in the installation wizard in NI-MAX (the Visual Studio Runtime Support and  LabVIEW Real-Time versions depend on the ones installed on your computer):