SMC_IGSentenceModifier (ITF) ¶ INTERFACE SMC_IGSentenceModifier Interface to modify the g-code sentence stream, used by SMC_ReadNCFromStream and SMC_ReadNCFile2 . Methods: Call Start Structure: Call (Method) Start (Method)
SMC_INCLookup (ITF) ¶ INTERFACE SMC_INCLookup Interface for the lookup of CNC programs. Methods: LookUp Structure: LookUp (Method)
SMC_ITokenModifier (ITF) ¶ INTERFACE SMC_ITokenModifier Interface to modify the token stream, used by SMC_ReadNCFromStream and SMC_ReadNCFile2 . Methods: Call Start Structure: Call (Method) Start (Method)
SMC_NCLookupFile (FB) ¶ FUNCTION_BLOCK FINAL SMC_NCLookupFile IMPLEMENTS SMC_INCLookup InOut: Scope Name Type Comment Input aSubProgramDirs ARRAY [0..4] OF STRING(174) An array of up to 5 directories where subprograms are searched. For a subprogram with name “SUB”, the file “sub.cnc” (lower-case) is searched in each of the given directories, starting with directory aSubProgramDirs[0], in ascending order. The first match is used. The first empty directory name ends the search. Methods: LookUp Structure: LookUp (Method)
SMC_NCNavigator (FB) ¶ FUNCTION_BLOCK SMC_NCNavigator This function block selects one of a given number of G-sentence queues. The selection is done based on the called subprogram and controlled by SMC_NCInterpreter . Additionally to subprogram calls and returns, this function block also handles jumps to sentence numbers, jumps to jump targets, and step suppression. Note This function block is included in SMC_ReadNCFile2 and is needed in CNC applications only in special cases. InOut: Scope Name Type Comment Inout sentences SMC_GSentenceQueue The output sentence queue that can be fed into SMC_NCInterpreter . Note: this queue must have capacity 1. Input bExecute BOOL A rising edge starts the execution. bAbort BOOL If TRUE , the current processing of this function block is aborted bStepSuppress BOOL When this input is TRUE , lines of the CNC program starting with ‚/’ will be ignored. Otherwise they will be processed. pSentenceQueues POINTER TO SMC_GSentenceQueue Pointer to the first element of an array of sentence queues, one for each subprogram call depth. The first is used for the main program. Note that the last queue is reserved for parsing subprogram declarations, so the effective maximum call depth is nNumSentenceQueues - 1. Read each cycle, not only at the rising edge of bExecute. nNumSentenceQueues UDINT The number of sentence queues. Must be at least 1. stSubprogramDeclRequest STRING If this input is set to an non-empty string, the last sentence queue will be used to read the subprogram with the given name in order to store the declaration in the symbol table. Read each cycle, not only at the rising edge of bExecute. Output bBusy BOOL TRUE while execution of function block is not finished bError BOOL TRUE signals that an error has occurred within the function block. ErrorID SMC_ERROR Error identification errorPos SMC_NC_SourcePosition The source-position where an error has been detected. RequestedSentenceQueueIdx UDINT The zero-based index of the active sentence queue. RequestedProgramName STRING The program name of the requested sentence queue. Only relevant if RequestedSentenceQueueIdx is increased.
SMC_NC_IStackAddressResolver (ITF) ¶ INTERFACE SMC_NC_IStackAddressResolver Methods: GetAddress Structure: GetAddress (Method)
Parser ¶ Expressions Functions SMC_NC_GArgument (Struct) SMC_NC_GArgumentValue (Union) SMC_NC_GFunction (Struct) SMC_NC_GFunctionTable (Struct) SMC_NC_IFunction (Interface) Call (Method) GetSignature (Method) SMC_NCTokenParser (FunctionBlock) SMC_NC_SourcePosition (Struct) SymbolTable SMC_GVarType_ToString (Function) SMC_INCSymbolTable (Interface) GetSubprogramSignature (Method) LookupGlobalVar (Method) StoreSubprogramSignature (Method) SMC_NCSymbolResult (Enum) SMC_NCSymbolTable (FunctionBlock) GetSubprogramSignature (Method) LookupGlobalVar (Method) SetSubprogramError (Method) StoreSubprogramSignature (Method) SMC_NC_SubSignature (Struct)
Expressions ¶ Functions SMC_NC_GArgument (Struct) SMC_NC_GArgumentValue (Union) SMC_NC_GFunction (Struct) SMC_NC_GFunctionTable (Struct) SMC_NC_IFunction (Interface) Call (Method) GetSignature (Method)
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 tokens SMC_TokenQueue Input: token queue sentences SMC_GSentenceQueue Output: sentence queue Input bExecute BOOL While TRUE , the function block is active. bAbort BOOL If TRUE , the current processing of this function block is aborted symbolTable SMC_INCSymbolTable The symbol table used to look up variables and sub programs. pCustomFunTable POINTER 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 bBusy BOOL TRUE while execution of function block is not finished. bError BOOL TRUE signals that an error has occurred within the function block. ErrorID SMC_ERROR Error identification, SMC_ERROR errorPos SMC_NC_SourcePosition The source-position where an error has been detected.
SMC_NC_SourcePosition (STRUCT) ¶ TYPE SMC_NC_SourcePosition : STRUCT Represents a source position consisting of a line number, a column number (both zero-based), and a length. InOut: Name Type Initial Comment diLine DINT -1 The zero-based line number. -1 if unknown. diColumn DINT -1 The zero-based column number. -1 if unknown. diLength DINT -1 The length. -1 if unknown.