6 smc_roundpath, Smc_roundpath, L-force | plc designer - softmotion – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual
Page 180

DMS 5.2 EN 03/2011 TD17
L
180
L-force | PLC Designer - SoftMotion
The SM_CNC.lib library
SMC_RoundPath
7.6
SMC_RoundPath
The SMC_RoundPath program organisation unit (SM_CNC.lib) is very similar to
SMC_SmoothPath. It rounds angles that occur at the junction of two lines by means of
circular arcs.
The SMC_RoundPath program organisation unit functions as follows:
All SMC_GEOINFO objects found in the input SMC_ OUTQUEUE structure are checked one
after the other. If bit 5 of the Intern_Mark variable is set in one of these objects, angle
smoothing starts from that point until bit 3 of Intern_Mark is set in one of the subsequent
objects. SMC_NCDecoder sets these bits as a response to commands G52 and G50. In other
words, angle smoothing will be performed for all objects located within commands G52
and G50.
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 unrounded path; typically it points to the DataOut output of
the preceding program organisation unit (e.g. SMC_NCDecoder).
dRadius: LREAL
This input variable contains the value that gives the distance to an angle at which the
corresponding objects will be cut and replaced by a circular arc. It may be changed online,
which means that you can adapt this value to the path conditions. Default value: 0.
dAngleTol: REAL
This input describes the angle tolerance value up to which a path bend should not be
smoothed.
For this purpose the path will be cut at a distance "r" to the angle and a spline
will be inserted. The distance is specified by the SMC_GEOINFO structure
object of the first object to be rounded as well as by the dRadius input. The
value of dRadius is dominant, i.e. only if it is 0 will the value of the object be
taken into account. If the set value is greater than half the length of one of
the two SMC_GEOINFO objects, the half length will be used instead.