17 path cams with smc_xinterpolator, Path cams with smc_xinterpolator, L-force | plc designer - softmotion – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual
Page 212

DMS 5.2 EN 03/2011 TD17
L
212
L-force | PLC Designer - SoftMotion
The SM_CNC.lib library
Path cams with SMC_XInterpolator
7.17
Path cams with SMC_XInterpolator
The SMC_XInterpolator POU implements a mixture of cam and CNC. Imagine you want to
cut a certain shape (described by a G code) from a workpiece, whereby the workpiece - from
another process - is to be moved (e.g. along the X axis) and the other axes (Y, Z, etc.) are to
be controlled according to the current position of the workpiece (X) and the stipulation
from the path contour.
The workpiece motion always follows the X direction (other cases can be mapped by
means of a rotation).
The SMC_XInterpolator program organisation unit has the following inputs and outputs:
Inputs (VAR_IN)
bExecute: BOOL
The program organisation unit executes a reset and starts the interpolation if a rising edge
is detected at this input.
poqDataIn: POINTER TO SMC_OUTQUEUE
This input points to the SMC_OUTQUEUE structure object, which contains the
SMC_GEOINFO objects of the path to be interpolated.
dLastWayPos: LREAL
This input allows the user to measure the length of the path that is covered by the
interpolator. The dWayPos output is the sum of dLastWayPos and the distance covered in
the current cycle. If dLastWayPos = 0, dWayPos shows the length of the current path
segment. If dLastWayPos is set to the same value as the dWayPos output, dWayPos will
always be incremented by the current path segment and the total length of the path
covered is obtained. During this process, dLastWayPos can be (re)set to 0 or another value
at any time.
bAbort: BOOL
This input aborts processing of an outline.
eDirection: MC_Direction
This input specifies whether the workpiece will be moved along the X axis in a positive
(positive) or negative (negative) direction. No other values are permitted.