7 cam data structures, 1 mc_cam_ref, Cam data structures – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual

Page 103: Mc_cam_ref, L-force | plc designer - softmotion

Advertising
background image

DMS 5.2 EN 03/2011 TD17

L

103

L-force | PLC Designer - SoftMotion

CAM editor

Cam data structures

5.7

Cam data structures

During compilation of the project a global variable list (Resources tab in the »PLC

Designer«) named CAM Data is created from the cams programmed in the CAM editor. The

description of each individual cam is written to a structure (one structure per cam)

corresponding to the settings in the 'Build Options' dialog and is thereby made accessible

to the IEC program and the cam POUs. For successful project compilation, the

corresponding structure definitions must be available in the IEC program.
(For this see also the

SoftMotion programming examples

( 267)

.)

Furthermore, an _SMC_CAM_LIST (ARRAY OF POINTER TO MC_CAM_REF) data structure is

also created, referring to the individual cams via pointers.
Of course, the corresponding data structures can also be created and/or completed from

the IEC program during runtime. For this reason they are described in more detail below.

Structure variables which are only of relevance internally are not listed.

5.7.1

MC_CAM_REF

This data structure represents a generic cam and contains the following elements:

wCAMStructID: WORD
The POUs use this variable, which always has a fixed value, to check whether the data

structure entered is an MC_CAM_REF structure.

xStart, xEnd: LREAL
Cam domain. Master start and end position.

byType:BYTE
This variable describes the cam type, i.e. how the cam is represented.

 1: equidistant, 1-dimensional table comprising slave positions
 2: non-equidistant, 2-dimensional table comprising pairs of master/slave points
 3: polynomial description of individual points comprising master position, slave

position, slave velocity and slave acceleration (XYVA)

Advertising