Actxserver to load DLL multiple times

1 visualización (últimos 30 días)
Paul
Paul el 26 de Nov. de 2013
Comentada: Peter Lusis el 7 de Jul. de 2020
Hi all,
I am using Matlab to open and run another program (OpenDSS) and am doing with with the COM interface and a DLL since it allows me to control OpenDSS with handles from Matlab. This works fine, but I would like to open multiple instances of OpenDSS, but when Matlab encounters the actxserver() command after the first iteration, it sees that the DLL has already been loaded, so it doesn't open another instance, so parameters get overwritten and everything gets sad. It is possible to load multiple instances of the program via the DLL using Python using the subprocess() module, but it would be nice to avoid having to use Python (for simplicity's sake). I've tried for and parfor loops, hoping that the parfor Matlab workers would each want to load the DLL, but alas. I've also tried running a batch file from Matlab, but I have to call the EXE, which would force a significant rewrite of code.
Long story short, if anyone knows a way to mimic the Python subprocess() module, or any other way around this DLL stubbornness, that would be the cranberry sauce on my Thanksgiving meal.
Thanks!
-Paul
  2 comentarios
Gayathri Krishnamoorthy
Gayathri Krishnamoorthy el 25 de Sept. de 2017
Hello Paul, I am also facing the same issue. I need to run multiple instances of OpenDSS from MATLAB using COM interface. Did you get to know how this works? Thanks Gayathri
Peter Lusis
Peter Lusis el 7 de Jul. de 2020
Hi all, I would like to know if someone has figured out how to open multiple OpenDSS instances when using Matlab parfor. I'm facing the same problem as described above.
Meanwhile, here on SourceForge are a few examples of how to run OpendSS in parallel via the COM interface. https://sourceforge.net/p/electricdss/code/HEAD/tree/trunk/Version8/Distrib/Examples/Parallel_Processing/MATLAB/

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Call Python from MATLAB 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