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

**URL:** <https://forum.plexim.com/t/is-it-possible-to-have-an-access-to-octave-console-from-dll-block/992>\
**Category:** PLECS\
**Tags:** plecs, octave, dll\
**Created:** [March 24, 2021, 5:29am UTC](https://forum.plexim.com/t/is-it-possible-to-have-an-access-to-octave-console-from-dll-block/992 "2021-03-24T05:29:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gateau](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gateau](https://forum.plexim.com/u/gateau)\
**Post date:** [March 24, 2021, 5:29am UTC](https://forum.plexim.com/t/is-it-possible-to-have-an-access-to-octave-console-from-dll-block/992/1 "2021-03-24T05:29:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bryan\_Lieblick](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/bryan_lieblick/32/10_2.png) [@Bryan\_Lieblick](https://forum.plexim.com/u/Bryan_Lieblick)\
**Post date:** [March 25, 2021, 5:12pm UTC](https://forum.plexim.com/t/is-it-possible-to-have-an-access-to-octave-console-from-dll-block/992/2 "2021-03-25T17:12:38Z")

</div>

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.

[dll\_file\_out.zip](https://forum.plexim.com/uploads/short-url/aZw8LnhgAtEDWXcUjTXgj3WPhxH.zip) (1.04 MB)

---

<div class="post-metadata">

**Author:** ![gateau](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gateau](https://forum.plexim.com/u/gateau)\
**Post date:** [March 26, 2021, 3:06am UTC](https://forum.plexim.com/t/is-it-possible-to-have-an-access-to-octave-console-from-dll-block/992/3 "2021-03-26T03:06:12Z")

</div>

Thank’s for your reply ! I will use your “print to file” solution !!
