Main Content

Export and Import Signals in Instrument by Using Simulink Real-Time Explorer

When testing a complex model with many signals, you frequently must select signals for tracing or monitoring from multiple parts and levels of the model hierarchy.

Save Signals to Disk

You can make this task easier by using Simulink® Real-Time™ Explorer to select the signals in instrument and save the list of signals to disk.

Open model slrt_ex_osc.

Connect to the target computer. On the Simulink Editor Real-Time tab, toggle the Disconnected indicator to Connected.

Build and download the real-time application to the target computer. Click Run on Target.

Open Simulink Real-Time Explorer. Click Prepare > SLRT Explorer.

To add signals to the signals in instrument, export the list of signals, and import the list of signals.

In Simulink Real-Time Explorer, click Load Application. Select the slrt_ex_osc application from the Applications on target computer list and click Load.

Click the Signals tab.

Select the signals to monitor from the list and then click Add to signals in instrument Image of add to signals in instrument button.

To export the list, click Export instrument to file Image of export instrument to file button. Name the files and click Save.

To remove signals from the signals in the instrument, select the signals in the list, and then click Remove signals from instrument Image of remove signals from instrument button.

To import the list, click Import instrument from file Image of import instrument from file button. Select the file and click Open.

Get MATLAB Code for Signals

When developing an App Designer application or an m-script that connects to a real-time application, it is helpful to have MATLAB code for the signals in the instrument. This code provides access to signals in an Instrument object (or instrumented signals), which are signals that are configured for streaming signal data from a real-time application. To generate this code from the Signals in Instrument:

In Simulink Real-Time Explorer, click Load Application. Select the slrt_ex_osc application from the Applications on target computer list and click Load.

Click the Signals tab.

Select the signals to monitor from the list, and then click Add to signals in instrument Image of add to signals in instrument button.

To create MATLAB code for the signals in the instrument, click Generate MATLAB code to create Instrument programmatically Image of generate MATLAB code to create instrument programmatically button. An editor window opens in MATLAB and displays the code for the signals in the Instrument.

See Also

| | | |

Related Topics