LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

Mathscript instability with large Matlab scripts? (Labview 8.5.1)

Solved!
Go to solution

Hi,

 

I  have the student version of LabView 8.5.1 and am experiencing a lot of instability when using any Mathscript feature of Labview (either the Mathscript block or the Mathscript window), but only when dealing with larger scripts. The Matlab script is approximately 250 lines long and 16Kb in size, and within that, are seven large arrays (six 14x8 built at the start and one 1000x9 that is built within a for loop, so increases with each iteration up to 1000 rows). I'm finding that whenever I edit the script in the Mathscript node or within the Mathscript window Labview will freeze and hang for at least 10 minutes, sometimes totally crashing Labview. As I wrote the script in Matlab, I am having to debug it in Labview and find out which commands in Matlab don't work in Mathscript/Labview, so it is obviously quite infuriating to have the programme regularly hang for 10mins at a time.

 

The computer I'm using is a 5-year old Packard Bell desktop with 768Mb Ram (less 32Mb for integrated graphics), running XP Pro. The processor is an Intel Celeron 2.6GHz. I appreciate this isn't the best specced machine ever, but at the time it was all I could afford!

 

Is this frequent hanging a glitch with Labview and Mathscript's handling of large .m files, or is it purely down to my ancient computer?

 

 

Many thanks for the help. 

0 Kudos
Message 1 of 3
(6,795 Views)
Solution
Accepted by thomas_p
Hello,

The delay you experience is a problem with large scripts in MathScript.  The delay increases exponentially with the length of the script.  For this reason, we recommend breaking up large scripts and .m files into separate pieces of around 40 lines.  On faster computers, you may find the delay acceptable for up to 100 lines.

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
Message 2 of 3
(6,792 Views)

Grant,

 

Thanks for the reply. Looks like it might be "New Computer" time. 

0 Kudos
Message 3 of 3
(6,789 Views)