ST_PROF_XYTAB (ST)

The 'ST_PROF_XYTAB' structure defines an XY table whose x axis can be split at will. The table structure contains the x and y values of the function y = f(x).

 

Structure elements

Name

Type

Description

enType

ENUM

EN_PROF_TAB_TYPE

Table type, to differentiate between X and XY tables

Default

PROF_XYTAB

Range

Meaning

PROF_XYTAB

X and Y positions defined by table values

PROF_XYTAB_NL

X and Y positions defined by table values, not limited

uiNoElement

UINT

Element number of the last table element calculated,

number of table interpolation points

Range

1 ... 180

Default

180

udMasterInc

UDINT

Increments of the master drive which produce a table cycle

Max. table X value

(not used for XY tables)

stElement

ARRAY

ARRAY [0..MAX_PROF_XY_IND] OF ST_PROF_XY

Table elements, X and Y positions

Range

Meaning

stElement[0]

X / Y value at zero point of table

diX

X value at zero point of table, always 0

diY

Y value at zero point of table, always 0

stElement[1]

1st X / Y value of the table

diX

X value of the table

diY

Y value of the table

stElement[2]

2nd X / Y value of the table

diX

X value of the table

diY

Y value of the table

...

...

stElement[180]

180th X / Y value of the table

diX

X value of the table (where diX > stElement[179].diX)

diY

Y value of the table

Structure definitions

Structure definition

MAX_PROF_XY_IND:UINT:=180;

(* highest valid index for 'stElement[0…]'   *)

 

TYPE ST_PROF_YTAB:

 

STRUCT

   

enType:EN_PROF_TAB_TYPE:=PROF_XYTAB;

uiNoElement:UINT:=MAX_PROF_Y_IND;

udMasterInc:UDINT:=20000;

stElement:ARRAY[0…MAX_PROF_XY_IND] OF ST_PROF_XY;

 

END_STRUCT

END_TYPE

 

If the table type 'enType' = PROF_XYTAB_NL is selected, the value for MAX_PROF_XY_IND can be redefined at program level. This enables the original limit of up to 180 XY table sections to be increased.

(Siehe 'Number of table interpolation points'.)