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
On Generated code contains the
=>syntax for function block outputs.
OffGenerated code does not contain the
=>syntax for function block outputs.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Programmatic Use
Parameter: PLC_UseCallOutputArgSyntax |
| Type: string |
Value: 'on' | 'off' |
Default: 'off' |
Limitations
If you currently use the
fUseCallOutputArgSyntaxplugin Simulink® PLC Coder™ recommends enabling this parameter instead. ThefUseCallOutputArgSyntaxplugin option will be removed in a future release.Do not use this option when the Target IDE parameter is set to
Selectron. TheSelectronIDE uses thefSimplifyFunctionCallExprthat changes the call expressions fromname:=valueassignments to a simple call likefunction(value1,value2)as it does not support assignments in function call expressions. Since assignments are not supported by theSelectronIDE, output assignments do not work.Do not use this option when you have enabled the
PLC_FoldFBCallOutputVarparameter. If you enablePLC_FoldFBCallOutputVar, Simulink PLC Coder throws a warning during code generation and setsPLC_UseCallOutputArgSyntaxto'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 toSchneider Electric - EcoStruxure Control Expert, Simulink PLC Coder sets this parameter to"on".
Version History
Introduced in R2023a