Allow Functions with Zero Inputs
Enable code generation of Function
with no inputs
Since R2020a
Model Configuration Pane: PLC Code generation
Description
Use the Allow functions with zero inputs parameters to emit a function with no inputs as a function instead of a function block in the generated code.
Dependencies
To use this parameter,
Set Target IDE to
Phoenix Contact PC WORX 6.0
orKW-Software MULTIPROG 5.0
.Enable Generate functions instead of function block.
Settings
off (default) | on
- On
The generated Structured Text code contains
Function
instead ofFunction Blocks
when there is a function with no inputs.- Off
The generated Structured Text code contains function blocks and no functions.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |
Programmatic Use
Parameter: PLC_PureFunctionNoInputs |
Type: string |
Value: 'on' | 'off' |
Default: 'off' |
Version History
Introduced in R2020a