SMC_ControlAxisByVel (FB) ¶ FUNCTION_BLOCK SMC_ControlAxisByVel This function block writes the set velocity fSetVelocity to the axis drive structure and monitors axis for jumps in a similar way to SMC_ControlAxisByPos . SMC_ControlAxisByPosVel is mostly used with CNC and an instance of the SMC_Interpolator . See also: SMC_ControlAxisByPos InOut: Scope Name Type Initial Comment Inout Axis AXIS_REF_SM3 Reference to axis See also: AXIS_REF_SM3 Input iStatus SMC_INT_STATUS Status of the instance of SMC_Interpolator bEnable BOOL TRUE : Starts execution bAvoidGaps BOOL TRUE TRUE : Monitoring of position and velocity If the velocity exceeds the limit value fSWMaxVelocity which is set in Axis and configured in the drive dialog with the maximum values setting, then bStopIpo is set to TRUE . The axis is moved with the values fGapVelocity, fGapAcceleration, fGapDeceleration and fGapJerk to the set position and brought to the set velocity. On reaching the set values bStopIpo is set to FALSE fSetVelocity LREAL Set velocity in [u/s] fGapAcceleration LREAL Acceleration for the bypassing of the jump in [u/s2] fGapDeceleration LREAL 1E+15 Deceleration for the bypassing of the jump in [u/s2] Note: also used if bAvoidGaps is FALSE , for stopping when disabled fGapJerk LREAL 1E+16 Jerk for the bypassing of the jump in [u/s3] Note: also used if bAvoidGaps is FALSE , for stopping when disabled Output bBusy BOOL TRUE : Function block operating bCommandAborted BOOL TRUE : Execution was interrupted by another function block instance operating on Axis . bError BOOL TRUE : Error has occurred iErrorID SMC_ERROR Error identification bStopIpo BOOL TRUE : Jump in velocity or position occurred and adaptation to new position is running If bStopIpo is connected to the EmergencyStop input of the SMC_Interpolator instance, the interpolator waits until the axis is correctly positioned. See also: SMC_ERROR
GCode Viewer ¶ SMC_GCodeViewer (FunctionBlock) DoBeforeLeave (Action)
SMC_GCodeViewer (FB) ¶ FUNCTION_BLOCK SMC_GCodeViewer This function block produces a textual representation of the G-Code that has been processed by SMC_NCInterpreter or SMC_NCDecoder . This textual representation can be displayed in a visualization. With the input iActObjectSourceNo , typically connected with the SMC_Interpolator output iActObjectSourceNo , the function block gets the information which line has already been processed. It will remove the text of already processed lines. Note The output of the function block does not exactly match the G-code stored in the editor or in the text file. For example, no blank lines or comments will be output and variables will be replaced with their value. The function block is called in the same task as SMC_NCInterpreter . The number of SMC_GCODEVIEWER_DATA objects in the buffer pBuffer must be at least as large as the sum of all SMC_GEOINFO objects which are can be stored in the buffers of the SMC_NCInterpreter and the path-preprocessing function blocks. InOut: Scope Name Type Comment Inout GCodeText SMC_GCODE_TEXT Data source connected to the output with the same name of SMC_NCInterpreter or SMC_NCDecoder . Input bEnable BOOL The function block executes as long as bEnable is TRUE . iActObjectSourceNo DINT Line number currently processed by interpolator (zero-based) uiNumberOfBufferEntries UINT Size of the array that is passed by pBuffer . The size is in element, not bytes. pBuffer POINTER TO SMC_GCODEVIEWER_DATA Address of the array allocated as a buffer for the function block Output bError BOOL Signals, that an error has occurred within the function block bBusy BOOL TRUE , if execution of function block is not finished wErrorID SMC_ERROR Error identification asGCode ARRAY [0..c_uiLines] OF STRING Currently active G-code lines Structure: DoBeforeLeave (Action)
SMC_CoordinateTransformation3D (FB) ¶ FUNCTION_BLOCK SMC_CoordinateTransformation3D This function block will calculate the coordinates of a point given in respect of the new coordinate system and transformed to the old coordinate system. For this purpose, the coordinate transformation is defined by the translation of the origin and the new unit vectors (given in respect of the old coordinate system). For detailed information of transformation modules see the overview on kinematic transformations in the CNC online help. InOut: Scope Name Type Comment Input piIn SMC_PosInfo Point in new coordinates vX SMC_Vector3D Unit vector of new coordinate system vY SMC_Vector3D Unit vector of new coordinate system vZ SMC_Vector3D Unit vector of new coordinate system vTranslation SMC_Vector3D Translation vector for origin = origin of new coordinate system in old coordinates Output piOut SMC_PosInfo Point in old coordinates
SMC_DetermineCuboidBearing (FB) ¶ FUNCTION_BLOCK SMC_DetermineCuboidBearing This function block will determine the position of a cuboid (corner mark, edge alignment) in the space in dependence of 6 (3/2/1) points given: For detailed information of transformation modules see the overview on kinematic transformations in the CNC online help. InOut: Scope Name Type Initial Comment Input A1 SMC_Vector3D First of three points that are located on the surface A of a cube and do not lie on a common line. A2 SMC_Vector3D Second of three points that are located on the surface A of a cube and do not lie on a common line. A3 SMC_Vector3D Third of three points that are located on the surface A of a cube and do not lie on a common line. B1 SMC_Vector3D First of two points that are located on another cube surface B adjacent to A. The projection of this point on surface A may not coincide with the projection of B2. B2 SMC_Vector3D Second of two points that are located on another cube surface B adjacent to A. The projection of this point on surface A may not coincide with the projection of B1. C1 SMC_Vector3D Point on a further cube surface adjacent to A and B Output M SMC_Vector3D Common corner point of cube surfaces A, B and C vAB SMC_Vector3D Unit vector on edge line between A and B with start point M vBC SMC_Vector3D Unit vector on edge line between B and C with start point M vCA SMC_Vector3D Unit vector on edge line between A and C with start point M bError BOOL Signals, that an error has occurred within the function block nError WORD 0 Error description: 0: No error ( bError=FALSE ) 1: A1,A2,A3 lie on common line 2: Projections of B1 and B2 on surface A coincide
SMC_InvCoordinateTransformation3D (FB) ¶ FUNCTION_BLOCK SMC_InvCoordinateTransformation3D This function block will calculate the coordinates of a point given in respect of the old coordinate system and transformed to the new coordinate system. For this purpose, the inverse coordinate transformation is defined by the translation of the origin and the new unit vectors (given in respect of the old coordinate system). (note: That this FB only works correct, if the vectors vX, vY and vZ are perpendicular to each other) For detailed information of transformation modules see the overview on kinematic transformations in the CNC online help. InOut: Scope Name Type Comment Input piIn SMC_PosInfo Point in old coordinates vX SMC_Vector3D Unit vector of new coordinate system vY SMC_Vector3D Unit vector of new coordinate system vZ SMC_Vector3D Unit vector of new coordinate system vTranslation SMC_Vector3D Translation vector for origin = origin of new coordinate system in old coordinates Output piOut SMC_PosInfo Point in new coordinates.
SMC_TeachCoordinateSystem (FB) ¶ FUNCTION_BLOCK SMC_TeachCoordinateSystem This function block will help the user in calculating the vectors of a new coordinate system to be taught. As input data the origin of the new coordinate system and an arbitrary point each of the x- and y- axis are entered. The outputs of the module are the translation vector and the unit vectors of the new coordinate system. Additionally the quality of the input parameters is evaluated (angle between x- and y-axis should be 90°). For detailed information of transformation modules see the overview on kinematic transformations in the CNC online help. InOut: Scope Name Type Comment Input vOrigin SMC_Vector3D Origin of the new coordinate system vPointOnX SMC_Vector3D Position of point on the x-axis vPointOnY SMC_Vector3D Position of point on the y-axis Output vX SMC_Vector3d x-Coordinate of unit vector of new coordinate system vY SMC_Vector3d y-Coordinate of unit vector of new coordinate system vZ SMC_Vector3d z-Coordinate of unit vector of new coordinate system vTranslation SMC_Vector3d Translation vector for origin = origin of new coordinate system in old coordinates fQuality LREAL Quality of input data ranging from 0 ( vX , vY invalid) to 1( vX , vY orthogonal)
SMC_UnitVectorToRPY (FB) ¶ FUNCTION_BLOCK SMC_UnitVectorToRPY This function block will calculate the RPY-angle (referring to the old coordinate system) from the unit vectors of the new coordinate system. For detailed information of transformation modules see the overview on kinematic transformations in the CNC online help. InOut: Scope Name Type Comment Input vX SMC_Vector3d x-coordinate of unit vector of new coordinate system (in respect of old coordinate system) vY SMC_Vector3d y-coordinate of unit vector of new coordinate system (in respect of old coordinate system) vZ SMC_Vector3d z-coordinate of unit vector of new coordinate system (in respect of old coordinate system) Output dA LREAL Roll angle in radian measure dB LREAL Pitch angle in radian measure dC LREAL Yaw angle in radian measure bError BOOL Signals, that an error has occurred within the function block nError WORD Error description: 1: No error ( bError = FALSE ) 2: Vectors do not have length 1 3: Vectors are not orthogonal 4: No right hand system
Direct Axis Control ¶ SMC_ControlAxisByPos (FunctionBlock) SMC_ControlAxisByPosVel (FunctionBlock) SMC_ControlAxisByVel (FunctionBlock)
ReadNCFile2 ¶ SMC_IGSentenceModifier (Interface) Call (Method) Start (Method) SMC_INCLookup (Interface) LookUp (Method) SMC_ITokenModifier (Interface) Call (Method) Start (Method) SMC_NCLookupFile (FunctionBlock) LookUp (Method) SMC_NCNavigator (FunctionBlock) SMC_NC_FindProgramFile (Function) SMC_NC_PrependDefaults (FunctionBlock) SMC_ReadNCFile2 (FunctionBlock) SetDelimiters (Method) SMC_ReadNCFromStream (FunctionBlock) SetDelimiters (Method)