Example of a manually created cam, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 585

Advertising
background image

L-force | PLC Designer

General Editors

DMS 4.1 EN 03/2011 TD29

583

SMC_CAMtable_<variable_type>_<number_of_elements>_2
This data structure represents a non equidistant curve table. It has the following
components:

Table: ARRAY [0..<number of elements>-1]
OF ARRAY[0..1] OF <type of variables>

array of master/slave position pairs; start and end
position must be enclosed; index 0 refers to the master,
index 1 to the slave

fEditorMasterMin: <type of variables>

storing of master values in Table is scaled to the range
[fEditorMasterMin, fEditorMasterMax] in SoftMotion
units

fEditorMasterMax: <type of variables>

fEditoSlaverMin: <type of variables>

storing of slave values in Table is scaled to the range
[fEditorSlaveMin, fEditorSLaverMax] in SoftMotion units

fEditorSlaveMax: <type of variables>

fTableMasterMin: <type of variables>

storing of master values in Table is scaled to the range
[fTableMasterMin, fTableMasterMax] in Table units

fTableMasterMax: <type of variables>

fTableSlaveMin: <type of variables>

storing of slave values in Table is scaled to the range
[fTableSlaveMin, fTableSlaveMax] in Table units

fTableSlaveMax: <type of variables>

Example of a manually created CAM
The example shows how a CAM is created within an IEC program, that is without
making use of the editor. The following lines have to be entered in the declaration
part:

CAM: MC_CAM_REF:=(
byType:=2, (* non-equidistant )
byVarType:=2, (* UINT *)
nElements:=128,
xStart:=0,
xEnd:=360);
Table: SMC_CAMTable_UINT_128_1:=(
fEditorMasterMin := 0, fEditorMasterMax := 360,
fTableMasterMin := 0, fTableMasterMax := 65536,
fEditorSlaveMin := 0, fEditorSlaveMax := 360,
fTableSlaveMin := 0, fTableSlaveMax := 65536);

Advertising