SMC_GCodeJumpBuffer (FB)

 

FUNCTION_BLOCK SMC_GCodeJumpBuffer

InOut:

Scope

Name

Type

Initial

Comment

Inout

ncprogIn

SMC_CNC_REF

CNC program input

Input

bExecute

BOOL

Rising edge starts operation.

pBuffer

POINTER TO SMC_GCODE_WORD

Memory for internal buffer

dwBufferSize

UDINT

Size of pBuffer

pBufferOut

POINTER TO SMC_GCODE_WORD

Memory for ncprogOut

dwBufferOutSize

UDINT

Size of pBufferOut in byte

historyBuffer

SMC_ISentenceHistory

A function block keeping track of all G-Code sentence numbers that have been processed and removed from the jump buffer. If no buffer is provided, the default implementation SMC_MonotoneSentenceHistory will be used.

udiRefillWindowSizePercentage

UDINT

10

The amount of elements that is read and removed in one cycle and added in the next cycle, when no jump has been requested (if ncprogOut.bRestart=FALSE). Provided in percent of the current buffer level and defaults to a minimum value of 10. A larger center window will slightly improve reading performance for long cycle times, while reducing the buffer's chances to have a requested jump target actually buffered.

Output

bBusy

BOOL

bDone

BOOL

bError

BOOL

ErrorID

SMC_ERROR

ncprogOut

SMC_CNC_REF

CNC program output to SMC_NCDecoder

bExecuteDecoder

BOOL

Set to TRUE as soon as ncprogOut is filled sufficiently to be interpreted by SMC_NCDecoder;