MC_CAM_REF (FB)¶
FUNCTION_BLOCK MC_CAM_REF
This function block represents a generic cam.
- InOut:
Scope
Name
Type
Initial
Comment
Input
wCamStructIDWORD16#DC34
By menas of this variable, which always has a constant value, the functions checks if the entered data structure is of type
MC_CAM_REF.byTypeBYTE0
Describes the cam type, that is the way in which the cam is represented. The following settings are valid:
0: Polynomial description (5th degree)
1: Equidistant, one-dimensional table of slave positions
2: Non-equidistant, two-dimensional table of related master/slave positions
3: Polynomial description on particular points consisting of master position, slave position, slave velocity and slave acceleration (XYVA)
byVarTypeBYTE0
Only used if byType=1 or byType=2 Defines the type of variables that enter in the curve table:
0: <unused>
1:
INT2:
UINT3:
DINT4:
UDINT5:
REAL6:
LREAL
xStartLREALStart position of the master defining the range of master values available.
xEndLREALEnd position of the master defining the range of master values available.
nElementsINTNumber of elements that is depending on cam type the number of slave positions, master/slave positions or XYVA points.
nTappetsINTNumber of tappet switch actions.
pcePOINTER TO BYTE
0
Pointer to actual data element which type depends on byType:
1:
pcepoints toSMC_CAMTable_..._1e.g.: SMC_CAMTable_LREAL_128_12:
pcepoints toSMC_CAMTable_..._2e.g.: SMC_CAMTable_UDINT_256_23:
pcepoints to an array of SMC_CAMXYVA
ptPOINTER TO SMC_CAMTappet
0
dwTappetActiveBitsDWORDInternal variable
strCAMNameSTRING‘’
byInterpolationQualityBYTE1
1: Linear interpolation, 3: Cubic interpolation
byCompatibilityModeBYTE0
Compatibility mode: Bit0:
TRUE: Periodic execution of tables with master widthbChangedOnlineBOOLFALSE
Internal variable
xPartofLMBOOLTRUE: Generated by programming system -> maintained by managers.