Mc_cam_ref, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 583

Advertising
background image

L-force | PLC Designer

General Editors

DMS 4.1 EN 03/2011 TD29

581

Example:
Access to the data object of the structure MC_CAM_REF:

PROGRAM CAMManageRef
VAR
pCAM_Ref: POINTER TO MC_CAM_REF;
n: INT;
i: INT;
END_VAR

n := g_CAMManager.Count;
FOR i:=0 TO n-1 DO
pCAM_Ref := g_CAMManager.GetCAM(i);
(* pCAM_Ref verarbeiten *)
END_FOR

MC_CAM_REF
This data structure represents a generic CAM and includes the following components:

wCAMStructID: WORD

has a fixed value and is used to check whether the data structure
given to the module as an input is a MC_CAM_REF structure

xStart, xEnd : LREAL

start- and end position of the master defining the range of master
values available

byType : BYTE

describes the CAM type, that is the way in which the CAM is
represented. The following settings are valid:
1: equidistant, 1-dimensional table of slave positions
2 :non-equidistant, 2-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)

byVarType : BYTE
(in case of byType=1 or byType=2)

defines the type of variables that enter in the curve table:
0: INT
1: UINT
2: DINT
3: UDINT
4: REAL
5: LREAL

nElements : INT

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

Advertising