Signal Monitoring and Tracing with C

Signal visualization with and without real-time information

If you require only the signal value, not the time at which it reached that value, monitor the signal from your C program. See xPCGetSignal.

If you require both the signal value and the time at which it reached that value, add a real-time scope from your C program.


expand all

xPCGetNumSignalsReturn number of signals
xPCGetSigIdxfromLabelReturn array of signal indices
xPCGetSigLabelWidthReturn number of elements in signal
xPCGetSignalReturn value of signal
xPCGetSignalIdxReturn index for signal
xPCGetSignalNameCopy name of signal to character array
xPCGetSignalsReturn vector of signal values
xPCGetSignalWidthReturn width of signal
xPCAddScopeCreate scope
xPCSetScopeSet properties of scope
xPCRemScopeRemove scope
xPCGetNumScopesReturn number of scopes added to real-time application
xPCGetScopeGet and copy scope data to structure
xPCGetScopeListGet and copy list of scope numbers
xPCGetScopesGet and copy list of scope numbers
xPCScAddSignalAdd signal to scope
xPCScRemSignalRemove signal from scope
xPCScGetNumSignalsGet number of signals in scope
xPCScGetSignalListCopy list of signals to array
xPCScGetSignalsCopy list of signals to array
xPCScGetTypeGet type of scope
xPCScSetAutoRestartScope autorestart status
xPCScGetAutoRestartScope autorestart status
xPCScSetDecimationSet decimation of scope
xPCScGetDecimationReturn decimation of scope
xPCScSetNumPrePostSamplesSet number of pre- or posttriggering samples before triggering scope
xPCScGetNumPrePostSamplesGet number of pre- or post-triggering samples before triggering scope
xPCScSetNumSamplesSet number of samples in one data acquisition cycle
xPCScGetNumSamplesGet number of samples in one data acquisition cycle
xPCScGetStartTimeGet start time for last data acquisition cycle
xPCScSetTriggerLevelSet trigger level for scope
xPCScGetTriggerLevelGet trigger level for scope
xPCScSetTriggerModeSet trigger mode of scope
xPCScGetTriggerModeGet trigger mode for scope
xPCScSetTriggerScopeSelect scope for triggering another scope
xPCScGetTriggerScopeGet trigger scope
xPCScSetTriggerScopeSampleSet sample number for triggering scope
xPCScGetTriggerScopeSampleGet sample number for triggering scope
xPCScSetTriggerSignalSelect signal for triggering scope
xPCScGetTriggerSignalGet trigger signal for scope
xPCScSetTriggerSlopeSet slope of signal that triggers scope
xPCScGetTriggerSlopeGet trigger slope for scope
xPCScSoftwareTriggerSet software trigger of scope
xPCScStartStart data acquisition for scope
xPCScStopStop data acquisition for scope
xPCIsScFinishedReturn data acquisition status for scope
xPCScGetDataCopy scope data to array
xPCScGetStateGet state of scope
xPCTgScGetGridGet status of grid line for particular scope
xPCTgScGetModeGet scope mode for displaying signals
xPCTgScGetViewModeGet view mode for target computer display
xPCTgScGetYLimitsCopy y-axis limits for scope to array
xPCTgScSetGridSet grid mode for scope
xPCTgScSetModeSet display mode for scope
xPCTgScSetViewModeSet view mode for scope
xPCTgScSetYLimitsSet y-axis limits for scope
xPCErrorMsgReturn text description for error message
xPCGetLastErrorReturn constant of last error
xPCSetLastErrorSet last error to specific character string constant
scopedataType definition for scope data structure


Signal Visualization

Signal Monitoring Basics

Acquire non-time-stamped signal data while running a real-time application.

Signal Tracing Basics

Acquire and visualize signals while running a real-time application.

C Interface

Simulink Real-Time C API

Complying with the coding requirements of the Simulink® Real-Time™ C API library.

Using the C API

Complying with the requirements for using the Simulink Real-Time C API.

C API Error Messages

Interpreting error codes produced by the C API.


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.