LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab Script Node and error 1048

Like other users, I sometimes get strange "error 1048" when using Matlab script node.

The following test will trigg an "error 1048" which is in my opinion a bug:

 - define a variable in the matlab console

 - run a vi using this variable in a Matlab Script Node

 - delete the variable in matlab (using "clear")

 - run the VI again: you will get error 1048 as expected

 - redefine the variable in matlab

 - run the vi again: the Script Node will return correct values (as expected), but the "error 1048" is still triggered !!

Apparently the error condition is not reset properly.

- This does not happen if the Script Node error output is wired to something (i.e not left unconnected)

- normal operation is restored if the variable is (re)defined in the script node itself, or if the vi is open/closed

 

Julien 

0 Kudos
Message 1 of 3
(3,457 Views)

Hi,

 

The error 1048 happen when you clear variable or if you use matlab define variable. See the link below

Why Does My Script Written in The MathWorks, Inc. MATLAB® Language Syntax Return Error 1048?

 

Regards,

0 Kudos
Message 2 of 3
(3,440 Views)

Dear Aurelien J.

Thanks for your reply

The problem I describe happens even if you type nothing in the Matlab Script Node

It is reproducible whatever variable name is used and not related to clearing variable or using matlab keywords as variable names

 

cheers

0 Kudos
Message 3 of 3
(3,415 Views)