Documentation

Simulink Real-Time Functions

Alphabetical List By Category

System Configuration

Development and Target Computer Setup

Using Real-Time Application Objects Represent real-time application and target computer status
slrt Create object to manage target computer
slrtexplr Configure target computer and real-time application for execution
slrttest Test Simulink Real-Time installation
slrtbench Benchmark Simulink Real-Time models on target computer
SimulinkRealTime.addTarget Add new Simulink Real-Time target object
SimulinkRealTime.removeTarget Remove environment data associated with target name
SimulinkRealTime.targetSettings.setAsDefaultTarget Set specific target computer environment object as default
SimulinkRealTime.getTargetSettings Get target computer environment settings
SimulinkRealTime.getSupportInfo Diagnostic information to troubleshoot configuration issues
SimulinkRealTime.target Create object representing real-time application on target computer
SimulinkRealTime.target.getPCIInfo Return information about PCI boards installed in target computer

Model Preparation

I/O Modules

Displays and Logging

SimulinkRealTime.utils.getFileScopeData Read real-time Scope file format data
SimulinkRealTime.utils.bytes2file Generate file for use by real-time From File block

Target Management

Target I/O Management
SimulinkRealTime.utils.getFileScopeData Read real-time Scope file format data
SimulinkRealTime.utils.bytes2file Generate file for use by real-time From File block

Communication Protocols

Ethernet

RS-232

macaddr Convert string-based MAC address to vector-based address

External Code Integration

Custom I/O Drivers

Custom Driver
slrtdrivertool Construct skeleton for custom driver
Interrupt Support
PostHook Run after return from interrupt service routine function-call subsystem or after sending wake-up call to model thread
PreHook Run just before the interrupt service routine
Start Run as the last item in mdlStart
Stop Run at the beginning of mdlTerminate
Using the Simulink Real-Time Driver Authoring Tool
slrtdrivertool Construct skeleton for custom driver

Real-Time Application Creation and Execution

Build Real-Time Application

slrtexplr Configure target computer and real-time application for execution

Run Real-Time Application

Using Real-Time Application Objects Represent real-time application and target computer status
slrt Create object to manage target computer
slrtexplr Configure target computer and real-time application for execution
SimulinkRealTime.target Create object representing real-time application on target computer
SimulinkRealTime.target.viewTargetScreen Open real-time window on development computer

Instrumentation

Signal Monitoring and Tracing

slrtexplr Configure target computer and real-time application for execution
SimulinkRealTime.utils.createInstrumentationModel Construct skeleton for user interface model

Signal Logging

slrtexplr Configure target computer and real-time application for execution

Parameter Tuning

slrtexplr Configure target computer and real-time application for execution

Real-Time Application Instruments

slrtexplr Configure target computer and real-time application for execution

Standalone Operation

Standalone Target Computer Setup

slrtexplr Configure target computer and real-time application for execution

Export and Run Explorer Configuration as Standalone Executable

slrtexplr Configure target computer and real-time application for execution

Performance Optimization

Profiling and Optimization

profile_xpc Collect profiling data

Control and Instrumentation From MATLAB

System Configuration Using MATLAB

Using Real-Time Application Objects Represent real-time application and target computer status
slrt Create object to manage target computer
slrtgetCC Compiler settings for development computer environment
slrtsetCC Compiler settings for development computer environment
SimulinkRealTime.createBootImage Create Simulink Real-Time boot disk or DOS Loader files
slrtpingtarget Test communication between development and target computers
SimulinkRealTime.pingTarget Test communication between development and target computers
SimulinkRealTime.getTargetSettings Get target computer environment settings
SimulinkRealTime.getSupportInfo Diagnostic information to troubleshoot configuration issues
SimulinkRealTime.targetSettings.setAsDefaultTarget Set specific target computer environment object as default
SimulinkRealTime.target Create object representing real-time application on target computer
SimulinkRealTime.target.getPCIInfo Return information about PCI boards installed in target computer
macaddr Convert string-based MAC address to vector-based address

Creation and Execution of Real-Time Application Using MATLAB

Using Real-Time Application Objects Represent real-time application and target computer status
rtwbuild Initiate build process
slrt Create object to manage target computer
SimulinkRealTime.createBootImage Create Simulink Real-Time boot disk or DOS Loader files
slrtpingtarget Test communication between development and target computers
SimulinkRealTime.target Create object representing real-time application on target computer
SimulinkRealTime.target.viewTargetScreen Open real-time window on development computer

Signal Monitoring and Tracing Using MATLAB

SimulinkRealTime.targetScope Control and access properties of target scopes
SimulinkRealTime.hostScope Control and access properties of host scopes
Using Real-Time Application Objects Represent real-time application and target computer status
SimulinkRealTime.target.addscope Create a scope of specified type
SimulinkRealTime.target.getscope Return scope identified by scope number
SimulinkRealTime.target.remscope Remove scope from target computer
SimulinkRealTime.target Create object representing real-time application on target computer

Signal Logging Using MATLAB

