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
GCodeTextData source connected to the output with the same name of SMC_NCInterpreter or SMC_NCDecoder.
Input
bEnableBOOLThe function block executes as long as
bEnableisTRUE.iActObjectSourceNoDINTLine number currently processed by interpolator (zero-based)
uiNumberOfBufferEntriesUINTSize of the array that is passed by
pBuffer. The size is in element, not bytes.pBufferPOINTER TO SMC_GCODEVIEWER_DATA
Address of the array allocated as a buffer for the function block
Output
bErrorBOOLSignals, that an error has occurred within the function block
bBusyBOOLTRUE, if execution of function block is not finishedwErrorIDSMC_ERRORError identification
asGCodeARRAY [0..c_uiLines] OF STRING
Currently active G-code lines
Structure: