Main Content

Target.FileLog

Target Computer file logger

Description

A Target.FileLog object represents the file logger that runs on a target computer and provides access to methods and properties related to the file logger.

The object provides access to methods and properties that:

  • Enable and disable the file logger.

  • Import file log data.

  • Check for available file log data.

  • Discard unwanted file log data.

Function names are case-sensitive. Type the entire name. Property names are not case-sensitive. You do not need to type the entire name if the characters you type are unique for the property.

Creation

A Target.FileLog object is created when you create a Target object by using the slrealtime command. After you create and connect to the Target object, you can access the Target.FileLog object. This example creates and connects to Target object tg, and then starts the file logger on the target computer.

tg = slrealtime('TargetPC1');
connect(tg);
enable(tg.FileLog);

Properties

expand all

The Importing property indicates whether the file logger is importing a file log. When FileLogger is enabled, the file logger imports file log data at the end of simulation runs. You can disable the import by setting the Disable automatic import of file logs option for the real-time application. For more information, see the start function.

Example: 0

The LoggingService property indicates the file logging service status.

Example: 100

The DataAvailable property indicates whether file log data is available for import.

Example: 0

Object Functions

disableStop file logging of signal data
discardDelete file log data from target computer
enableStart file logging of signal data
listGet information about available file logs of signal data
importImport file log data from target computer

Examples

collapse all

The disable function disables file logging.

Create a Target object and connect to the target computer. Creating a Target object creates a child Target.FileLog object. Connecting to the target computer provides access to the Target.FileLog object. Disable file logging.

tg = slrealtime('TargetPC1');
connect(tg);
disable(tg.FileLog);
Introduced in R2020b