SimulinkRealTime.fileScope Control and access properties of file scopes
SimulinkRealTime.fileSystem Manage folders and files on target computer
Using Real-Time Application Objects Represent real-time application and target computer status
SimulinkRealTime.target.addscope Create a scope of specified type
SimulinkRealTime.target.getscope Return scope identified by scope number
SimulinkRealTime.target.remscope Remove scope from target computer
SimulinkRealTime.target Create object representing real-time application on target computer

Parameter Tuning Using MATLAB

Using Real-Time Application Objects Represent real-time application and target computer status
slrt Create object to manage target computer
SimulinkRealTime.target Create object representing real-time application on target computer
SimulinkRealTime.target.viewTargetScreen Open real-time window on development computer

Control and Instrumentation From Outside MATLAB

Control and Instrumentation Using .NET

Configuration and Execution of Real-Time Application Using .NET

xPCTargetPC Construct new instance of xPCTargetPC class
xPCTargetPC.Ping Test communication between development and target computers
xPCTargetPC.tcpPing Determine TCP/IP accessibility of remote computer
xPCTargetPC.Connect Establish connection to target computer
xPCTargetPC.ConnectAsync Asynchronous request for target computer connection
xPCTargetPC.Disconnect Disconnect from target computer
xPCTargetPC.DisconnectAsync Asynchronous request to disconnect from target computer
xPCTargetPC.Dispose Clean up used resources
xPCTargetPC.Reboot Restart target computer
xPCTargetPC.RebootAsync Asynchronous request to restart target computer
xPCTargetPC.ConnectCompleted Event when xPCTargetPC.ConnectAsync is complete
xPCTargetPC.Connecting Event before xPCTargetPC.Connect starts
xPCTargetPC.Connected Event after xPCTargetPC.Connect is complete
xPCTargetPC.DisconnectCompleted Event when xPCTargetPC.DisconnectAsync is complete
xPCTargetPC.Disconnecting Event before xPCTargetPC.Disconnect starts
xPCTargetPC.Disconnected Event after xPCTargetPC.Disconnect is complete
xPCTargetPC.Disposed Event after xPCTargetPC.Dispose is complete
xPCTargetPC.Rebooting Event before xPCTargetPC.Reboot starts
xPCTargetPC.Rebooted Event after xPCTargetPC.Reboot is complete
xPCTargetPC.RebootCompleted Event when xPCTargetPC.RebootAsync is complete
xPCTargetPC.Load Load real-time application onto target computer
xPCTargetPC.Unload Unload real-time application from target computer
xPCTargetPC.LoadAsync Asynchronous request to load real-time application onto target computer
xPCTargetPC.LoadCompleted Event when xPCTargetPC.LoadAsync is complete
xPCTargetPC.Loaded Event after xPCTargetPC.Load is complete
xPCTargetPC.Loading Event before xPCTargetPC.Load starts
xPCTargetPC.UnloadAsync Asynchronous request to unload real-time application from target computer
xPCTargetPC.UnloadCompleted Event when xPCTargetPC.UnloadAsync is complete
xPCTargetPC.Unloaded Event after xPCTargetPC.Unload is complete
xPCTargetPC.Unloading Event before xPCTargetPC.Unload starts
xPCApplication.Start Start real-time application execution
xPCApplication.Stop Stop real-time application execution
xPCApplication.Starting Event before xPCApplication.Start executes
xPCApplication.Started Event after xPCApplication.Start is complete
xPCApplication.Stopping Event before xPCApplication.Stop executes
xPCApplication.Stopped Event after xPCApplication.Stop is complete
xPCException Construct new instance of xPCException class

Signal Monitoring and Tracing Using .NET

xPCSignals.GetSignals List of xPCSignal objects specified by array of signal identifiers
xPCSignals.GetSignalsValue Vector of signal values from array
xPCSignals.Refresh Refresh state of object
xPCSignal.GetValue Value of signal at moment of request
xPCSignal.TryGetValue Status of get signal value at moment of request
xPCHostScopeCollection.Add Create xPCHostScope object with next available scope ID as key
xPCTargetScopeCollection.Add Create xPCTargetScope object
xPCHostScopeSignalCollection.Add Add signals to host scope
xPCTargetScopeSignalCollection.Add Create xPCTargetScopeSignal object
xPCScope.Trigger Software-trigger start of data acquisition for scope
xPCScope.Start Start scope
xPCScope.Stop Stop scope
xPCScope.ScopeStopped Event after xPCScope.Stop is complete
xPCScopes.RefreshAll Refresh state of object
xPCHostScopeCollection.StartAll Start all host scopes in one call
xPCHostScopeCollection.StopAll Stop all host scopes in one call
xPCDataHostScSignalObject.GetData Copy host scope signal data from target computer
xPCDataHostScSignalObject.GetDataAsync Asynchronously copy host scope signal data from target computer
xPCHostScopeCollection.Refresh Refresh host scope object state
xPCHostScopeSignalCollection.Refresh Synchronize signals for associated host scopes on target computer
xPCTargetScopeCollection.StartAll Start all target scopes in one call
xPCTargetScopeCollection.StopAll Stop all target scopes in one call
xPCTargetScopeCollection.Refresh Refresh target scope object state
xPCTargetScopeSignalCollection.Refresh Synchronize signals for associated target scopes on target computer
xPCScope.ScopeStarting Event before xPCScope.Start executes
xPCScope.ScopeStarted Event after xPCScope.Start is complete
xPCScope.ScopeStopping Event before xPCScope.Stop executes
xPCDataHostScSignalObject.GetDataCompleted Event when xPCDataHostScSignalObject.GetDataAsync is complete
xPCException Construct new instance of xPCException class
SCDISPLAYMODE Enumerated Data Type Target scope display mode values
SCSTATUS Enumerated Data Type Scope status values
SCTRIGGERMODE Enumerated Data Type Scope trigger mode values
SCTRIGGERSLOPE Enumerated Data Type Scope trigger slope values
SCTYPE Enumerated Data Type Scope type

