Documentation

slrt

Interface for managing target computer

Syntax

target_object = slrt
target_object = slrt(target_name)

Description

example

target_object = slrt constructs a target object representing the default target computer.

When MATLAB® evaluates the return value on the development computer, it attempts to connect to the target computer. If the attempt succeeds, MATLAB prints Connected = Yes, followed by the status of the real-time application running on the target computer. If the attempt fails, MATLAB waits until the connection times out, and then prints Connected = No. To avoid the timeout delay, check that the target computer is operational and connected to the development computer, or suppress output with a terminating semicolon.

example

target_object = slrt(target_name) constructs a target object representing the target computer designated by target_name.

Examples

collapse all

Create a target object that communicates with the default target computer. Report the status of the default target computer. In this case, the target computer is connected to the development computer and is executing the loader.

target_object = slrt
Target: TargetPC1
   Connected            = Yes
   Application          = loader

Create a target object that communicates with target computer TargetPC1. Report the status of the target computer. In this case, the target computer is not connected to the development computer.

target_object = slrt('TargetPC1')
Target: TargetPC1
   Connected            = No

Input Arguments

collapse all

Example: 'TargetPC1'

Data Types: char

Output Arguments

collapse all

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

Was this topic helpful?