Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Is it possible to have an Access to Octave Console from DLL block

0 votes
385 views
Hello,

Is it possible to have an Access to Octave Console from DLL block to printf intermediate result for example.

Thank you for your reply.
asked Mar 24, 2021 by gateau (14 points)

1 Answer

0 votes
There is no interface back to the Octave Console through the DLL block.

However, in your DLL you can easily write to a text file for debugging.  Attached is an example.  It makes use of the userData pointer in the SimulationState structure to retain the file handle between calls.

Before you run the model, you'll have to change the file output path and recompile the *.dll.  You can only pass doubles into the DLL so the filename is hard-coded here.

Another alternative is if the intermediate values are numeric, you can add them as additional outputs from the DLL Block.
answered Mar 25, 2021 by Bryan Lieblick (1,909 points)
Thank's for your reply ! I will use your "print to file" solution !!
...