So, my objective is to create a Labview application (will be used in other computer) which allows me to run a mathscript code which in turns calls a function to solve an ode problem.
I don't understand why it doesn't work... I use the 'current directory' function to see where Labview is searching for the function and I introduce it afterwards in that directory (manually).
The application returns the paths but doesn't return any results besides those...
The program works fine when I dont use it in the application...
The function script is presented as an image.
Thanks in advance...
Solved! Go to Solution.
Can you also share the .m file that you have introduced in that area?
Are you aware that there are ODE Solvers in MathScript itself available and that you don't need to create a new one yourself?
I'm using the ode15s of mathscript.
The m file (presented as an image, fsystem12.m) is just a simple function that defines the derivatives as being equal to 1.
I always seem to forget that ode_bdf15 has also a legacy name ode15s:
The reason I asked for the m-file is because I didn't see any reason why it should not work.
Why are you actually not setting your search paths through the Development Environment Options?
This will allow you to define in advance in which folders will be added as search paths in the ini-file of your executable.
What might even be easier is to just have a llok at the ini-file of your application/executable and add a line like this, that mentions all the paths that should be added:
Does this resolve the issue?
Thanks again for your reply.
I tried to input the line you said (after changing it to my current folder) and it didn't work.
I also tried using the Application Directory node (which outputs PATH_NAME) and adding 'path(PATH_NAME)' to the mathscript node and it also didn't work...
'Why are you actually not setting your search paths through the Development Environment Options?'
I'm not sure where in the builder I can specifiy that? Is it under a certain tab in the 'My Application Properties' menu?
Weird thing is the program runs with no problems when I execute the LabView code but the application doesn't...
Thanks for the help so far.
You normally shouldn't have to use any application directory node or path node to follow the steps mentioned above.
You should be able to just add the line mentioned above in the ini-file that is in the same "Build"-folder as your executable.
In this case I was not talking about the Application properties of you Build Specification, but about the Options about the Development environment itself.
Can you share with me the project and all depending files (VIs, .m-file, ...) you are using at your side?
This way I can check where it exactly is going wrong and try to correct it.
I tried first including the line in the ini file and then the directory node as separate tests.
You can find in attachment all the files that I'm using for the application formation.
The ini file has been changed according to my systems folder path. I run Windows 7 32bit as Administrator.
Thanks in advance
Just to add that I tried to run an installer including the RTs and the application in another computer and basicaly the VI does nothing...
Just more info on the problem...
The next script clearly shows the problem is at the function calling. It doesn't find the path to the m function...
In the zip file I have, the files, project and application... The ini file was changed to include the path (I tried all combinations possible to no avail...even with the originial ini file)
It looks like the only search path that's been defined for the application context is the default one:
If you want to auto-load a given path for this application space (not a "standalone" VI outside of a project), you'll want to define it there- right-click on the target (My Computer) in the project and select the Properties option to configure this.
The VI you provided is failing because it is looking in the application directory (\Project) rather than the file location (\Files), if the path is changed or your files are included in the "project" directory, then the node executes successfully.
The issue in the built executable you provided is because the "path" function isn't supported (with inputs) in the LabVIEW Run-Time Engine- the error is getting swallowed because there isn't an indicator or error handler and automatic error handling is disabled by default in built executables. From the help:
"This function is not supported in the LabVIEW Run-Time
Engine if you specify an input for the function. Either do not specify an
input or remove these functions from your scripts before you build a stand-alone
application or shared library."
I was able to get this to run by adding the "files" path to the application instance (which also fixes the development environment error), removing the path function, and rebuilding the executable. Hope that helps!