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 interpolatedObjectId
, typically connected with the
SMC_Interpolator output actObjectId
, 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 buffer sizes of the
SMC_NCInterpreter and the path-preprocessing function blocks.
- InOut:
Scope
Name
Type
Comment
Inout
GCodeText
Information about the interpreted GCode. Intended to be connected to the output with the same name of SMC_NCInterpreter or SMC_NCDecoder.
Input
bEnable
BOOL
The function block executes as long as
bEnable
isTRUE
. Enable must beTRUE
as long as either SMC_NCInterpreter or SMC_Interpolator are still busy.interpolatedObjectId
Identifier of the currently interpolated object of the path.
uiNumberOfBufferEntries
UINT
Size of the array that is passed by
pBuffer
. The size is in elements, 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 finishedwErrorID
SMC_ERROR
Error identification
asGCode
ARRAY [0..c_uiLines] OF STRING
Currently active G-code lines. The first line (index 0) is the G-Code of the object currently being interpolated.
Structure: