Main Content

start

Start execution of real-time application on target computer

Since R2020b

Description

start(target_object,Name-Value Pair Arguments) starts execution of the real-time application that is loaded on the Speedgoat® target computer, which is represented by the target_object. Before using this method, you must create and load the real-time application on the target computer. If a real-time application is running, issuing a start command generates an error.

You can also start the real-time application from the RTOS command line. For more information, see Execute Target Computer RTOS Commands at Target Computer Command Line and Target Computer Command-Line Interface.

example

Examples

collapse all

Start execution of the real-time application that is loaded on the target computer, which is represented by the target object tg.

tg = slrealtime('TargetPC1');
load(tg, 'my_xpctank');
start(tg);

Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: start(tg,'LogLevel','info')

Selects filtering level that limits Simulink® Real-Time™ target computer system messages that appear in the system log. For more information, see Simulink Real-Time Options Pane.

Example: start(tg,'LogLevel','info')

The real-time application is clocked by a timer interrupt, unless the base sample rate is equal to or below the polling threshold (default is 100 μs). If the base sample rate is less than or equal to the threshold, the real-time application is clocked in polling mode.

Example: start(tg,'PollingThreshold',100)

Select the number of file logs to retain when logs are stored on the target computer instead of uploaded to the development computer after each simulation run.

Note

You can inadvertently delete existing file logs for an installed real-time application on the target computer if you use the slrealtime.Application function to change the Options for FileLogMaxRuns and then reload the application. To change the number of stored logs without deleting existing logs, load the real-time application and then change the FileLogMaxRuns option by using the start(tg) function.

Example: start(tg,'FileLogMaxRuns',1)

Select whether stimulation of root inports and Playback blocks starts when you start the real-time application.

Example: start(tg,'StartStimulation','on')

Select stop time value for the real-time application.

Example: start(tg,'StopTime',Inf)

Direct Simulink Real-Time to reload the real-time application on the target computer after the application stops.

Example: start(tg,'ReloadOnStop',false)

Select whether the file log data is uploaded to the Simulation Data Inspector on the development computer after the real-time application stops.

If a model includes a Enable File Log block, the start(tg) AutoImportFileLog option has no effect, and the startRecording function and stopRecording function only control signal streaming (not File Log logging).

Example: start(tg,'AutoImportFileLog',true)

Select whether the file log data is uploaded the Simulink base workspace on the development computer after the real-time application stops

Example: start(tg,'ExportToBaseWorkspace',true)

Version History

Introduced in R2020b

expand all