# RT Box 3 connection with MATLAB, Data aquisition in runtime

**URL:** <https://forum.plexim.com/t/rt-box-3-connection-with-matlab-data-aquisition-in-runtime/1987>\
**Category:** RT Box\
**Tags:** plecs, matlab, rt-box\
**Created:** [March 31, 2025, 11:27am UTC](https://forum.plexim.com/t/rt-box-3-connection-with-matlab-data-aquisition-in-runtime/1987 "2025-03-31T11:27:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kev](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@kev](https://forum.plexim.com/u/kev)\
**Post date:** [March 31, 2025, 11:27am UTC](https://forum.plexim.com/t/rt-box-3-connection-with-matlab-data-aquisition-in-runtime/1987/1 "2025-03-31T11:27:07Z")

</div>

Hello,

I am working with the RT Box 3 and PLECS Standalone to control a test bench, with aditional data acquisition handled in MATLAB. I want to control the RT Box by setting variables and control values, as well as retrieving runtime data—similar to a SCPI request for the current system state from MATLAB.

Is it possible to implement this using the JSON-RPC solution? If so, how can I integrate it into my system?  
Thank you in advance!

Kev

---

<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 2, 2025, 9:05pm UTC](https://forum.plexim.com/t/rt-box-3-connection-with-matlab-data-aquisition-in-runtime/1987/2 "2025-04-02T21:05:57Z")

</div>

First, setup the RPC client in MATLAB as outlined in the [Running PLECS Standalone from MATLAB](https://www.plexim.com/support/videos/running_standalone_from_matlab) tutorial.

From there, the basic setup is:

```auto
HOST_NAME='rtbox-123.local';
ip=java.net.InetAddress.getByName(HOST_NAME).getHostAddress();
proxy = jsonrpc('http://'+ip.string()+':9998/RPC2', 'Timeout', 10);

```

From there, you can access RT Box commands using `proxy.rtbox.<function>` e.g. `proxy.rtbox.querySimulation()`.
