Curve_10XY_Real_Real
Curve_10XY_Real_Real (FB)
FUNCTION_BLOCK Curve_10XY_Real_Real
Short description
Input of 10 pairs of values (support points each with an X and Y value) Boundary conditions:
The X values must continuously be either increasing or decreasing
Two consecutive X values must not be equal
Typical application: transfer of a characteristic curve with 10 support points
Representation

Interfaces
Outputs
arData_Real_Real
stCurve_Real_Real
Array with the support points (data type X value: REAL, data type Y value: REAL)
xValidData
BOOL
FALSE
Validity of the data in the output array (TRUE = valid)
xError
BOOL
FALSE
Error state of the input support points (TRUE = error)
Setpoints / Parameters
rSP1_X
REAL
1
Support point 1 - X value
rSP1_Y
REAL
1
Support point 1 - Y value
rSP2_X
REAL
2
Support point 2 - X value
rSP2_Y
REAL
2
Support point 2 - Y value
rSP3_X
REAL
3
Support point 3 - X value
rSP3_Y
REAL
3
Support point 3 - Y value
rSP4_X
REAL
4
Support point 4 - X value
rSP4_Y
REAL
4
Support point 4 - Y value
rSP5_X
REAL
5
Support point 5 - X value
rSP5_Y
REAL
5
Support point 5 - Y value
rSP6_X
REAL
6
Support point 6 - X value
rSP6_Y
REAL
6
Support point 6 - Y value
rSP7_X
REAL
7
Support point 7 - X value
rSP7_Y
REAL
7
Support point 7 - Y value
rSP8_X
REAL
8
Support point 8 - X value
rSP8_Y
REAL
8
Support point 8 - Y value
rSP9_X
REAL
9
Support point 9 - X value
rSP9_Y
REAL
9
Support point 9 - Y value
rSP10_X
REAL
10
Support point 10 - X value
rSP10_Y
REAL
10
Support point 10 - Y value
Functional description
The array at output arData_Real_Real is filled with the entered data of the 10 support points, if
there is no active error in the input of the support points (xError = FALSE) AND
a change in value has occurred in the input data
The output xValidData is active (= TRUE) if the data in the output array is valid. The data in the output array can differ from the entered data if the entered data contains an error. The following boundary conditions apply when defining the X values: 1) The X values must be continuously either ascending or descending 2) Two consecutive X values must not be equal The output xError is active (= TRUE) if at least one of these two conditions is not met. It is not active (= FALSE) if both conditions are met.
Representation of an example characteristic curve

CODESYS
InOut:
Output
arData_Real_Real
ARRAY [1..10] OF stCurve_Real_Real
Output
xValidData
BOOL
FALSE
Output
xError
BOOL
FALSE
Input Const
rSP10_Y
REAL
0.0
Input Const
rSP10_X
REAL
26.0
Input Const
rSP9_Y
REAL
100.0
Input Const
rSP9_X
REAL
25.0
Input Const
rSP8_Y
REAL
100.0
Input Const
rSP8_X
REAL
15.0
Input Const
rSP7_Y
REAL
75.0
Input Const
rSP7_X
REAL
14.0
Input Const
rSP6_Y
REAL
75.0
Input Const
rSP6_X
REAL
8.0
Input Const
rSP5_Y
REAL
50.0
Input Const
rSP5_X
REAL
7.0
Input Const
rSP4_Y
REAL
50.0
Input Const
rSP4_X
REAL
-4.0
Input Const
rSP3_Y
REAL
25.0
Input Const
rSP3_X
REAL
-5.0
Input Const
rSP2_Y
REAL
25.0
Input Const
rSP2_X
REAL
-13.0
Input Const
rSP1_Y
REAL
0.0
Input Const
rSP1_X
REAL
-14.0
Last updated

