# Is there a way to log data acquired in External Mode?

**URL:** <https://forum.plexim.com/t/is-there-a-way-to-log-data-acquired-in-external-mode/1398>\
**Category:** STM32\
**Tags:** plecs-coder, external-mode\
**Created:** [September 20, 2024, 9:35am UTC](https://forum.plexim.com/t/is-there-a-way-to-log-data-acquired-in-external-mode/1398 "2024-09-20T09:35:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriele\_Lozito](https://avatars.discourse-cdn.com/v4/letter/g/c68b51/32.png) [@Gabriele\_Lozito](https://forum.plexim.com/u/Gabriele_Lozito)\
**Post date:** [September 20, 2024, 9:35am UTC](https://forum.plexim.com/t/is-there-a-way-to-log-data-acquired-in-external-mode/1398/1 "2024-09-20T09:35:11Z")

</div>

I’m using an STM32 microcontroller to sample some voltages/currents of a power converter and use them in a control loop to generate the desired PWM.

Since the application involves a lenghty battery charging/discharging, I would like to save, periodically, the values of the voltages and currents acquired by the ADC. Is there a way of doing so, maybe through external mode?

Thank you!

---

<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:** [September 23, 2024, 11:12am UTC](https://forum.plexim.com/t/is-there-a-way-to-log-data-acquired-in-external-mode/1398/2 "2024-09-23T11:12:19Z")

</div>

One approach is to use STM32CubeMonitor with the code generated from PLECS. You will have to review the generated code in the .c file to find the relevant variable names to monitor. Also note that you cannot simultaneously have External Mode in PLECS and STM32CubeMonitor enabled simultaneously.

---

<div class="post-metadata">

**Author:** ![Gabriele\_Lozito](https://avatars.discourse-cdn.com/v4/letter/g/c68b51/32.png) [@Gabriele\_Lozito](https://forum.plexim.com/u/Gabriele_Lozito)\
**Post date:** [September 24, 2024, 6:55am UTC](https://forum.plexim.com/t/is-there-a-way-to-log-data-acquired-in-external-mode/1398/3 "2024-09-24T06:55:08Z")

</div>

Thank you very much!
