SMC_OUTQUEUE (FB) ¶ FUNCTION_BLOCK SMC_OUTQUEUE This function block is designed to manage SMC_GEOINFO objects in a list of defined size. The path processing function blocks like SMC_NCDecoder , SMC_SmoothPath , SMC_RoundPath , SMC_AvoidLoop and SMC_ToolCorr - providing a pointer to an internally handled SMC_OUTQUEUE -structure - will initialize this structure automatically. If this queue is programmed and filled “manually”, then the correct initialization has to be done manually also. For this purpose the first two variables ( pbyBuffer, size ) have to be assigned. Note It is strictly recommended to use the functions inside the folder “OutQueue Functions” for working with an SMC_OUTQUEUE structure, and to avoid any modification of its parameters after initialization. InOut: Scope Name Type Initial Comment Input wOUTQUEUEStructID WORD 16#9878 The fix value of this variable allows to check if the provided structure variable is of type SMC_OUTQUEUE . pbyBuffer POINTER TO ARRAY [0..0] OF SMC_GeoInfo Address of coherent memory buffer allocated for SMC_GEOINFO objects. The variable pbyBuffer has to be assigned in every cycle within the IEC program allocating the buffer. The allocation is done within the declaration part, e.g. by using an array (BUFFER: ARRAY [0..99] OF SMC_GEOINFO for a memory area large enough to hold 100 SMC_GEOINFO objects). nCapacity UDINT Contains the capacity in multiples of SMC_GEOINFO objects (The number OF SMC_GEOINFO objects that fit into pbyBuffer ). The function SMC_SetQueueCapacity initializes this field. nReadPos UDINT Contains the position in multiples of SMC_GEOINFO objects of the first object in the list. bEndOfList BOOL In order to avoid a buffer underrun ( SMC_Interpolator ), the SoftMotion function block being passed an SMC_OUTQUEUE structure will not start with the processing of this queue, until it has been filled up completely. However, when working on the last SMC_GEOINFO objects of a path, SMC_OUTQUEUE is no longer complete. Hence, in order to keep the processing going on, bEndOfList has to be set to TRUE as soon as the last SMC_GEOINFO object has been stored. In case that the list will be empty hereafter, but should be filled up again, bEndOfList has to be reset to FALSE . byGenerator BYTE 250 Originator of the queue. The interpolator will use this information for verifying that SMC_CheckVelocities has been processed as prescribed. Valid values are: SMC_NCDecoder : 1 SMC_AvoidLoop : 10 SMC_LimitCircularVelocity : 11 SMC_RoundPath : 12 SMC_SmoothPath : 13 SMC_ToolCorr : 14 SMC_RotateQueue2D : 30 SMC_ScaleQueue3D : 31 SMC_TranslateQueue3D : 32 SMC_CheckVelocities : 254 CNC editor: 255 bReCheckVelocities BOOL Internal variable strProgramName STRING Name of the CNC program nWritePos UDINT Contains the next free position in multiples of SMC_GEOINFO objects. (Declared after strProgramName in order to avoid cache thrashing: make sure, nReadPos and nWritePos aren’t part of the same cache line.)) xPartofLM BOOL If the input, generated by programming system, is TRUE , the function block is maintained by managers. nNumReservedEntries UDINT The number of reserved entries: if this number of free entries is reached, SMC_OutQueue.bFull will return TRUE. Must be at least 3 and at most nCapacity-1 . nPastMarker DINT Points to the first element that has been stored in the queue (if any) and has not yet been overwritten. So the elements from nPastMarker to nReadPos -1 are the “past” of the current queue. nPastMarker equals -1 if (and only if) no element has been appended to the queue yet. Properties: bFull Structure: bFull (Property)
SMC_OUTQUEUE.bFull (PROP) ¶ PROPERTY bFull : BOOL
SMC_AL_STATUS (ENUM) ¶ TYPE SMC_AL_STATUS : This enumeration indicates the current state of the FB instance. Possible states: InOut: Name Initial Comment AL_OFF 0 Avoid-Loop-functionality switched off AL_ON 1 Avoid-Loop-functionality switched on AL_END 2 Processing of the objects terminated
SMC_CNC_REF (FB) ¶ FUNCTION_BLOCK SMC_CNC_REF This function block manages the parsed G-code files. InOut: Scope Name Type Initial Comment Input wCNCREFStructID WORD 16#BA56 The fix value of wCNCREFStructID allows the module to check internally if the consigned structure variable is of type SMC_CNC_REF . bRestart BOOL In case of jumps implemented within the IEC program (G20), bRestart will be set by SMC_NCDecoder in order to cause the generator of the data structure to reinitialize all pointers and to regenerate the data structure. diJmpTarget DINT 0 The jump target (sentence number); only valid, if bRestart = TRUE ; nElements UDINT Number of SMC_GCODE_WORD structures at pgc. diReadPos UDINT 0 For internal use udiBuffer UDINT 16#FFFFFFFF For internal use pgc POINTER TO SMC_GCODE_WORD 0 Pointer on first structure of type SMC_GCODE_WORD . piStartPosition SMC_POSINFO Start position of CNC program. strProgramName STRING ‘’ Name of CNC program. xPartofLM BOOL If the input is TRUE , the function block is maintained by managers. Set by the programming system, when it creates an instance. bEndOfData BOOL TRUE If TRUE , no further data is supposed to be appended
SMC_DEC_STATUS (ENUM) ¶ TYPE SMC_DEC_STATUS : This enumeration variable indicates the current state of the FB instance. Possible states: InOut: Name Initial Comment WAIT_PROG 0 Program not found yet READ_WORD 1 Word read PROG_READ 2 End of program reached
SMC_DIRECTION (ENUM) ¶ TYPE SMC_DIRECTION : This enumeration variable indicates the current interpolation direction of the FB instance. Possible states: InOut: Name Initial Comment IPO_positive 1 Interpolation is ongoing in positive direction (along the original path) IPO_standstill 0 Interpolation paused IPO_negative -1 Interpolation is ongoing in negative direction (in opposite direction to the original path)
SMC_GCODEVIEWER_DATA (STRUCT) ¶ TYPE SMC_GCODEVIEWER_DATA : STRUCT An array of this structure is used as data buffer by the FB SMC_GCodeViewer ; one variable of this type stores one line of a G-code file. InOut: Name Type Initial Comment wGCodeViewertructID WORD 16#6911 Internal ID iLine DINT Line number str STRING G-code line as string
SMC_SMOOTHPATHMODE (ENUM) ¶ TYPE SMC_SMOOTHPATHMODE : Defines the element type applied for the smoothing of the axes. InOut: Name Comment SP_SPLINE3 This mode inserts a spline of 3rd order, with different length of tangents that define the spline. In case of SP_SPLINE3 , this length is dependent from the length of the neighbour object. SP_SPLINE5 This mode inserts a spline of 5th order. SP_SPLINE3_CV This mode inserts a spline of 3rd order, with different length of tangents that define the spline. In case of SP_SPLINE3_CV , this length is dependent from the length of the part of the neighbor object that has been cut off. In case of two adjacent line objects, SP_SPLINE3_CV will stay inside the convex hull of the original path. SP_SPLINE5_CV This 5th oder spline is similar with 3rd order case. There’s no guarantee that the curve will stay inside the convex hull. SP_SPLINE5_MIN_CURVATURE Blending with polynomial of 5th degree of minimum curvature
SMC_Seg (STRUCT) ¶ TYPE SMC_Seg : STRUCT This structure is used internally by the SMC_Interpolator . It represents a path segment of fixed length in which a certain acceleration shape is used. InOut: Name Type Comment eType SMC_SEGMENTTYPE The type of the segment. dLength LREAL The length of the segment dVelStart LREAL The start velocity of the segment (non-negative) dVelEnd LREAL The end velocity of the segment (non-negative) dAccStart LREAL The start acceleration (signed) dAccEnd LREAL The end acceleration (signed) dJerk LREAL The jerk (signed), only used for changing acceleration
SMC_TC_STATUS (ENUM) ¶ TYPE SMC_TC_STATUS : This enumeration indicates the current state of the FB SMC_ToolCorr . InOut: Name Initial Comment TC_ORIG 0 No tool radius correction at the object TC_RIGHT 1 Shift objects to the right TC_LEFT 2 Shift objects to the left TC_RAMPIN_RIGHT 3 Next object ramps in to the right TC_RAMPIN_LEFT 4 Next object ramps in to the left TC_END 5