7 the sm_cnc.lib library, The sm_cnc.lib library, L-force | plc designer - softmotion – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual
Page 168: 7the sm_cnc.lib library

DMS 5.2 EN 03/2011 TD17
L
168
L-force | PLC Designer - SoftMotion
The SM_CNC.lib library
7
The SM_CNC.lib library
This POU library provides program organisation units and functions for IEC programs that
have been realised using SoftMotion. It contains the motion functionality and is integrated
in the IEC program. It includes, inter alia, the program organisation units listed below,
which execute the motions designed offline in the editors and can also realise the paths
planned online in the IEC program. This involves accessing internal structures that describe
the individual path objects.
The program organisation units and structures are described in the following chapters.
Path object
Information
SMC_NCDecoder
Decodes the path programmed in the CNC editor in order to obtain structure objects
SMC_ToolCorr
Path preprocessing: tool radius correction
SMC_AvoidLoop
Path preprocessing: avoids loops in the path
SMC_SmoothPath
Path preprocessing: smoothes the path using splines
SMC_RoundPath
Path preprocessing: rounds the path using circular arcs
SMC_CheckVelocities
Checks the final velocities of the segments
SMC_Interpolator
Conversion of the decoded and, if necessary, preprocessed path objects into discrete
points
Auxiliary functions
For moving and rotating a created path
Global variables
Set certain internal parameters
Structures
SMC_POSINFO, SMC_GEOINFO, SMC_VECTOR3D and SMC_VECTOR6D for saving
positions, path segments and vectors
Structure
SMC_OUTQUEUE for managing GEOINFO objects in a list of a defined size
Note!
Please note that the CNC editor can compile a CNC program in two different
ways: as a program variable (SMC_CNC_REF) that has to run through the
decoder and, if applicable, path preprocessing POUs and as OUTQUEUE that can
be passed on to the interpolator directly.