Error 1047 with MATLAB® Script Node in LabVIEW

Updated Oct 22, 2018

Reported In


  • LabVIEW Full
  • LabVIEW Base

Operating System

  • Windows

Issue Details

I get Error 1047  in LabVIEW when I try to use the script node to interact with The MathWorks, Inc. MATLAB® software.

Possible reason(s):

LabVIEW: (Hex 0x417) LabVIEW failed to send variable to the script server.

I have properly installed versions of LabVIEW and the MATLAB® software and have run them both in the past, but I cannot get them to communicate with each other.


This error occurs because ActiveX script server did not start properly. Consider the following possible solutions:
  1. If you have installed the MATLAB® software and have run it at least once before, then all of the ActiveX components should be registered with the operating system. In order to use the script server, close out all programs (the MATLAB® software and LabVIEW). Open the MATLAB® software and then open LabVIEW after the MATLAB® software fully loads. The script server should now respond and the error should no longer appear.
  2. In order to reregister the ActiveX components, open the Command Prompt (Click Start»Run, type cmd in the Open field and click OK) and do the following:
    1. Navigate to the MATLAB\(version)\bin directory (e.g. MATLAB\R2008b\bin).
    2. Enter matlab -regserver at the prompt and hit Enter.
    3. Quit the instance of the MATLAB® software that appears.
    4. The MATLAB script node should now be functional. (You may need to restart LabVIEW).
  3. If this does not work try installing the MATLAB® software locally and setting environment variable MATLAB_RESERVE_LO=0.
  4. If you still get the same error, the problem might be with reading inputs to the script written in The MathWorks, Inc. MATLAB® language syntax. If this is the case, running the shipping example program Lorenz throws the same error, since it has inputs to the script. However, MathScript Fractal executes without errors, as it only uses outputs. Changing the Data Type of inputs and outputs to Complex will provide an easy fix to the problem. To solve the problem permanently, you should install the patch provided in the following article: Resolve MATLAB® Script Node and Xmath Script Node Issues in LabVIEW

Additional Information

MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.


Not Helpful