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

9 visualizaciones (últimos 30 días)
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 comentarios
Jan
Jan el 8 de Oct. de 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
Laurens Willems van Beveren el 9 de Oct. de 2013
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).

Iniciar sesión para comentar.

Respuestas (3)

Friedrich
Friedrich el 8 de Oct. de 2013
Editada: Friedrich el 8 de Oct. de 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

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

Laurens Willems van Beveren
Laurens Willems van Beveren el 18 de Feb. de 2014
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 comentario
Ian Phillips
Ian Phillips el 18 de Feb. de 2014
Hi Laurens, Thanks for your reply. If you could post (or email) an example that would be fantastic. Appreciate your help. Ian

Iniciar sesión para comentar.

Categorías

Más información sobre LabVIEW en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by