run an .m file on a remote PC with matlab from another PC that runs LabView 2012

12 ビュー (過去 30 日間)
Laurens Willems van Beveren
Laurens Willems van Beveren 2013 年 10 月 8 日
コメント済み: Ian Phillips 2014 年 2 月 18 日
I know you can use Matlab Script Nodes, but that normally works with LabView and matlab on the same computer. but what if the .m file needs to be run on a remote PC? has anyone done this before? any help would be appreciated.
  2 件のコメント
Jan
Jan 2013 年 10 月 8 日
Please explain any details: Is Matlab installed on the remote machine? Do you have a remote connection like VNC or RemoteDesktop? What have you tried so far and which problem occurred?
Laurens Willems van Beveren
Laurens Willems van Beveren 2013 年 10 月 9 日
ok, the end goal of this exercise is this:
i want to run an .m file on a PC with matlab (windows) different than the PC where LabVIEW is running on. at the moment I can run the example scripts to communicate between LabVIEW and matlab one the same PC.
however, i have an even more hard time: currently, I am not even able to run an .m file that I have created myself from matlab script node. I can use the open('*.m') command in the matlab command window that is open, but I am not able to give the run('*.m') command with the output of the function to show up in the command window.
stupid question, but does the matlab script node always NEED to have an output? what is the command for running a full matlab session?
to answer your question: I am using VNC to look at each display, but the PCs are in one room on the same network. can anybody please upload an example script for matlab script node that opens a function file in matlab (one that is not part of the default matlab package such as TF for example, etc).

サインインしてコメントする。

回答 (3 件)

Friedrich
Friedrich 2013 年 10 月 8 日
編集済み: Friedrich 2013 年 10 月 8 日
Hi,
normally one uses DCOM. Some more detailed steps can be found here.
BUT: you need to create the Automation Server differently. You need to specify the host on which MATLAB is installed, configured for DCOM and should be used. I am not sure if LabView is able to do that.
However what definetly works is using the local MATLAB together with the Script Node to start the DCOM MATLAB from there. So LabView < - > Local MATLAB < - > Remote MATLAB

Ian Phillips
Ian Phillips 2014 年 2 月 18 日
Hi Laurens, I have a similar problem. Did you manage to get a workable solution?

Laurens Willems van Beveren
Laurens Willems van Beveren 2014 年 2 月 18 日
yes, i fixed it. let me check tomorrow. what i do is use the VI server built within LabVIEW to call another .vi on another network PC running LabVIEW. then in that .vi i call matlab script.
  1 件のコメント
Ian Phillips
Ian Phillips 2014 年 2 月 18 日
Hi Laurens, Thanks for your reply. If you could post (or email) an example that would be fantastic. Appreciate your help. Ian

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by