Main Content

Use output argument syntax in function and function block calls

Enable the generation of => syntax in generated code

Since R2023a

Model Configuration Pane: PLC Code Generation / Interface

Description

Enable the Use output argument syntax in function and function block calls parameter to generate code that uses the => syntax for function block outputs.

Settings

off (default) | on
On

Generated code contains the => syntax for function block outputs.

Off

Generated code does not contain the => syntax for function block outputs.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: PLC_UseCallOutputArgSyntax
Type: string
Value: 'on' | 'off'
Default: 'off'

Limitations

  • If you currently use the fUseCallOutputArgSyntax plugin Simulink® PLC Coder™ recommends enabling this parameter instead. The fUseCallOutputArgSyntax plugin option will be removed in a future release.

  • Do not use this option when the Target IDE parameter is set to Selectron. The Selectron IDE uses the fSimplifyFunctionCallExpr that changes the call expressions from name:=value assignments to a simple call like function(value1,value2) as it does not support assignments in function call expressions. Since assignments are not supported by the Selectron IDE, output assignments do not work.

Version History

Introduced in R2023a