FB_BA_Chrct02

FB_BA_Chrct02 1:

The function block FB_BA_Chrct02 represents a linear interpolation with 2 interpolation points and can be used to generate a characteristic curve. The characteristic curve is determined by the interpolation points [fX01/fY01] and [fX02/fY02].

The calculated output value fCalcVal is limited by fYMin or fYMax.

FB_BA_Chrct02 2:

Error handling

The input values for fX0[n+1] must always be greater than from fX0[n].

In case of an error the variable bErr indicates this. The property ErrorDescription gives out a detailed description.

The input value for fYMin must not be greater than fYMax.

FB_BA_Chrct02 3: Inputs

VAR_INPUT
  fX     : REAL;
  fX01   : REAL;
  fX02   : REAL;
  fY01   : REAL;
  fY02   : REAL;
  fYMin  : REAL;
  fYMax  : REAL;
END_VAR

Name

Type

Description

fX

REAL

Input value of the characteristic curve.

fX0N

REAL

X-value for interpolation point PN.

fY0N

REAL

Y-value for interpolation point PN.

fYMin

REAL

Lower limit of fCalcVal. The input for the lower limit is limited to the global parameter BAComn_Global.fMinReal from the Tc3_BA2_Common library.

fYMax

REAL

Upper limit of fCalcVal. The input for the upper limit is limited to the global parameter BAComn_Global.fMaxReal from the Tc3_BA2_Common library.

FB_BA_Chrct02 4: Outputs

VAR_OUTPUT
  fCalcVal   : REAL;
  bErr       : BOOL;
END_VAR

Name

Type

Description

fCalcVal

REAL

Calculated output value of the characteristic curve.

bErr

BOOL

This output is switched to TRUE if the parameters entered are erroneous.

FB_BA_Chrct02 5: Properties

Name

Type

Access

Description

ErrorDescription

T_MaxString

Get

Issues a detailed description of errors, see error handling.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.22

Tc3_BA2 from v5.2.5.0