Actxserver to load DLL multiple times

6 Ansichten (letzte 30 Tage)
Paul
Paul am 26 Nov. 2013
Kommentiert: Peter Lusis am 7 Jul. 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 Kommentare
Gayathri Krishnamoorthy
Gayathri Krishnamoorthy am 25 Sep. 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 am 7 Jul. 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/

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by