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.

  • Do not use this option when you have enabled the PLC_FoldFBCallOutputVar parameter. If you enable PLC_FoldFBCallOutputVar, Simulink PLC Coder throws a warning during code generation and sets PLC_UseCallOutputArgSyntax to 'off'.

  • You cannot select this parameter when the Target IDE parameter is set to Schneider Electric - EcoStruxure Control Expert. When you set the Target IDE parameter to Schneider Electric - EcoStruxure Control Expert, Simulink PLC Coder sets this parameter to "on".

Version History

Introduced in R2023a