MATLAB Answers

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

45 views (last 30 days)
Laurens Willems van Beveren
Commented: Ian Phillips on 18 Feb 2014
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 Comments

Jan
Jan on 8 Oct 2013
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).

Sign in to comment.

Answers (3)

Friedrich
Friedrich on 8 Oct 2013
Edited: Friedrich on 8 Oct 2013
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

  0 Comments

Sign in to comment.


Ian Phillips
Ian Phillips on 18 Feb 2014
Hi Laurens, I have a similar problem. Did you manage to get a workable solution?

  0 Comments

Sign in to comment.


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.

  1 Comment

Ian Phillips
Ian Phillips on 18 Feb 2014
Hi Laurens, Thanks for your reply. If you could post (or email) an example that would be fantastic. Appreciate your help. Ian

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by