SMC_ReadNCFromStream.SetDelimiters (METH) ¶ METHOD FINAL SetDelimiters : BOOL Reconfigures delimiters for comment, string and variable tokens. Returns TRUE if configuration was accepted and the FB isn’t busy, FALSE otherwise. This method needs to be called before SMC_ReadNCFromStream is called. Delimiter tokens may start with every character in aby*StartDelim , but must end with the character in aby*EndDelim with the same array index as the starting character. Only the following values/characters are allowed as delimiters: 33 ! , 34 " , 35 # , 36 $ , 37 % , 38 & , 39 ' , 40 ( , 41 ) , 42 * , 43 + , 44 , , 45 - , 47 / , 58 : , 59 ; , 60 < , 61 = , 62 > , 63 ? , 64 @ , 91 [ , 92 \ , 93 ] , 94 ^ , 96 ´ , 123 { , 124 | , 125 } , 126 ~ A maximum of 3 different pairs of delimiters can be configured for each token type. Delimiters will be checked for ambiguitiy against each other. Only operator characters not used as delimiter will be recognized as operators. InOut: Scope Name Type Return SetDelimiters BOOL Inout Const delimCfg SMC_NCScanner_DelimConfig
SMC_INCSymbolTable.GetSubprogramSignature (METH) ¶ METHOD GetSubprogramSignature : SMC_NCSymbolResult Queries for the signature of a subprogram. There are three possible results: the signature is known and is returned immediately (FOUND), the signature is not known and is being looked up in the background (LOOKING), and there was an error looking up the signature (ERROR). If the return value is LOOKING, the signature should be queried again in the next cycle. InOut: Scope Name Type Comment Return GetSubprogramSignature SMC_NCSymbolResult Inout Const stSubprogramName STRING The name of the sub program (case insensitive). Inout subSig SMC_NC_SubSignature Out: the sub program parameters, only written if return value is FOUND.
SMC_INCSymbolTable.LookupGlobalVar (METH) ¶ METHOD LookupGlobalVar : BOOL Looks up the pointer and type of a global variable given the variable name. InOut: Scope Name Type Comment Return LookupGlobalVar BOOL Input stName STRING The name of the variable Output pAddr POINTER TO BYTE Pointer to the variable tc TypeClass Type of the variable
SMC_INCSymbolTable.StoreSubprogramSignature (METH) ¶ METHOD StoreSubprogramSignature : SMC_ERROR Stores the sub program parameters in the symbol table. Returns whether storing was successful. InOut: Scope Name Type Return StoreSubprogramSignature SMC_ERROR Inout Const subSig SMC_NC_SubSignature
SMC_NCSymbolResult (ENUM) ¶ TYPE SMC_NCSymbolResult : The possible results of a symbol table lookup. Attributes: qualified_only InOut: Name Comment FOUND The signature has been found LOOKING The signature will be retrieved and can be queried again in the next cycles. ERROR An error ocurred while looking up the signature, e.g. if the subprogram could not be found.
SMC_NCSymbolTable (FB) ¶ FUNCTION_BLOCK SMC_NCSymbolTable IMPLEMENTS SMC_INCSymbolTable This function block implements a symbol table for the G-Code parser. InOut: Scope Name Type Comment Input bExecute BOOL A rising edge resets the symbol table. pvl POINTER TO SMC_VARLIST If there aren’t variables in the CNC programm, this input is not used. Output stRequestedSubprogram STRING Methods: GetSubprogramSignature LookupGlobalVar SetSubprogramError StoreSubprogramSignature Structure: GetSubprogramSignature (Method) LookupGlobalVar (Method) SetSubprogramError (Method) StoreSubprogramSignature (Method)
SMC_NCSymbolTable.GetSubprogramSignature (METH) ¶ METHOD GetSubprogramSignature : SMC_NCSymbolResult InOut: Scope Name Type Return GetSubprogramSignature SMC_NCSymbolResult Inout Const stSubprogramName STRING Inout subSig SMC_NC_SubSignature
SMC_NCSymbolTable.LookupGlobalVar (METH) ¶ METHOD LookupGlobalVar : BOOL InOut: Scope Name Type Return LookupGlobalVar BOOL Input stName STRING Output pAddr POINTER TO BYTE tc TypeClass
SMC_NCSymbolTable.SetSubprogramError (METH) ¶ METHOD SetSubprogramError : SMC_ERROR InOut: Scope Name Type Return SetSubprogramError SMC_ERROR Inout Const stName STRING
SMC_NCSymbolTable.StoreSubprogramSignature (METH) ¶ METHOD StoreSubprogramSignature : SMC_ERROR InOut: Scope Name Type Return StoreSubprogramSignature SMC_ERROR Inout Const subSig SMC_NC_SubSignature