Cam data structures, Short survey on data structures, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 582

Advertising
background image

L-force | PLC Designer

General Editors

580

DMS 4.1 EN 03/2011 TD29

13.1.7

CAM Data Structures
In course of the compilation of the project the edited CAM data is internally converted
into a list of global variables ("CAM Data").
Each CAM is represented by a structure variable of type MC_CAM_REF that can be
accessed by the IEC-program as well as by the CAM preprocessing functions and
function blocks. In order to get an compilation void of detected errors, the appropriate
structure definitions must be available in the IEC program by adding the library
SM3_Basic.library.
Furthermore the data structure _SMC_CAM_LIST (ARRAY OF POINTER TO
MC_CAM_REF) referring to the particular CAMS via pointers and a data structure
pointing on all available CAMs are created.
Of course the corresponding data structures can also be created resp. filled in by the
IEC program during run time. For this reason a detailed description of all data
structures that are not for internal use only, will follow.

Short Survey on data structures
In the course of the compilation of the project the edited CAM data is internally
converted into a list of global variables
Each CAM is represented by a structure variable of type MC_CAM_REF that can be
accessed by the IEC-program as well as by the CAM preprocessing functions and
function blocks.
The appropriate data types are provided by the library SM3_Basic.library, which is
included in the library manger automatically with adding a SoftMotion drive to the
device tree.
Of course it is possible, that the variable describing a CAM is created or assigned by the
IEC program during run time. For this reason a detailed description of all data
structures that are not for internal use only, will follow:
MC_CAM_REF
ARRAY OF SMC_CAMXYVA
SMC_CAMTable_<type of variables>_<number of elements>_1
SMC_CAMTable_<variable-type>_<number of elements>_2

To allow easy acces to the structure variables, these are summarized and listed in the
global variable g_CAMManager with the property Count and the method
GetProgram(int n).

Advertising