XYVA table
XY tables are based on the 'ST_PROF_XYVATAB' structure. They support the definition of a function y=f(x) based on 'uiNoElement' 5th order polynomials.
A pointer of the table structure references the dX, dY, dV, and dA values which describe the function y=f(x) section by section.
dX and dY describe the interpolation point of the function, dV describes the velocity (value of first derivation), and dA describes the acceleration (value of second derivation) in this point.
The table interpolation point structure 'stCam_A': ARRAY [0...3] OF SMC_CAMXYVA and the structure 'stCam': MC_CAM_REF are generated automatically based on the cam disk editor under CODESYS.
The 'CAMXYVA_TO_PROF' function block converts the CODESYS structures into the AMK structure 'ST_PROF_XYVATAB'. (
Tabelle 3: CAM_PROF: Table structure of the XYVA table
|
Header information: |
enType = PROF_XYVATAB |
uiNoElement |
|---|---|---|
|
udMasterInc (not used) |
||
| Pointer to interpolation point table: |
pstCamXYVA |
|
Table structure of the interpolation point table
|
XYVA interpolation point table: |
stCam[0].dX = 0 |
|
|
stCam[0].dY = 0 |
||
|
stCam[0].dV |
||
|
stCam[0].dA |
||
|
... |
||
|
stCam[N].dX |
||
|
stCam[N].dY |
||
|
stCam[N].dV |
||
|
stCam[N].dA |
||
Abbildung 24: CAM_PROF: Principle of the function interpolator with XYVA tables
The figure shows the functional principle of the XYVA interpolator based on 5th order polynomials defined section by section.
The example includes N = 3 polynomials with 4 sampling points stCam_A[0] ... stCam_A[3].
CODESYS structures 'stCAM' and 'stCAM_A'
|
stCAM: MC_CAM_REF |
:= |
(nElements = 4, |
|
stCAM_A: ARRAY[0…3] OF SMC_CAMXYVA |
:= |
(dX = 0.000000, dY = 0.000000, dV = 0.000000, dA = 0.000000), (dX = 5000.000000, dY = 10000.000000, dV = 0.000000, dA = 0.000000), (dX = 15000.000000, dY = 5000.000000, dV = 0.000000, dA = 0.000000), (dX = 20000.000000, dY = 0.000000, dV = 0.000000, dA = 0.000000), |
Advantages of the XYVA table
- Freely definable points with specification of 1st and 2nd derivation at start and end of section
Disadvantages of the XYVA table
- Increased processing overhead for online determination of 5th order polynomials