ni.com is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 1050

Hi,

 

I'm running a matlab code in labview and get this error: 

Error 1050 occurred at LabVIEW:  Error occurred while executing script. Error message from server: ??? Error using ==> fscanf

 

Invalid" file identifier.  Use fopen to generate a valid file identifier.

"Error 1050 occurred at LabVIEW: Error using ==> fscanf Invalid file identifier.  Use fopen to generate a valid file identifier."

 

 

any help would be appreciated.

 

thx

sbz

 

0 Kudos
Message 1 of 2
(4,318 Views)

Sbz-

Are you using the MATLAB® Script Node?

We have seen a few reasons this error can be thrown.  I have highlighted them below.  The first seems related to your issue.

•    Is the MATLAB Script Node is trying to open any files?  If so, then make sure that the current MATLAB directory is set to the directory where that file is located.  The MATLAB script node in LabVIEW does call the MATLAB script server and executes the function in the MATLAB script node through MATLAB®.  Therefore, even though LabVIEW may be in the correct directory where the file is located, make sure MATLAB is as well.

To do this, open MATLAB and select File»Set Path... from the pull-down menu.  In the Set Path window select Add Path... to add the path where your function scripts are located to the MATLAB search path.


•    The error may also occur if there is a disruption in the script server between MATLAB and LabVIEW and the connection was never re-established (possibly by closing MATLAB prematurely).  Close both LabVIEW and MATLAB then relaunch them both and run the VI.
MATLAB is a registered trademark of The MathWorks, Inc.

Regards,

Mike S
NI AE
0 Kudos
Message 2 of 2
(4,302 Views)