MC_CAM_REF (FB)ΒΆ

FUNCTION_BLOCK MC_CAM_REF

This function block represents a generic cam.

InOut:

Scope

Name

Type

Initial

Comment

Input

wCamStructID

WORD

16#DC34

By means of this variable, which always has a constant value, MC_CamTableSelect checks if the entered data structure is of type MC_CAM_REF.

byType

SMC_CAM_TYPE

Describes the cam type, that is the way in which the cam is represented.

byVarType

BYTE

Defines the type of variables that enter in the curve table. Only used for byType SMC_CAM_TYPE.X or SMC_CAM_TYPE.XY

  • 0: <unused>

  • 1: INT

  • 2: UINT

  • 3: DINT

  • 4: UDINT

  • 5: REAL

  • 6: LREAL

xStart

LREAL

Start position of the master defining the range of master values available

xEnd

LREAL

End position of the master defining the range of master values available.

nElements

INT

Number of elements that is depending on cam type the number of slave positions, master/slave positions or XYVA points.

nMaxElements

INT

-1

nTappets

INT

Number of tappet switch actions.

pce

POINTER TO BYTE

Pointer to actual data element which type depends on byType:

pt

POINTER TO SMC_CAMTappet

dwTappetActiveBits

DWORD

Internal variable

strCAMName

STRING

byInterpolationQuality

BYTE

1

1: Linear interpolation, 3: Cubic interpolation

byCompatibilityMode

BYTE

Compatibility mode: Bit0: TRUE: Periodic execution of tables with master width

xPartofLM

BOOL

TRUE: Generated by programming system -> maintained by managers.