Error 1046 When Using a MathScript Node or MATLAB Script in LabVIEW

Updated Sep 5, 2023

Reported In


  • LabVIEW Full
  • LabVIEW MathScript Module

Issue Details

When I try to run a VI with a MathScript Node or a MATLAB script, LabVIEW displays the following error:
Error 1046 occurred at an unidentified location

Possible reasons(s):

LabVIEW: LabVIEW cannot initialize the script server. Ensure the server software is installed in concerned VI.


Note: NI does not recommend LabVIEW MathScript Module functions for new designs. Refer to  for information and recommended alternatives.

Licensing/Installation Error of MathScript Node

The error above may come from an improper installation of the LabVIEW MathScript Module or by not having the software activated.

  • Check that the LabVIEW MathScript Module is activated in NI License Manager.
  • Repair the LabVIEW MathScript Module with the NI Package Manager.

ActiveX Script server issues

This error may occur because the ActiveX script server did not start properly.
In order to reregister the ActiveX components, follow the steps below:
  1. Navigate to the MATLAB\(version)\bin directory (e.g., MATLAB\R2021a\bin).
  2. Open Windows PowerShell as administrator.
  3. Enter matlab -regserver at the prompt and hit Enter.
  4. Quit the instance of the MATLAB® software that appears.

Use of MATLAB script without MATLAB

Another reason for this error is if the LabVIEW VI calls the MATLAB script node without having MATLAB 6.5 or later being installed or properly activated on the computer. This is because the MATLAB script nodes invoke the MATLAB software script server to execute scripts written in the MATLAB syntax.

Note: Ensure that MATLAB is installed in the same local disk where LabVIEW is installed.