LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building executable containing Matlab Script Node

I have read many posts that seem similar to my problem where I cannot get a LabVIEW executable I have created from a .vi file to execute if it contains a Matlab Script node. (In fact I am copying this question from another thread that is virtually identical save for the operating system) I tried solutions I saw in various Knowledgebase articles like copying the file "matscript.dll" to a directory called "scipt" where the executable also resides but that didn't help.

I am running LabVIEW 7.0, the matscript.dll version installed on my machine is 7.0.0.2 I have gone thourgh and checked every instance of this dll and made sure it is 7.0.0.2 and not an older copy (this seemed to be the problem for another person with this
almost exact same question), and the Matlab version on my machine is new, Version 6.5.0.196271 Release 13.0.1. I am running this under Windows XP Pro with all windows updates.

When I build an executable and try to launch it, the window in the taskbar appears as it should but the front panel of the executable never opens. Also, the matlab command window doesn't pop up. I get no error messages but in essence it just sits there... When I go into Task Manager it always says the program is "not responding" and I stop it with the Task Manager. If I simply remove the Matlab Script node from my vi and make an executable from that (not what I want to do my work but just as a test) the executable works fine. So it clearly is a Matlab Script node related issue. Does anyone have any suggestions, I've seemingly tried everything including a fresh install of labview and the rte. Any help would be greatly appreciated!
0 Kudos
Message 1 of 6
(3,982 Views)
Hi,
Make sure you also replace the matscript.dll located in the ..\Program Files\National Instruments\shared\LabVIEW Run-Time\7.0\script directory.

Did you look at this thread:
NI Developer Zone: Discussion Forums: MATLAB Script Thread?

Do you have any problems running the VI with matlab script, do you get any errors or do LabVIEW and/or matlab hang?

Zvezdana S.
0 Kudos
Message 2 of 6
(3,982 Views)
Hi,

Yes, I replaced the dll in that directory as well.
I have no problems running the vi. The problem only arises when I build the executable. The Matlab window doesn't load and Labview hangs. It seems to be a problem with XP. I was able to successfully build and run an excutable on win2000, but once i transferred it to XP along with the script folder with dll, I again had the same problem with labview hanging.
0 Kudos
Message 3 of 6
(3,982 Views)
I would really like an answer to your question. I cannot het my executables to run on a Win XP machine either. I should add the qualifier - If the machine does not have MatLab installed, it runs fine. If the machine does have MatLab (as is required to run the scripts), then it hangs up. The vis run very well, it is just the executables that have problems. I have replaced all the DLLs that they talk about, and posted my own question about this problem. Please help!
0 Kudos
Message 4 of 6
(3,982 Views)
This question is now answered by the following KB

Why Does My Executable Hang When It Is Opened When I Use A MATLAB Script Node?

In the case where it is working in the development system but not a built executable, the second suggestion in this KB would be most relevant - when building your application, check the box on the Application Settings tab to "Enable ActiveX Server".
Message 5 of 6
(3,983 Views)
Hi Jeff
 
Thanks a lot. It worked for me. Enable AxtiveX and Matlab starts.
 
cheers
Pawel
0 Kudos
Message 6 of 6
(3,799 Views)