start(instrument)

Starts streaming data from real-time application

Description

example

start(instrument_object,target_object) validates that the real-time application for the instrumentation object is loaded on the target computer and starts streaming data from the real-time application represented by the target object. If execution of the real-time applicationis not running, this command starts the application, and then starts streaming.

Before using this method, you must:

  • Create a real-time application.

  • Create an instrumentation object for the real-time application, for example in a MATLAB script or AppDesigner application.

  • Load the real-time application on the target computer.

Examples

collapse all

Start streaming data from the real-time application represented by the instrumentation object hInst and target object tg. If the application is not already running, this command starts the application, and then starts streaming data.

tg = slrt('TargetPC1');
load(tg, 'my_xpctank');
mldatxfile = 'my_xpctank.mldatx';
hInst  = SimulinkRealTime.prototype.Instrumentation(mldatxfile);
start(hInst,tg);

You can start streaming data from a real-time application that is already running.

tg = slrt('TargetPC1');
load(tg, 'my_xpctank');
start(tg);
. . .
mldatxfile = 'my_xpctank.mldatx';
hInst  = SimulinkRealTime.prototype.Instrumentation(mldatxfile);
. . .
start(hInst,tg);

Input Arguments

collapse all

To create the instrumentation object, use the SimulinkRealTime.prototype.Instrumentation function.

Example: hInst

Object that represents the target computer. Before calling this function, make sure that you start the target computer with the Simulink® Real-Time™ kernel and apply the required Ethernet link settings.

Example: tg

Introduced in R2014a