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 menas of this variable, which always has a constant value, the functions checks if the entered data structure is of type MC_CAM_REF.

byType

BYTE

0

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 accelera­tion (XYVA)

byVarType

BYTE

0

Only used if byType=1 or byType=2 Defines the type of variables that enter in the curve table:

  • 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.

nTappets

INT

Number of tappet switch actions.

pce

POINTER TO BYTE

0

Pointer to actual data element which type depends on byType:

pt

POINTER TO SMC_CAMTappet

0

dwTappetActiveBits

DWORD

Internal variable

strCAMName

STRING

''

byInterpolationQuality

BYTE

1

1: Linear interpolation, 3: Cubic interpolation

byCompatibilityMode

BYTE

0

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

bChangedOnline

BOOL

FALSE

Internal variable

xPartofLM

BOOL

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