Main Content

stop

Stop execution of real-time application on target computer

Since R2020b

Description

example

stop(target_object,AutoImportFileLog) stops execution of the real-time application that is running on the 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, but is not running, this command unloads the application.

You can also stop 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.

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

Optionally, 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 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