Main Content

Troubleshoot S-Function Parameters Not Visible in Simulink Real-Time Explorer

The parameters for the s-functions in my real-time application do not appear in the Parameters tab in Simulink® Real-Time™ Explorer.

What This Issue Means

Simulink Real-Time Explorer does not display S-function parameters that are defined by using a literal expression. This approach in explorer prevents the display of many parameters that are used by hardware drivers. The Block Parameters dialog box figure shows a parameter that is defined by using the literal expression 5.

For an s-function block parameter, use a literal definition.

Try This Workaround

To display an S-function parameter in the Parameters tab in Simulink Real-Time Explorer, define a variable in the model workspace, then use the variable instead of a literal expression in the S-function parameter. For the S-function parameter in the figure, you could define a variable gainParam with a value 5, then define the S-function parameter as:

'++',gainParam,'SumTimesGain'

Related Topics