SMC_GCodeViewer (FB)ΒΆ
FUNCTION_BLOCK SMC_GCodeViewer
This function block produces a textual representation of the G-Code
that has been processed by SMC_NCInterpreter or SMC_NCDecoder.
This textual representation can be displayed in a visualization.
With the input iActObjectSourceNo, typically connected with the
SMC_Interpolator output iActObjectSourceNo, the function block
gets the information which line has already been processed.  It
will remove the text of already processed lines.
Note
The output of the function block does not exactly match the G-code stored in the editor or in the text file. For example, no blank lines or comments will be output and variables will be replaced with their value.
The function block is called in the same task as SMC_NCInterpreter.
The number of SMC_GCODEVIEWER_DATA objects in the buffer pBuffer
must be at least as large as the sum of all SMC_GEOINFO objects which
are can be stored in the buffers of the SMC_NCInterpreter and the
path-preprocessing function blocks.
- InOut:
- Scope - Name - Type - Comment - Inout - GCodeText- Data source connected to the output with the same name of SMC_NCInterpreter or SMC_NCDecoder. - Input - bEnable- BOOL- The function block executes as long as - bEnableis- TRUE.- iActObjectSourceNo- DINT- Line number currently processed by interpolator (zero-based) - uiNumberOfBufferEntries- UINT- Size of the array that is passed by - pBuffer. The size is in element, not bytes.- pBuffer- POINTER TO SMC_GCODEVIEWER_DATA - Address of the array allocated as a buffer for the function block - Output - bError- BOOL- Signals, that an error has occurred within the function block - bBusy- BOOL- TRUE, if execution of function block is not finished- wErrorID- SMC_ERROR- Error identification - asGCode- ARRAY [0..c_uiLines] OF STRING - Currently active G-code lines 
Structure:
