Main Content

Allow Functions with Zero Inputs

Enable code generation of Function with no inputs

Since R2020a

Model Configuration Pane: PLC Code generation


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.


To use this parameter,

  1. Set Target IDE to Phoenix Contact PC WORX 6.0 or KW-Software MULTIPROG 5.0.

  2. Enable Generate functions instead of function block.


off (default) | on

The generated Structured Text code contains Function instead of Function Blocks when there is a function with no inputs.


The generated Structured Text code contains function blocks and no functions.

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

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

Version History

Introduced in R2020a