Actxserver to load DLL multiple times

조회 수: 6 (최근 30일)
Paul
Paul 2013년 11월 26일
댓글: Peter Lusis 2020년 7월 7일
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
Gayathri Krishnamoorthy
Gayathri Krishnamoorthy 2017년 9월 25일
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 2020년 7월 7일
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/

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by