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

9 次查看(过去 30 天)
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
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
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.

类别

Help CenterFile Exchange 中查找有关 LabVIEW 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by