Out3P (FB)

FUNCTION_BLOCK Out3P

Short Description

Conversion of an analog value (e. g. P-controller) into output signals for a 3-point actuator (pulse width modulation).
In addition, a reference position (limit switch) of the actuator can be detected.

Portrayal

../_images/Out3P_FB.png

Interfaces

Inputs

Name

Datatype

Range

Init-Value

Function

xEn BOOL    

Enable Functionblock

rIn REAL    

Inputsignal

xRefPos BOOL    

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

Outputs

Name

Datatype

Range

Init-Value

Function

xOutOpen BOOL    

Output variable Plus/More for the drive

xOutClose BOOL    

Output variable Minus/less for the drive

rPos REAL 0.0 ... 100.0  

Analog signal for the current position

Setpoints / Parameters

Name

Datatype

Range

Init-Value

Function

iRefPosition INT 0 - 100 0%

Reference position of the drive

tImpulsClose TIME   1s

Duration of a pulse at the output Minus/less than

tImpulsOpen TIME   1s

Duration of a pulse at output Plus/More

rMinLimit REAL   -100.0

Integral value for pulse triggering at the output minus/less than

rMaxLimit REAL   100.0

Integral value for pulse triggering at output Plus/More

rDuration TIME   120s

Operating time of the drive

tIntegration TIME   100ms

Duration between two integration processes

Functional Description

General

This function block is used to convert the analog signal rIn into the corresponding output signals xOutOpen and xOutClose in the form of a pulse width modulation.
The pulse length is always constant (tImpulsClose or tImpulsOpen) while the pause between two pulses is different.
With a current input signal rIn of 0.0, no output pulses are generated.
If the current input signal is in the positive range (0.0 - +100.0), pulses are only generated at the xOutOpen output.
If the current input signal is in the negative range (0.0 - -100.0), only xOutClose pulses are generated at the output.
The function block is enabled/disabled via the digital input xEn.
Each rising edge at the digital input xRefPos (i. e. the drive is currently in its reference position) causes the analog output signal rPos to be reset to the setpoint / parameter iRefPosition.

Enable input xEn

If the enable input is not active (xEn = FALSE) both outputs xOutOpen and xOutClose are reset. In addition, the integral is set to 0 and the digital signal for detecting the reference position xRefPos has no function.
With each falling edge at the enable input, the output signal xOutClose is permanently activated for a duration of time of rDuration + 10s and at the same time the output signal xOutOpen is deactivated (= forced movement of the drive in rest position).

Reference position

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

Signal generation

The analog input signal rIn (control deviation of a control process, signal symmetrical to the zero point) is integrated in the tIntegration interval over time.
This means that after each tIntegration integration interval ,the product of rIn and the tIntegration is formed and added to the current contents of the integration memory. A step function is thus created.

Example

rIn* = 100K, tIntegration = 100ms, old value of the integration memory = 500Ks, new value (after 100ms) = 510Ks.
If the integration value exceeds the limit value rMaxLimit, a pulse of the length tImpulsOpen is generated on the output signal xOutOpen.
If the integration value falls below the limit value rMinLimit, a pulse of the length tImpulsClose is generated on the output signal xOutClose.
After each pulse generation, the integration value is reset to 0.
The limit value rMaxLimit may only take values > 0.0, the limit value rMinLimit may only take values < 0.0.

Examples with different parameters

tIntegration = 100ms, rMaxLimit = 100.0, rMinLimit = -100.0: With an input signal rIn of +5.0 at the output xOutOpen, a pulse with the length of 1s is generated every 4s.
tIntegration = 100ms, rMaxLimit = 100.0, rMinLimit = -100.0: With an input signal rIn of -5.0 at the output xOutClose, a pulse with the length of 1s is generated every 4s.

tIntegration = 200ms, rMaxLimit = 100.0, rMinLimit = -100.0: With an input signal rIn of +5.0 at the output xOutOpen, a pulse with the length of 1s is generated every 2s.
tIntegration** = 200ms, rMaxLimit = 100.0, rMinLimit = -100.0: Bei einem Eingangssignal rIn von -5.0 am Ausgang xOutClose wird alle 2s ein Impuls mit der Länge 1s erzeugt.

tIntegration = 100ms, rMaxLimit = 200.0, rMinLimit = -100.0: With an input signal rIn of +5.0 at the output xOutOpen, a pulse with the length of 1s is generated every 8s.
tIntegration = 100ms, rMaxLimit = 200.0, rMinLimit = -100.0: With an input signal rIn of -5.0 at the output xOutClose, a pulse with the length of 1s is generated every 8s.

Position display rPos

It is used to display the current position of the 3-point drive in the range 0 - 100% and is calculated internally (0% = rest position, 100% = maximum position).
To avoid deviations between the calculated and the actual position, it is recommended that the readjustment of the position indicator be triggered regularly.
The position display is independent of signal generation, i. e. if the position display reaches an end position (0% or 100%), signals are still generated at the
xOutOpen or xOutClose outputs.

Visualization




Information

Element

Authors

Date

Version

Note

Function

Adam Bartod 11.2016 1.0

Init-Version

Programming

Adam Bartod 02.2017 1.0

Init-Version

Test Jochen Reu / 02.2017 1.0

Init-Version

Documentation

Jochen Reu 10.2017 1.0

Init-Version

Codesys

InOut:
Scope Name Type Initial Comment
Input xEn BOOL  

Enable Functionblock

rIn REAL  

Inputsignal

xRefPos BOOL  

Digital signal for detecting the reference position (limit switch)

iRefPosition INT 0

Reference position of the drive

tImpulsClose TIME TIME#1s0ms

Duration of a pulse at the output Minus/less than

tImpulsOpen TIME TIME#1s0ms

Duration of a pulse at output Plus/More

rMinLimit REAL -100.0

Integral value for pulse triggering at the output minus/less than

rMaxLimit REAL 100.0

Integral value for pulse triggering at output Plus/More

tDuration TIME TIME#2m0s0ms

Operating time of the drive

tIntegration TIME TIME#100ms

Duration between two integration processes

Output xOutOpen BOOL  

Output variable Plus/More for the drive

xOutClose BOOL  

Output variable Minus/less for the drive

rPos REAL  

Analog signal for the current position