LabVIEW: (Hex 0x2) Memory is Full When Using the System Exec VI

Updated Jun 12, 2023

Reported In

Software

  • LabVIEW

Issue Details

  • I am trying to run a command with the System Exec.vi and I am getting the following error, I already tested the command in Windows Command Prompt and it worked as expected.
  • Why do I receive the following error when using the System Exec.vi in LabVIEW?
Error 2 occurred at an unidentified location

Possible reason(s):
LabVIEW: (Hex 0x2) Memory is full
 

Solution

This error normally occurs when trying to run a command-window-specific command such as dir or set, or when trying to run an executable from the command line. Using the System Exec.vi is not the same as typing a command into a command prompt; instead, it is like typing a command into the "Run..." window.

To run command prompt commands from the System Exec.vi, execute the command prompt window first with the following command:

cmd /c 

For example, to run the DOS command dir, use the following string as your command line input into System Exec.vi:

cmd /c dir C:

To run an executable, you would use the following string as your command line input into System Exec.vi:

cmd /c C:\...\application_name.exe

In this case, application_name.exe is the name of the executable you are calling. You must include the entire file path for the application, as represented by the C:\...\. If the file path contains any spaces then the entire path must be surrounded by quotation marks. For example, to open LabVIEW 8.2 you would use the following string:

cmd /c "C:\Program Files\National Instruments\LabVIEW 8.2\LabVIEW.exe"

Additional Information

Note: This only works in Windows NT/2000/XP/Vista and above. For instructions on Windows 95/98/ME, please check the below links: