RT Box 3 connection with MATLAB, Data aquisition in runtime

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

First, setup the RPC client in MATLAB as outlined in the Running PLECS Standalone from MATLAB tutorial.

From there, the basic setup is:

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().