SMC_ReadNCTokens (FB)¶
FUNCTION_BLOCK SMC_ReadNCTokens
SMC_ReadNCTokens reads from a SMC_TokenQueue of SMC_Token and transforms it
into a SMC_CNC_REF.
- InOut:
Scope
Name
Type
Comment
Inout
ncprogOutput CNC program
tokensInput token queue
Input
bExecuteBOOLWhile
TRUE, the function block is active.pBufferPOINTER TO BYTE
Pointer on a sufficiently large, free data area (buffer) that is allocated in the IEC application. It is strongly recommended to allocate the buffer as
ARRAY[0..x] OF |ioSMC_GCODE_WORD|in order to make sure to have a correct data alignment. A definition ofARRAY[0..x] OF BYTEmay lead to a misaligned data access on some platforms.dwBufferSizeDWORDSize of the buffer in byte
pStringBufferPOINTER TO SMC_StringBuffer
Pointer to an object of type SMC_StringBuffer This object is used to store strings that are defined in the G-code program in order to write them to variables using G36&37. If the pointer is not set (0) and string constants are used in the G-code program, an error will be generated.(´´SMC_RNCF_NO_STRINGBUFFER´´).
pvlPOINTER TO SMC_VARLIST
If there aren’t variables in the CNC programm, this input isn’t set. SMC_VARLIST
fDefaultVelLREALfDefaultAccelLREALfDefaultDecelLREALfDefaultVelFFLREALDefault velocity for fast forward (G0), FF word
fDefaultAccelFFLREALDefault acceleration for fast forward (G0), EF+ word
fDefaultDecelFFLREALDefault deceleration for fast forward (G0), EF- word. A non- negative value is expected.
b3DModeBOOLIf TRUE, an implicit G17 is prepended to the G-code.
bEnableSyntaxChecksBOOLTurns on syntax checks that will detect invalid g-code and stop with an error in this case
Output
bDoneBOOLTRUEif parameter is availablebBusyBOOLTRUEwhile execution of function block is not finished.bErrorBOOLTRUEsignals that an error has occurred within the function block.ErrorIDSMC_ERRORError identification,
SMC_ERROR
Structure: