# Using Matlab to load plecs model on to RT Box CE and read in the analog input from HW send it to Matlab and visualize in real time

**URL:** <https://forum.plexim.com/t/using-matlab-to-load-plecs-model-on-to-rt-box-ce-and-read-in-the-analog-input-from-hw-send-it-to-matlab-and-visualize-in-real-time/2039>\
**Category:** RT Box\
**Tags:** matlab, rt-box\
**Created:** [April 15, 2025, 3:01pm UTC](https://forum.plexim.com/t/using-matlab-to-load-plecs-model-on-to-rt-box-ce-and-read-in-the-analog-input-from-hw-send-it-to-matlab-and-visualize-in-real-time/2039 "2025-04-15T15:01:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pascal\_K](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Pascal\_K](https://forum.plexim.com/u/Pascal_K)\
**Post date:** [April 15, 2025, 3:01pm UTC](https://forum.plexim.com/t/using-matlab-to-load-plecs-model-on-to-rt-box-ce-and-read-in-the-analog-input-from-hw-send-it-to-matlab-and-visualize-in-real-time/2039/1 "2025-04-15T15:01:50Z")

</div>

Hi, all

I want to run a Plecs simulation model on the RT Box CE (that is connected to some HW and thus has analog inputs) from Matlab. The code should either be generated first or the .elf file should be loaded to the RT Box. The simulation data should be captured via the data capture block (or any other) and send back to Matlab. The data should be visualized in real time or at least very fast in Matlab.

Is this achievable and how or is there an alternative way or a workaround?  
Reference is the python script to enable a communication to the RT Box via XML rpc

---

<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:** [April 16, 2025, 5:53pm UTC](https://forum.plexim.com/t/using-matlab-to-load-plecs-model-on-to-rt-box-ce-and-read-in-the-analog-input-from-hw-send-it-to-matlab-and-visualize-in-real-time/2039/2 "2025-04-16T17:53:53Z")

</div>

Please see this [forum post showing how to use the JSON-RPC interface with MATLAB](https://forum.plexim.com/t/rt-box-3-connection-with-matlab-data-aquisition-in-runtime/1987/2). You can build your application on top of the basic RPC commands.
