For the complete documentation index, see llms.txt. This page is also available as Markdown.

Out3P

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.

Representation

Interfaces

Inputs

Name
Data type
Value range
Initial value
Function

xEn

BOOL

Enable of the function block

rIn

REAL

Input signal

xRefPos

BOOL

Digital input for detecting the reference position (limit switch)

Outputs

Name
Data type
Value range
Initial value
Function

xOutOpen

BOOL

Output variable Plus/More for the actuator

xOutClose

BOOL

Output variable Minus/Less for the actuator

rPos

REAL

0.0 … 100.0

Analog signal for the current position

Setpoints / Parameters

Name
Data type
Value range
Initial value
Function

iRefPosition

INT

0 - 100

0%

Reference position of the actuator

tImpulsClose

TIME

1s

Duration of a pulse at output Minus/Less

tImpulsOpen

TIME

1s

Duration of a pulse at output Plus/More

rMinLimit

REAL

-100.0

Integral value for pulse triggering at output Minus/Less

rMaxLimit

REAL

100.0

Integral value for pulse triggering at output Plus/More

rDuration

TIME

120s

Actuator runtime

tIntegration

TIME

100ms

Time duration between two integration operations

Functional description

General

This function block is used to convert an analog input signal rIn into the corresponding output signals xOutOpen and xOutClose in the form of pulse-width modulation. The pulse length is always constant (tImpulsClose or tImpulsOpen) while the pause between two pulses varies in length. 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), then only at output xOutOpen pulses are generated. If the current input signal is in the negative range (0.0 - -100.0), then only at output xOutClose pulses are generated. Enabling/disabling of the function block is done via the digital input xEn. Every rising edge at the digital input xRefPos (i.e. the actuator is currently in its reference position) causes a redefinition of the analog output signal rPos to the setpoint / parameter iRefPosition.

Enable input xEn

When 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 for a duration of rDuration + 10 s is permanently activated and at the same time the output signal xOutOpen is deactivated (= forced movement of the actuator to the resting position).

Reference position

The digital input xRefPos allows 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.

Signal generation

The analog input signal rIn (control deviation of a control process, signal symmetric about zero) is integrated over time in the interval tIntegration over time. That is, after each integration interval tIntegration the product of rIn and the tIntegration is formed and added to the current contents of the integration memory. A staircase function is therefore 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, then at output signal xOutOpen a pulse of length tImpulsOpen is generated.

If the integration value falls below the limit value rMinLimit, then at output signal xOutClose a pulse of length tImpulsClose is generated. After each pulse generation, the integration value is reset to 0. The limit value rMaxLimit may only assume values > 0.0, the limit value rMinLimit may only assume values < 0.0.

Examples with different parameters

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

Position display rPos

It is used to display the current position of the 3-point actuator in the range 0 - 100% and is calculated internally (0% = resting position, 100% = maximum position). To avoid deviations between the calculated and the actual position, regular triggering of the readjustment of the position display is recommended. The position display is independent of the signal generation, i.e. if the position display reaches an end position (0% or 100%), signals continue to be output at outputs xOutOpen or xOutClose is generated.

CODESYS

InOut:

Scope
Name
Type
Initial

Input

xEn

BOOL

Input

rIn

REAL

Input

xRefPos

BOOL

Input Const

iRefPosition

INT

0

Input Const

tImpulsClose

TIME

TIME#1s0ms

Input Const

tImpulsOpen

TIME

TIME#1s0ms

Input Const

rMinLimit

REAL

-100.0

Input Const

rMaxLimit

REAL

100.0

Input Const

tDuration

TIME

TIME#2m0s0ms

Input Const

tIntegration

TIME

TIME#100ms

Output

xOutOpen

BOOL

Output

xOutClose

BOOL

Output

rPos

REAL

Last updated