04-07-2015 03:47 AM
Hi
I am using LabVIEW 2013 Version 13.0f2 (32bit) and MATLAB R2014b (Version: 8.4.0.150421) in Windows 7 Professional Version 6.1 (Build 7601: Service Pack 1).
I am trying to pass measured data to a matlab script to plot but I get errors.
I have made a small program to make the problem easyer to solve and I get this error
Error 1050 occurred at LabVIEW: Error occurred while executing script. Error message from server: ??? Reference to a cleared variable A.
. in MatlabTest.vi
I tried the solution mentioned in http://digital.ni.com/public.nsf/allkb/4475BC3CEB062C9586256D750058F14B though it was intended for an older version. This gave me this error instead
Error 1048 occurred at LabVIEW: LabVIEW failed to get variable from the script server. Server:"??? Undefined function or variable 'num'.
" in MatlabTest.vi
The problem occures when I try to access the input, in other words I can have inputs to my script as long as I do not use them.
How can I solve this?
04-10-2015 09:56 PM
Hi,
Matlab clear all command deletes all your variables,
try commentting clear all command (%clear all), or remove it and should work better.
Regards
04-13-2015 02:41 AM
Thank you so very much.
I shold of cours have realised that that was what happened but I always use the three clearing lines (close all, clear all, clc) in the beginning of a script to make sure that no old and irrelevant data corrupts my script and did not think about when the inputs were generated.
Again, Thank you!
05-25-2017 07:44 AM
Hello, I also encountered the same mistake, how should I solve?