EditPoti

EditPoti (FB)

FUNCTION_BLOCK EditPoti

Short description

Setpoint generator with edge-controlled increase / decrease of the setpoint. The step size and the absolute minimum/maximum limit values are configurable. Typical application: Individual adjustment of a base temperature.

Representation

Interfaces

Outputs

Name
Data type
Value range
Initial value
Function

rOut

REAL

Analog - output

Setpoints / parameters

Name
Data type
Value range
Initial value
Function

xButtonUp

BOOL

FALSE

Increase of the setpoint

xButtonDown

BOOL

FALSE

Decrease of the setpoint

rJumpValue

REAL

> 0

0.2

Step size

rSetPointMin

REAL

-3.0

Absolute minimum value

rSetPointMax

REAL

3.0

Absolute maximum value

Function description

General

This function block is used to generate a setpoint at the output rOut. Each rising edge on the setpoint / parameter xButtonUp increases the output rOut by the step size rJumpValue. Each rising edge on the setpoint / parameter xButtonDown reduces the output rOut by the step size rJumpValue. The output rOut is limited to a value range between the absolute minimum value rSetPointMin and the absolute maximum value rSetPointMax is limited. \

Setting of the step size rJumpValue

The step size rJumpValue may only take values greater than 0. Values less than 0 are automatically reset to 0.\

Setting of the value range rSetPointMin and rSetPointMax

The following applies: rSetPointMin <= rSetPointMax The following applies: rSetPointMin = rSetPointMax = rOut If an input is made in which the above rules are not observed, then automatically rSetPointMin = rSetPointMax is set.

CODESYS

InOut:

Scope
Name
Type
Initial

Input Const

rSetPointMax

REAL

3.0

Input Const

rSetPointMin

REAL

-3.0

Input Const

rJumpValue

REAL

0.2

Input Const

xButtonDown

BOOL

FALSE

Input Const

xButtonUp

BOOL

FALSE

Output

rOut

REAL

Last updated