Signal Logging Using .NET

xPCFileScopeCollection.Add Create xPCFileScope object with next available scope ID as key
xPCFileScopeSignalCollection.Add Add signals to file scope
xPCScope.Trigger Software-trigger start of data acquisition for scope
xPCScope.Start Start scope
xPCScope.Stop Stop scope
xPCScopes.RefreshAll Refresh state of object
xPCFileScopeCollection.StartAll Start all file scopes in one call
xPCFileScopeCollection.StopAll Stop all file scopes in one call
xPCFileScopeCollection.Refresh Synchronize with file scopes on target computer
xPCFileScopeSignalCollection.Refresh Synchronize with signals for associated scope on target computer
xPCDataFileScSignalObject.GetData Copy file scope signal data from target computer
xPCDataFileScSignalObject.GetDataAsync Asynchronously copy file scope signal data from target computer
xPCDataLoggingObject.GetData Copy signal data from target computer
xPCDataLoggingObject.GetDataAsync Asynchronously copy signal data from target computer
xPCScope.ScopeStarting Event before xPCScope.Start executes
xPCScope.ScopeStarted Event after xPCScope.Start is complete
xPCScope.ScopeStopping Event before xPCScope.Stop executes
xPCScope.ScopeStopped Event after xPCScope.Stop is complete
xPCDataFileScSignalObject.GetDataCompleted Event when xPCDataFileScSignalObject.GetDataAsync is complete
xPCDataLoggingObject.GetDataCompleted Event when xPCDataLoggingObject.GetDataAsync is complete
xPCFileSystem.Create Create folder
xPCFileSystem.GetDrives Drive names for logical drives on target computer
xPCFileSystem.RemoveFile Remove file name from target computer
xPCFileSystem.SetCurrentDirectory Current folder
xPCFileSystem.GetCurrentDirectory Current working folder for real-time application
xPCFileSystemInfo.Delete Delete current file or folder
xPCFileSystemInfo Construct new instance of xPCFileSystemInfo class
xPCDriveInfo Construct new instance of xPCDriveInfo class
xPCDriveInfo.Refresh Synchronize with file drives on target computer
xPCDirectoryInfo Construct new instance of xPCDirectoryInfo class on specified path
xPCDirectoryInfo.Create Create folder
xPCDirectoryInfo.Delete Delete empty xPCDirectoryInfo object
xPCDirectoryInfo.GetDirectories Subfolders of current folder
xPCDirectoryInfo.GetFiles File list from current folder
xPCDirectoryInfo.GetFileSystemInfos File system information for files and subfolders in folder
xPCFileInfo Construct new instance of xPCFileInfo class
xPCFileInfo.Open Open file
xPCFileInfo.OpenRead Create read-only xPCFileStream object
xPCFileInfo.CopyToHost Copy file from target computer file system to development computer file system
xPCFileInfo.Create Create file in specified path
xPCFileInfo.Delete Permanently delete file on target computer
xPCFileInfo.Rename Rename file
xPCFileStream Construct new instance of xPCFileStream class
xPCFileStream.Write Write block of bytes to file stream
xPCFileStream.WriteByte Write byte to current position in file stream
xPCFileStream.Read Read block of bytes from stream and write data to buffer
xPCFileStream.Close Close current stream
xPCException Construct new instance of xPCException class
xPCFileMode Enumerated Data Type Open file with permissions
xPCLogMode Enumerated Data Type Specify log mode values
xPCLogType Enumerated Data Type Logging type values
SCFILEMODE Enumerated Data Type Write mode values for when file allocation table entry is updated

Parameter Tuning Using .NET

xPCParameter.GetParam Get parameter values from target computer
xPCParameter.GetParamAsync Asynchronous request to get parameter values from target computer
xPCParameters.LoadParameterSet Load parameter values for real-time application
xPCParameters.Refresh Refresh state of object
xPCParameters.SaveParameterSet Save parameter values of real-time application
xPCParameter.SetParam Change value of parameter on target computer
xPCParameter.SetParamAsync Asynchronous request to change parameter value on target computer
xPCParameter.GetParamCompleted Event when xPCParameter.GetParamAsync is complete
xPCParameter.SetParamCompleted Event when xPCParameter.SetParamAsync is complete
xPCException Construct new instance of xPCException class
Was this topic helpful?