LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

BUG found while running Matlab Script

Hi there,

  I am trying a very simple vi exacmple for learning MathScript. My labview is 2011 and my matlab is 2011b, they both install in the same computer. My OS is windows 7 (64bit). I am trying to writing the following script to the block

 

t=0:0.01:3;

y=sin(t);

 

while y will be the output name of the MathScript. I connect this symbol to the a graph and run the program. For the very first time, it call out the matlab platform and run the program directly and the result was shown in the graph. However, whenever I want to modify the script and trying to save the vi, it reports some error and the program get terminated "DAbort 0x1A7102DF in fpsane.cpp". It is so weird. If I open the closed VI again, it can run without any problem for the first modificaiton, but the problem comes again if I modify the script again after the first run.

0 Kudos
Message 1 of 7
(6,909 Views)

You mention both the matlab script node (which requires matlab installed) and MathScript (which is a LabVIEW toolkit that is completely independent of matlab).

 


dragondriver wrote: 

...I connect this symbol to the a graph and run the program. For the very first time, it call out the matlab platform...


What is the meaning of "symbol" in this context? What is the meaning of "call out matlab platform"?

 

Can you attach your VI to make things a little bit more clear? Thanks!

0 Kudos
Message 2 of 7
(6,907 Views)

Sorry for the confusing. Anyway, the one I am running is called "Matlab Script", when the VI loaded, it will open the matlab console in the background and pass all the script to that console to run and collect the result later. Before the script is run, I can modify it as many time as I want, no problem. But if only it was run, even you save it without modification, it crashes .

 

 

By the way, I am fresh to Labview. So what's the different of "Matlab Script" and "MathScript"? How can I use MathScript instead in the vi? Thanks.

0 Kudos
Message 3 of 7
(6,903 Views)

Sorry, I currently don't have matlab installed, so I cannot test your VI containing the matlab script.

 

If I copy the text of your matlab script to a MathScript node instead, everything works just fine.

 

It is possible that the problem is within matlab and not a LabVIEW problem. I cannot tell.

 

MathScript is a LabVIEW toolkit that can run scripts with a matlab like syntax. You need to purchase it seperately (windows), but you can also download an evalution copy to try for free. The version for Mac and linux seems to be free but I have note tried. Are you a student? The LabVIEW student editions also include MathScript.

0 Kudos
Message 4 of 7
(6,896 Views)

I can confirm this bug. Any modification to the VI after its first run will result in an application crash on VI run or save.

 

For those of us using Labview 2011 64-bit, Mathscript is not an option. NI has not released a version for 64-bit Labview yet. Also, if one desires to use functions from a MATLAB toolbox, those are not available through Mathscript.

0 Kudos
Message 5 of 7
(6,766 Views)

Repeat

Jesse Dennis
Engineer
INTP
0 Kudos
Message 6 of 7
(6,756 Views)

Hi LaserJockey,

 

I have managed to recreate error 1047 using the VI posted by dragondriver "MatlabFun.vi" using MATLAB® R2009b and LabVIEW 2011. There is a Knowledge Base article which details how to address this issue: http://digital.ni.com/public.nsf/allkb/2B3FF46C8512C4F786256CF30071BE53

 

If this is not the same error you are seeing, please post back with your code and a screenshot of the error. 

 

MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.

 

Thanks!

 


Aldo A
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(6,749 Views)