SMC_NCTokenParser (FB)ΒΆ
FUNCTION_BLOCK SMC_NCTokenParser
The parser between the SMC_NCTokenizer and the SMC_NCInterpreter. The parser transforms the stream of tokens to a sequence of g-code sentences ready to be interpreted.
Note
Usually, SMC_ReadNCFile2 or SMC_ReadNCFromStream should be used, which contain the parser. It is not necessary to use this function block directly in most cases.
- InOut:
Scope
Name
Type
Comment
Inout
tokensInput: token queue
sentencesOutput: sentence queue
Input
bExecuteBOOLWhile
TRUE, the function block is active.bAbortBOOLIf
TRUE, the current processing of this function block is abortedsymbolTableThe symbol table used to look up variables and sub programs.
pCustomFunTablePOINTER TO SMC_NC_GFunctionTable
Allows to define custom functions that can be used in G-Code expressions. If there are no custom G-Code functions, this input is null.
Output
bBusyBOOLTRUEwhile execution of function block is not finished.bErrorBOOLTRUEsignals that an error has occurred within the function block.ErrorIDSMC_ERRORError identification,
SMC_ERRORerrorPosThe source-position where an error has been detected.