02-18-2009 05:37 AM
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
02-19-2009 04:52 AM
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,
Aurélien J.
National Instruments France
02-25-2009 04:45 AM
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
J