6 smc_cnc_ref, Smc_cnc_ref, L-force | plc designer - softmotion – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual
Page 210

L-force | PLC Designer - SoftMotion
The SM_CNC.lib library
Structures of SM_CNC.lib
210
L
DMS 5.2 EN 03/2011 TD17
7.16.6
SMC_CNC_REF
Parsed G code files are managed in this data structure:
The program organisation units use the wCNCREFStructID variable, which has a fixed
value, to check internally whether the structure variable provided is of type SMC_CNC_REF
or not.
The pgc variable points to the first SMC_GCODE_WORD. nElements contains the number
of SMC_GCODE_WORD structures at pgc.
The start position of the CNC program is stored in piStartPosition, its name is stored in
strProgramName.
The diReadPos and udiBuffer variables are used internally.
The bRestart variable is set by the SMC_NCDecoder program organisation unit if jumps are
used in the CNC program (G20). It tells the originator of the data structure that all pointers
should be reinitialised and the data structure regenerated.
TYPE SMC_CNC_REF :
STRUCT
wCNCREFStructID: WORD := 16#BA56;
nElements: UDINT;
diReadPos: UDINT := 0;
udiBuffer: UDINT := 16#FFFFFFFF;
pgc: POINTER TO SMC_GCODE_WORD := 0;
piStartPosition: SMC_POSINFO;
strProgramName:STRING := '';
bRestart: BOOL;
END_STRUCT
END_TYPE