NI Home > Community > NI Discussion Forums

LabVIEW MathScript RT Module

Showing results for 
Search instead for 
Do you mean 
Reply
Active Participant
dragondriver
Posts: 220
0 Kudos

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.

Knight of NI
altenbach
Posts: 27,629
0 Kudos

Re: BUG found while running Matlab Script

[ Edited ]

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!


LabVIEW Champion . Do more with less code and in less time .

Active Participant
dragondriver
Posts: 220
0 Kudos

Re: BUG found while running Matlab Script

[ Edited ]

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.

Knight of NI
altenbach
Posts: 27,629
0 Kudos

Re: BUG found while running Matlab Script

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.


LabVIEW Champion . Do more with less code and in less time .

Member
LaserJockey
Posts: 2
0 Kudos

Re: BUG found while running Matlab Script

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.

Active Participant
Jesse_D
Posts: 486
0 Kudos

Re: BUG found while running Matlab Script

[ Edited ]

Repeat

Jesse Dennis
Design Engineer
Erdos Miller
Member
Aldo_A
Posts: 160
0 Kudos

Re: BUG found while running Matlab Script

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