2 smc_gcodeviewer, Smc_gcodeviewer, L-force | plc designer - softmotion – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual

Page 171

Advertising
background image

L-force | PLC Designer - SoftMotion

The SM_CNC.lib library

SMC_GCodeViewer

171

L

DMS 5.2 EN 03/2011 TD17

7.2

SMC_GCodeViewer

This POU can be used in combination with the SMC_NCDecoder. It collects and stores the

textual representation (G code) of the individual GeoInfo objects and outputs it again in

the form of an ARRAY OF STRING, which can be output by means of a table in the

visualisation, for example. Via the input, which is typically connected to the interpolator

output iActObjectSourceNo, the POU receives information about which row has already

been dealt with and deletes it. In this way, a display element of the current G code can be

created.
Please note that the output of this POU does not correspond to the G-code that is stored in

the editor or text file, as here for instance no blank lines or comments are accepted.

Variables that might be used are already replaced.
The POU is called in the task context of the SMC_NCDecoder programm organisation unit.
A buffer of sufficient size has to be transmitted to it. The number of the

SMC_GCodeViewer_DATA objects at least has to be as great as the sum of all

SMC_GeoInfo objects which are created in the buffers of the SMC_NCDecoder POUs and

the path preprocessing POUs.

Input/output (VAR_IN_OUT)
GCodeText: SMC_GCODE_TEXT
SMC_GCODE_TEXT is structured as follows:

Data source. Is linked to the output of the SMC_NCDecoder POUs of the same name.

Inputs (VAR_IN)
bEnable: BOOL
The POU is active if this input is set to TRUE.
iActObjectSourceNo: INT
Line number that is currently edited by the interpolator.
uiNumberOfBufferEntries: UINT
Size of the array transferred in pBuffer.
pBuffer: POINTER TO SMC_GCODEVIEWER_DATA;
Address of the array that has been reserved as buffer for the POU.

TYPE SMC_GCODE_TEXT :
STRUCT
str: STRING(80);
iLineNumber: INT;
bNewLine: BOOL;
bClearList: BOOL;
END_STRUCT
END_TYPE

Advertising