3 smc_toolcorr, Smc_toolcorr, L-force | plc designer - softmotion – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual
Page 173

L-force | PLC Designer - SoftMotion
The SM_CNC.lib library
SMC_ToolCorr
173
L
DMS 5.2 EN 03/2011 TD17
7.3
SMC_ToolCorr
The SMC_ToolCorr program organisation unit functions as follows:
All SMC_GEOINFO objects found in the input OUTQUEUE structure are checked one after
the other. If bit 1 (bit 2) of the Intern_Mark variable is set in one of these objects,
displacement of the path in the direction of travel to the left (right) around the current tool
radius is started from that point. In order to ensure a continuous path, a positioning object
(MoveType = 100) is inserted, or if such a positioning object precedes the object, it is
directly shifted to the starting point of the moved path. Every additional object is then
displaced as well as long as bit 0 of Intern_Mark has been set, which leads to the tool radius
correction being aborted.Here as well, a constant continuation of the path is ensured by
means of a positioning object. Once tool radius correction has been started, it must be
ended before displacement in the respective other direction can be started. The
SMC_NCDecoder sets these bits as a reaction to commands G41/G42/G40. In other words,
tool radius correction is carried out for all objects that are within the commands G41 and
G40 or G42 and G40.
Inputs (VAR_IN)
bExecute: BOOL
The program organisation unit executes a reset and starts the tool radius correction if a
rising edge is detected at this input.
bAppend: BOOL
If this input is set to FALSE, the DataOut queue will be cleared on each reset. If it is TRUE,
new data will be written at the end of the DataOut queue.
poqDataIn: POINTER TO SMC_OUTQUEUE
This input points to the SMC_OUTQUEUE structure object that contains the
SMC_GEOINFO objects of the path to be displaced, typically to the DataOut output of the
preceding POU (e.g. the SMC_NCDecoder).
The SMC_ToolCorr program organisation unit (SM_CNC.lib) can be used for
path preprocessing: it creates a shifted path based on an originally defined
path. In the shifted path, each point of each path object is a definable
distance from its original point and its direct neighbours (tool radius
correction). The shifted path thus ensures that each of its points is a fixed
distance from the original path. A typical application is the milling of a
programmed outline using a milling drill of a defined diameter. In order to
compensate for the radius of the drill, the milling drill must then follow an
appropriately shifted path - which can be created with the help of the
SMC_ToolCorr program organisation unit:
The following restriction must be taken into account: If the outline and the
drill radius are selected in such a way that crossover points would result
within the shifted path, i.e. the desired outline would be destroyed were the
shifted path traversed, this will not be taken into consideration (see sketch
on the right). To prevent this, use the SMC_AvoidLoop program organisation
unit.