Main Content

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,

  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.

Settings

off (default) | on
On

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

Off

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

Recommended Settings

ApplicationSetting
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