Signal Logging with .NET

Signal value logging

To log signal values and times, add a real-time file scope from your .NET program. See xPCFileScope Class. A file scope creates a file on the target computer that you can download to the development computer for offline analysis.

.NET API

expand all

xPCScope ClassAccess Simulink Real-Time scopes
xPCScopes ClassAccess scope objects
xPCScope.StartStart scope
xPCScope.StopStop scope
xPCScope.TriggerSoftware-trigger start of data acquisition for scope
xPCScopes.RefreshAllRefresh state of object
xPCFileScope ClassAccess to file scopes
xPCFileScopeCollection ClassCollection of xPCFileScope objects
xPCFileScopeSignal ClassAccess to file scope signals
xPCFileScopeSignalCollection ClassCollection of xPCFileScopeSignal objects
xPCSignal ClassAccess signal objects
xPCSignals ClassAccess signal objects
xPCFileScopeCollection.AddCreate xPCFileScope object with next available scope ID as key
xPCFileScopeSignalCollection.AddAdd signals to file scope
xPCFileScopeCollection.StartAllStart all file scopes in one call
xPCFileScopeCollection.StopAllStop all file scopes in one call
xPCFileScopeCollection.RefreshSynchronize with file scopes on target computer
xPCFileScopeSignalCollection.RefreshSynchronize with signals for associated scope on target computer
xPCDataFileScSignalObject.GetDataCopy file scope signal data from target computer
xPCDataFileScSignalObject.GetDataAsyncAsynchronously copy file scope signal data from target computer
xPCLog ClassBase data logging class
xPCAppLogger ClassAccess to real-time application loggers
xPCDataFileScSignalObject ClassObject that holds logged file scope signal data
xPCDataHostScSignalObject ClassObject that holds logged host scope signal data
xPCDataLoggingObject ClassObject that holds logged data
xPCOutputLogger ClassAccess to output logger
xPCStateLogger ClassAccess to state log
xPCTETLogger ClassAccess to task execution time (TET) logger
xPCTimeLogger ClassAccess to output log
xPCDataLoggingObject.GetDataCopy signal data from target computer
xPCDataLoggingObject.GetDataAsyncAsynchronously copy signal data from target computer
xPCFileSystem ClassFile system drives and folders
xPCFileSystemInfo ClassFile system information
xPCDirectoryInfo ClassAccess folders and subfolders of target computer file system
xPCDriveInfo ClassInformation for target computer drive
xPCFileSystem.CreateDirectoryCreate folder
xPCFileSystem.GetDrivesDrive names for logical drives on target computer
xPCFileSystem.RemoveFileRemove file name from target computer
xPCFileSystem.SetCurrentDirectoryCurrent folder
xPCFileSystem.GetCurrentDirectoryCurrent working folder for real-time application
xPCFileSystemInfo.DeleteDelete current file or folder
xPCFileSystemInfoConstruct new instance of xPCFileSystemInfo class
xPCDriveInfoConstruct new instance of xPCDriveInfo class
xPCDriveInfo.RefreshSynchronize with file drives on target computer
xPCDirectoryInfoConstruct new instance of xPCDirectoryInfo class on specified path
xPCDirectoryInfo.CreateCreate folder
xPCDirectoryInfo.DeleteDelete empty xPCDirectoryInfo object
xPCDirectoryInfo.GetDirectoriesSubfolders of current folder
xPCDirectoryInfo.GetFilesFile list from current folder
xPCDirectoryInfo.GetFileSystemInfosFile system information for files and subfolders in folder
xPCFileInfo ClassAccess to file and xPCFileStream objects
xPCFileStream ClassAccess xPCFileStream objects
xPCFileInfoConstruct new instance of xPCFileInfo class
xPCFileInfo.OpenOpen file
xPCFileInfo.OpenReadCreate read-only xPCFileStream object
xPCFileInfo.CopyToHostCopy file from target computer file system to development computer file system
xPCFileInfo.CreateCreate file in specified path
xPCFileInfo.DeletePermanently delete file on target computer
xPCFileInfo.RenameRename file
xPCFileStreamConstruct new instance of xPCFileStream class
xPCFileStream.WriteWrite block of bytes to file stream
xPCFileStream.WriteByteWrite byte to current position in file stream
xPCFileStream.ReadRead block of bytes from stream and write data to buffer
xPCFileStream.CloseClose current stream
xPCScope.ScopeStartingEvent before xPCScope.Start executes
xPCScope.ScopeStartedEvent after xPCScope.Start is complete
xPCScope.ScopeStoppingEvent before xPCScope.Stop executes
xPCScope.ScopeStoppedEvent after xPCScope.Stop is complete
xPCDataFileScSignalObject.GetDataCompletedEvent when xPCDataFileScSignalObject.GetDataAsync is complete
xPCDataLoggingObject.GetDataCompletedEvent when xPCDataLoggingObject.GetDataAsync is complete
GetLogDataCompletedEventArgs ClassxPCDataLoggingObject.GetDataCompleted event data
GetFileScSignalDataObjectCompletedEventArgs ClassxPCDataFileScSignalObject.GetDataCompleted event data
xPCScopeCollectionEventArgs ClassxPCScopeCollection.Added event data
xPCScopeRemCollectionEventArgs ClassxPCScopeCollection.Removed event data
xPCScopeSignalCollectionEventArgs ClassxPCScopeSignalCollection.Added event data
xPCException ClassInformation for xPCException
xPCExceptionConstruct new instance of xPCException class
xPCExceptionReason Enumerated Data TypeException reasons
xPCFileMode Enumerated Data TypeOpen file with permissions
xPCLogMode Enumerated Data TypeSpecify log mode values
xPCLogType Enumerated Data TypeLogging type values
SCFILEMODE Enumerated Data TypeWrite mode values for when file allocation table entry is updated

Topics

Background

Simulink Real-Time .NET API Client Application Examples

Examine applications that use the Simulink® Real-Time™ API for Microsoft® .NET Framework.

Signal Logging

Signal Logging Basics

Acquire signal data while running a real-time application and transfer the data to the development computer for analysis.

File System Basics

Access the target computer file system with the SimulinkRealTime.fileSystem object.

Configuration

File Scope Usage

Learn about usage issues that are unique to file scopes.

.NET Interface

Using the Simulink Real-Time API for Microsoft .NET Framework

Creating user interfaces with the Simulink Real-Time API for .NET Framework.

Simulink Real-Time API for Microsoft .NET Framework

Accessing the target computer and real-time application with the Simulink Real-Time API for Microsoft .NET Framework.

Simulink Real-Time .NET API Application Creation

Configure the development environment for using the Simulink Real-Time API for Microsoft .NET Framework.

Simulink Real-Time .NET API Application Distribution

Complying with the requirements for distributing client applications.

Limitations

Troubleshoot Signals Not Accessible by Name

Investigate issues for some signal types prevent monitoring, tracing, or logging.

Internationalization Issues

Learn about Simulink Real-Time support for internationalization.