LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

m files and exe build problems

Hello,

 

Pleae help because this has been driving me crazy!

 

I am using a series of mathcript nodes to call up 4 x m files.  Those top level m files also calls up other m files.  But under the dependencies list of the Project Explorer, it only lists the 4 x top level m files.  Anyway, it all runs fine but when the exe is built and ran, it by passes the m files functions without any error report.

 

When the exe is built are ALL the m files compiled or just the ones on the dependencies list?  Do I need to include the m files in the directory of the exe file?

The run time engine has some unsupported mathscript functions, how do I find/filter out unsupport functions in the m files?

Is there anything else I need to check to get the exe file working properly?

0 Kudos
Message 1 of 10
(7,842 Views)

If you are using "Current VI's Path" then this Knowledge Base article may help you:

 

http://digital.ni.com/public.nsf/allkb/FD7DE8BC8FFC256C862565F4006BE363?OpenDocument

 

The path is different when it is built as an application - it includes the application's filename almost like an extra directory, so you need to strip this out when it is an application.

0 Kudos
Message 2 of 10
(7,808 Views)

Paul 

 

I think you missunderstood my post.  I did not use "Current VI path".  The question is specific to MATHSCRIPTS calling up M FILES and EXE builder.

0 Kudos
Message 3 of 10
(7,802 Views)

I am sorry - I have not done much with mathscript nodes yet.

 

I had a look in the Labview help and it says this:

 

http://zone.ni.com/reference/en-XX/help/371361E-01/gmath/mathscript_node/

 

"The LabVIEW Run-Time Engine does not support MathScript Nodes with warning glyphs. If a VI includes a MathScript Node with a warning glyph, you must remove the warning glyph from the MathScript Node before you build a stand-alone application or shared library. The LabVIEW Run-Time Engine also does not support certain MathScript functions. To include a MathScript Node in a stand-alone application or shared library, you might need to modify scripts that contain these unsupported functions."

 

 One of the things that causes the warning glyph is the use of include functions. So it seems you can't do this under the run-time.

0 Kudos
Message 4 of 10
(7,789 Views)

Hi Paul,

 

Thanks for your attempt.  I have already checked for the unsupported function and found that not to be a problem.  From the debug, I found that the EXE, when built, is not calling up the secondary level m files (ie the m files that are called up from other m files).  Please refer to my first post.

 

I have also noticed that the Dependencies list from the Project Explorer does not include those m files.  Are only those listed on the Dependencies list gets compiled into the EXE application?  Is there anyone who has experience with dealing multiple m files using MATHSCRIPT and successfully compiled it into an EXE?

0 Kudos
Message 5 of 10
(7,780 Views)
Hello Duc Ha,

What version of LabVIEW are you using?

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
0 Kudos
Message 6 of 10
(7,747 Views)

Hi Grant,

 

I am using version 8.6.

 

Regards,

 

Duc

0 Kudos
Message 7 of 10
(7,738 Views)
Hello Duc,

I have tried building a sample application with two levels of .m files.  Only the top-level .m file showed up for me under dependencies, too.  However, both .m files were included in the application and the application worked fine.

It is a little difficult to determine which functions in your .m files are not supported in the run-time engine.  You will see a warning glyph on your top-level node on the line where you call your .m file.  In order to see which functions in your .m file may be unsupported, you can browse the LabVIEW help index.  Type in "run-time engine" and click the topic "MathScript functions not supported."  Another way is to paste the contents of your .m file in another MathScript node.  Delete the "function" keyword and the node will then show you any unsupported functions.  However if you don't see any warning glyphs, there shouldn't be a problem.

Is there any way to post some sample code that illustrates your problem?  My quick application did not exhibit the behavior you describe.

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
0 Kudos
Message 8 of 10
(7,736 Views)

Hello Grant,

 

Thanks for the good reply.  Please can you also check that 3rd level and 4th level m files are also called?  Currently, I am using 4 levels of m files.

 

Thanks in advance,

 Regards,

 

Duc

0 Kudos
Message 9 of 10
(7,720 Views)
Hello Duc,

I have tried building an application with 4 levels of .m files and see no problems.  I have another suggestion for you.  Although the code may show no yellow warning glyphs, there may still be some unsupported functions in the MathScript .m files you are using.  Create an error out indicator from every MathScript node you are using.  Propagate these errors back to your top-level VI that runs and create an indicator on the front panel so you can see it when the app runs.  Then build your application and run it.  Are there any errors listed in there?

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
0 Kudos
Message 10 of 10
(7,715 Views)