SMC_CNC_REF (FB)

 

FUNCTION_BLOCK SMC_CNC_REF

This function block manages the parsed G-code files.

InOut:

Scope

Name

Type

Initial

Comment

Input

wCNCREFStructID

WORD

16#BA56

The fix value of wCNCREFStructID allows the module to check internally if the consigned structure variable is of type SMC_CNC_REF.

bRestart

BOOL

In case of jumps implemented within the IEC program (G20), bRestart will be set by SMC_NCDecoder in order to cause the generator of the data structure to reinitialize all pointers and to regenerate the data structure.

diJmpTarget

DINT

0

The jump target (sentence number); only valid, if bRestart = TRUE;

nElements

UDINT

Number of SMC_GCODE_WORD structures at pgc.

diReadPos

UDINT

0

For internal use

udiBuffer

UDINT

16#FFFFFFFF

For internal use

pgc

POINTER TO SMC_GCODE_WORD

0

Pointer on first structure of type SMC_GCODE_WORD.

piStartPosition

SMC_POSINFO

Start position of CNC program.

strProgramName

STRING

''

Name of CNC program.

xPartofLM

BOOL

If the input is TRUE, the function block is maintained by managers. Set by the programming system, when it creates an instance.

bEndOfData

BOOL

TRUE

If TRUE, no further data is supposed to be appended