Position3P (FB)

FUNCTION_BLOCK Position3P

Short Description

Calculation of the current position of a 3-point drive
In addition, a reference position (limit switch) of the drive can be detected.
Typical application: Determining the position on a 3-point valve drive

Portrayal

../_images/Position3P_FB.png

Interfaces

Inputs

Name

Datatype

Init-Value

Init-Value

Function

xOutOpen BOOL    

Input - Release - Opening

xOutClose BOOL    

Input - Release - Closing

xRefPos BOOL    

Digital input to detect the reference position (limit Switch).

Ausgänge

Name

Datatype

Init-Value

Init-Value

Function

rPos REAL rMinLimit bis rMaxLimit  

Display of the current position in %.

Setpoints / Parameters

Name

Datatype

Init-Value

Init-Value

Function

iRefPosition INT 0 - 100 0%

Reference position of the drive

rMinLimit REAL   0.0

Limit value - minimum position

rMaxLimit REAL   100.0

Limit value - maximum position

tDuration TIME   T#120s

Operating time of the drive

Functional description

General

This function block is used to calculate the current position of a 3-point drive that has no position feedback.
The calculation is based on the duration of the signals at the inputs “Input - Release - Opening” xOutOpen and “Input - Release - Closing” xOutClose.
Every rising edge at the digital input xRefPos (i.e. the drive is currently in its reference position) results in a new definition of the
analog output signal rPos to the setpoint/parameter iRefPosition.

Reference position

The digital input xRefPos allows for a readjustment of the position display rPos to a predefined value iRefPosition (0% = rest position - 100% = maximum position).
Every rising edge at the digital input triggers a readjustment.

Position indicator rPos

It is used to show the current position of the 3-point drive in the rMinLimit to rMaxLimit range and is calculated internally. Signals at the input xOutOpen increase
the value of the position display; signals at the input *xOutClose*reduce the value of the position indicator.

Limitations/Information

The 3-point drive must move linearly, i.e. execute the same position changes within the same time segments.
A position change via a possibly existing manual override hardware is not registered.
To avoid deviations between the calculated position and the actual position, it is recommended to initiate a readjustment of the position indicator periodically.

Visualization




Information

Element

Authors

Date

Version

Note

Function

Adam Bartod 11.2017 1.0

Initial version

Programming

Adam Bartod 11.2017 1.0

Initial version

Test Jochen Reu / 11.2017 1.0

Initial version

Documentation

Jochen Reu 11.2017 1.0

Initial version

Codesys

InOut:
Scope Name Type Initial Comment
Input xOutOpen BOOL  

Input - Release - Opening

xOutClose BOOL  

Input - Release - Closing

xRefPos BOOL  

Digital signal for detecting the reference position (limit switch)

iRefPosition INT 0

Reference position of the drive

rMinLimit REAL 0.0

Limit value - minimum position

rMaxLimit REAL 100.0

Limit value - maximum position

tDuration TIME TIME#2m0s0ms

Operating time of the drive

Output rPos REAL  

Display of the current position in %.