LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I continue to return error 1048 in the following MatLAB script VI?

I continue to return the following error in the enclosed LabVIEW VI: "1048 Source: Failed to get variable 'r1' from script server." I have written some basic script and returned the proper answer, yet this script with a system of linear equations won't return an answer. I have run the program separately in MatLAB without any problems. I have also downloaded the MatLAB script patch for MatLAB 6.1. I am running LabVIEW 6.0.2. Any inputs into a solution to this problem would be appreciated.

Jeremy Kingma
Montana State University
0 Kudos
Message 1 of 3
(2,905 Views)
When I tried to run your program, I got a different set of errors than the ones you report. I fixed most of the errors I was getting with LabVIEW but I could not get your script to run in MatLab. I kept getting errors with the "syms r1 r2..." statement. I do not know a hill of beans about MatLAB so I could not debug this error. Do you think you are using a reserved word in MatLAB? You could isolate the problem by making your script simpler and simpler until the code runs with no errors.

Jeremy
0 Kudos
Message 2 of 3
(2,905 Views)
I'm getting this same error code, but my variables names are not reserved words. I have also replaced my matscript.dll with the new one provided in the KnowledgeBase document 2C1AH6DM. What else could be going wrong? It doesn't seem to be a problem with the script, as it runs beautifully if I just put it into Matlab on its own.

One other problem--my script has two 'plot' commands, but Labview won't display them. Does anyone have a suggestion?

Thanks,
Rebecca
0 Kudos
Message 3 of 3
(2,905 Views)