Contenuto principale

Log Event

Log an execution profiling event

  • Log Event block

Libraries:
Simulink Real-Time / Profiling

Description

The Log Event block inserts a user-defined event into the execution profiling event stream when triggered. The user-defined event includes a channel ID, a code number, and a value number.

Examples

Ports

Input

expand all

When the T (trigger input) changes from 0 to 1 (Rising) or from 1 to 0 (Falling), the block inserts a user-defined simple event defined by the parameters Channel, Code, and Value into the execution profiling event stream.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Specify the event channel ID. The channel ID ranges from 0 to 1023.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: channel
Values: 0 (default) | int

Example: set_param(gcb,'channel','500')

Specify the event code number.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: code
Values: 0 (default) | uint32

Example: set_param(gcb,'code','200')

Specify the event value number.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: value
Values: 0 (default) | uint32

Example: set_param(gcb,'value','200')

Select the type of signal change that triggers the block. When the input T changes from 0 to 1 (Rising) or from 1 to 9 (Falling), the block inserts a user-defined simple event defined by the parameters Channel, Code, and Value into the execution profiling event stream.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: trigger
Values: Rising edge (default) | Falling edge | Either edge

Example: set_param(gcb,'trigger','Falling edge')

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2020b