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

Page 174

Advertising
background image

DMS 5.2 EN 03/2011 TD17

L

174

L-force | PLC Designer - SoftMotion

The SM_CNC.lib library

SMC_ToolCorr

dToolRadius: LREAL
This input variable contains the value which, when added to the relevant ToolRadius value

of the SMC_GEOINFO object, gives the tool radius by which the path is to be shifted. It may

be changed online, which means that you can define the value offline (by means of the

SMC_GEOINFO structure) and modulate it online. Please note, however, that changing the

tool radius whilst processing a POU to be shifted will cancel tool path correction and

should, therefore, be avoided. The tool radius can be changed during a reset or during a

phase when the program organisation unit is definitely not in the process of shifting a POU

(status = TC_ORIG). Default value: 0.
nSizeOutQueue: UDINT
Here, the POU is informed of the size of the data buffer into which the list of GEOINFO

structure objects is written. The buffer must be five times bigger than a GEOINFO

structure. If this is not the case, the SMC_NCDecoder does not perform any actions. It is

permissible to set the value but it is only permissible to alter it subsequently during a reset.

It is advisable to create the actual buffer as described below e.g. as an example: Array of

SMC_GeoInfo. The corresponding buffer size then results from sizeof(Example).
pbyBufferOutQueue: POINTER TO BYTE
This input must point to the first byte of the memory area created for the OUTQUEUE

structure. This memory area must be at least as large as defined in nSizeOutQueue. It is

typically assigned in the declaration part of the IEC program by means of an array of

SMC_GeoInfo (e.g. BUF: ARRAY[1...50] OF SMC_GEOINFO; for a buffer that can store 50

path elements). In respect of this value as well, it is permissible to set the value but it is only

permissible to alter it subsequently during a reset.

Outputs (VAR_OUT)
bDone : BOOL
This variable is set to TRUE as soon as the input data from DataIn has been fully processed.

Thereafter the program organisation unit will not execute any more actions until a reset

has been performed. If the bExecute input is FALSE, bDone will also be reset to FALSE.
bError : BOOL
This value will be set to TRUE if an error occurs.
wErrorID: SMC_ ERROR (INT)
If an error occurs, this variable will contain the error number.
poqDataOut: POINTER TO SMC_OUTQUEUE
This output points to an SMC_OUTQUEUE structure that contains the shifted path as a list

of SMC_GEOINFO objects.

Advertising