Main Content

stop

Stop execution of real-time application and unload it from the target computer

Since R2020b

Description

stop(target_object,AutoImportFileLog) stops execution of the real-time application that is running on the Speedgoat® target computer, which is represented by the target_object. Before using this method, you must create, load, and start the real-time application on the target computer.

  • If a real-time application is loaded on the target computer and is running, stop(tg) stops execution and unloads the application.

  • If a real-time application is loaded on the target computer and is not running, stop(tg) unloads the application.

  • If no real-time application is loaded or running on the target computer, stop(tg) does nothing (no warning or error is generated).

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

example

Examples

collapse all

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

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

% If stop occurs when application is loaded but not started,
% the application is unloaded (process stops).

start(tg);
stop(tg);

Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Optional. The AutoImportFileLog argument for the stop function can override the default operation which uses the AutoImportFileLog argument from the start function that started the simulation. As shown in the table, this argument selects whether the file log data is uploaded to the Simulation Data Inspector on the development computer after the real-time application stops.

start(tg)

stop(tg)

 

stop(tg)

AutoImport=true

stop(tg)

stop(tg)

AutoImport=false

start(tg)

AutoImport=true

Import file log

Import file log

No file log import

start(tg)

Import file log

Import file log

No file log import

start(tg)

AutoImport=false

Import file log

No file log import

No file log import

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

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

Version History

Introduced in R2020b

expand all