SMC_SmoothBSpline (FB)¶
FUNCTION_BLOCK FINAL SMC_SmoothBSpline
Smoothes segments of consecutive G1 elements with a B-Spline of fifth degree. Each segment of at least 5 consecutive G1 elements of non-zero length is replaced by splines. The start and end positions of the G1 elements serve as control points of the B-spline that is created. Only the start position of the segment and the end position are interpolated exactly.
Each segment of n >= 5 G1 elements is replaced by n-5 polynomials.
Note
- Does not support H-functions 
- Does not support changes of flags like G51, G52, G40 and so on, these changes are ignored 
- Requires 3D-Mode 
- Can be turned on and off from G-Code using G38/G39 
- A spline always contains the same tool correction information (i.e. lengths and diameter) as the first of the segments that it replaces. 
- Elements other than G1 (e.g. G0, G2, G3, …) interrupt the smoothing until the next G1 element. 
Additional axis: First the values of the additional axis are also converted to a B-spline. For the linear axis (P,Q,U,V,W) only the positions at the end of each polynomial are stored in SMC_GeoInfo. For the smoothed axis (A, B, C) the slope is also stored.
- InOut:
- Scope - Name - Type - Comment - Input - bExecute- BOOL- Execution starts on the rising edge. - poqDataIn- POINTER TO SMC_OUTQUEUE - Input path queue - nSizeOutQueue- UDINT- Size of the data buffer - pbyBufferOutQueuein bytes.- pbyBufferOutQueue- POINTER TO ARRAY [0..0] OF SMC_GEOINFO - Points to the first byte of the memory area being allocated for the SMC_OUTQUEUE-structure. This area must be at least as big as defined in - nSizeOutQueue. Typically the allocation of the memory buffer is done within the declaration part of the IEC-program by defining an array of SMC_GeoInfo (ExampleBuf:- ARRAY[1..50] OF SMC_GEOINFOfor a buffer which can hold 50 path` elements). After predefining the value it may be modified during a reset only.- eMode- The element type applied for the smoothing of the axes. - wFeatureFlag- WORD- The feature bit (0..31) used for smoothing (controlled by G38/G39) - Output - bDone- BOOL- Will be set to - TRUEas soon as the input data from- poqDataInhas been processed completely. Afterwards, the function block will not perform any further actions until it gets reset. If the- bExecuteinput is- FALSE, bDone will be reset to- FALSE.- bBusy- BOOL- TRUE, while execution of function block is not finished.- bError- BOOL- Signals, that an error has occurred within the function block. - wErrorID- SMC_ERROR- Error identification. - poqDataOut- POINTER TO SMC_OUTQUEUE - The queue for the output path 
Structure:
