Forming the tool path in machine axes
INCT_CLData - a CAM system interface that implements the commands of forming the tool path in machine axes.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| SetSystemUnits | The method sets the project units. Input parameter: Units (TNCSystemMeasure): smMetrics - metric; | To interpret commands like G20, G21 in ISO code. |
| SetFeedrateUnits | The method sets the feed units. Input parameter: Units (TNCFeedrateMeasure): fmMMPerMinute - mm per minute; | To interpret commands like G700, G710 for the Sinumerik controller. |
| GetSystemUnits | The function returns the project units (TNCSystemMeasure). | |
| GetFeedrateUnits | The function returns the current feed units (TNCFeedrateMeasure). | |
| AddOrigin | The method adds to the tool path a command that selects a coordinate system by its number. Input parameter: WCSNumber (real number) - coordinate system number. | To interpret commands like G54-G57 in ISO code. |
| AddOriginByShift | The method adds to the tool path a command that shifts the coordinate system by the specified value. Input parameter: Shift (TNC3DPoint) - shift along the axes (X, Y, Z). | To interpret commands like G92 in ISO code. |
| OutStandardFeed | The method adds to the tool path a command that changes the feed to a standard one. Input parameter: Feed (TNCFeedType) - feed type: ffWorking - working; The feed value of each type is set on the 'Feeds/Speeds' tab of the operation in the CAM system. | To interpret commands like G00 (Rapid) / G01 (Working) in ISO code. |
| OutFeed | The method adds to the tool path a feed change command with the specified type and value. Input parameters: Feed (TNCFeedType) - feed type (see OutStandardFeed); Value (real number) - feed value; MPM (boolean) - feed units flag: True - mm/min, False - mm/rev. | To interpret commands like F in ISO code. |
| SetCurrentPlane | The method adds to the tool path a command that changes the current plane to the specified one. Input parameter: Plane (TNCPlaneType) - plane type: ptXY - XY plane; | To interpret commands like G17-G19 in ISO code. |
| GetActiveSpindle | The function returns the number of the active spindle, numbering starts from 1. | |
| SetActiveSpindle | The method makes the spindle with the specified number active. Input parameter: Number (integer) - spindle number, numbering starts from 1. | To interpret commands like SETMS for the Sinumerik controller. |
| AddSpindleSpeedOnRPM | The method adds to the tool path a command that turns on the active spindle with the specified speed in revolutions per minute. If the spindle is already on, its speed is changed to the specified one. Input parameters: RPM (real number) - spindle speed in revolutions per minute; Range (integer) - spindle speed range number; Direction (boolean) - rotation direction (True - clockwise CW, False - counterclockwise CCW). | To interpret commands like S in ISO code. |
| AddSpindleSpeedOnCSS | The method adds to the tool path a command that turns on the active spindle with constant cutting speed. If the spindle is already on, its mode and speed are changed to the specified ones. Input parameters: CSS (real number) - constant cutting speed; MaxRPM (real number) - maximum spindle speed; Range (integer) - spindle speed range number; Direction (boolean) - rotation direction (True - clockwise CW, False - counterclockwise CCW). | To interpret commands like G96 for the Sinumerik controller. |
| AddSpindleOff | The method adds to the tool path a command that turns off the active spindle. No input or output parameters. | To interpret commands like M05 in ISO code. |
| AddSpindleOrient | The method adds to the tool path an oriented stop command of the active spindle. Input parameter: OrientationAngle (real number) - spindle rotation angle. | |
| AddStop | The method adds to the tool path a command that interrupts the NC program execution. When the stop block is reached, the NC program execution is interrupted. No input or output parameters. | To interpret commands like M00 in ISO code. |
| AddOpStop | The method adds to the tool path an optional stop command of the NC program. When the optional stop block is reached, the program execution is interrupted only if the corresponding mode is turned on in the CNC controller. If this mode is off, the program execution is not interrupted. No input or output parameters. | To interpret commands like M01 in ISO code. |
| AddCoolant | The method adds to the tool path a command that turns the machine coolant systems on or off. Input parameters: OnOff (boolean) - True - on, False - off; PipeNumber (integer) - number of the coolant pipe (1 - flood, 2 - mist, 3 - through the tool). | To interpret commands like M08/M09 in ISO code. |
| AddDelay | The method adds to the tool path a command that pauses the program execution for the specified time. Input parameter: Value (real number) - dwell time in seconds. | To interpret commands like G04 in ISO code. |
| LoadTool | The method changes the current tool number to the specified one. Input parameter: ToolID (integer) - tool number. | To interpret commands like T01 in ISO code. |
| AddLengthCompensation | The method adds to the tool path a tool length compensation command with the specified parameters. Input parameters: Mode (TNCLengthCompensationMode) - mode: lcOff - turn off the tool length compensation; lcOn - turn on the positive tool length compensation; lcOnNegative - turn on the negative tool length compensation. | To interpret commands like G43, G44, G49, H in ISO code. |
| AddLengthCompensationValue | The method adds to the tool path a tool length compensation command with the specified parameters. Input parameters: Mode, OffsetNumber (see AddLengthCompensation); Value (real number) - tool length offset value. Attention! In the current version the function works like AddLengthCompensation, without the possibility to set the value. | |
| AddLengthCompensationWithSpecifiedAxis | The method adds to the tool path a tool length compensation command with the specified parameters. Input parameters: Mode (see AddLengthCompensation); SpecifiedAxis (integer) - number of the axis along which the length compensation is made; OffsetNumber (see AddLengthCompensation). Attention! In the current version the function works like AddLengthCompensation, without the possibility to select the axis. | To interpret commands like G43 (together with G17-G19) in ISO code. |
| AddRadiusCompensation | The method adds to the tool path a tool radius compensation command with the specified parameters. Input parameters: Mode (TNCRadiusCompensationMode) - mode: rcOff - turn off the tool radius compensation; rcLeft - turn on the tool radius compensation on the left; rcRight - turn on the tool radius compensation on the right. | To interpret commands like G41, G42, D in ISO code. |
| AddRadiusCompensationValue | The method adds to the tool path a tool radius compensation command with the specified parameters. Input parameters: Mode, OffsetNumber (see AddRadiusCompensation); Value, Value2 (real number) - tool radius offset values. Attention! In the current version the function works like AddRadiusCompensation, without the possibility to set the value. | |
| OpenMultiMotion | The method starts the input of multi-axis movements of the controlled machine coordinates with the specified type. Input parameter: GotoMode (TNCGotoMode) - movement type: gtmTooltip - movement relative to the current workpiece coordinate system; the base axes are interpolated with control of the path straightness at each intermediate point; | To interpret commands like G00/G01 X Y Z A B C in ISO code (gtmTooltip). To interpret commands like G53 in ISO code, SUPA in Sinumerik, M91 in Heidenhain (gtmPhysic). |
| AddMotion | The method adds a movement along the specified axis to the specified coordinate. Input parameters: AxisIndex (integer) - index of the machine axis (controlled or physical); Value (real number) - coordinate value. Controlled machine axes can be linear and rotary axes, as well as axes specific to a particular machine (tool magazine, turret, chuck, etc.). | |
| CloseMultiMotion | The method completes the input of movements and adds to the tool path the multi-axis movement command formed from the movements added by AddMotion since the start of the input by OpenMultiMotion. | |
| AddCircle | The method adds to the tool path a command of tool movement along a circular arc with the specified parameters. Input parameters: P (TNC3DPoint) - arc end point (X, Y, Z); Pc (TNC3DPoint) - arc center (X, Y, Z); R (real number) - arc radius (greater than zero for counterclockwise rotation, less than zero for clockwise rotation); Plane (TNCPlaneType, see SetCurrentPlane) - arc plane; CanBeFull (boolean) - the arc can be a full circle. The axes linked to the X, Y, Z parameters of the points P, Pc are determined automatically after the tool change command (LoadTool) or after setting the active spindle (SetActiveSpindle). The indexes of the axes currently linked to the X, Y, Z parameters can be obtained with the GetXYZindex function. | To interpret commands like G02/G03 X Y Z I J K R in ISO code. |
| OpenTooltipMotion | The method starts the input of multi-axis movements with the specified type. Input parameter: Mode (TNCTooltipMode) - movement type: tmLinear - linear tool movement to the specified point; | To interpret linear and arc movements. For linear movements:
For arc movements:
For movements of all axes:
|
| SetTooltipPosition | The method sets the position of the point defined in OpenTooltipMotion in the Cartesian coordinate system relative to the part zero. Input parameter: P (TNC3DPoint) - coordinates of the point. | |
| SetTooltipAttitude | The method sets the angular movements around the X, Y, Z axes in the Cartesian coordinate system relative to the part zero. Input parameters: Ang1, Ang2, Ang3 (real number) - values of the angular movements; Convention (TNCEulerAnglesConvention) - order of the angular movements: eacXYZ - X, Y, Z RotationsAroundMovableAxes (boolean) - rotation around the moving axes. True - with rotation, False - without rotation. AnglesInDegrees (boolean) - the angular movements are set in degrees. True - in degrees, False - in radians. | |
| SetTooltipAttitude2 | The method sets the tool orientation as a quaternion in the Cartesian coordinate system relative to the part zero. Input parameters: qx, qy, qz, qw (real number) - quaternion components. | |
| SetTooltipFlip | The method sets the position of the (robot) joints. Input parameters: FlipType (TNCFlipType) - joint type: ftFlipA1 - A1; Value (boolean) - True - flipped position, False - normal position. | |
| AddTooltipMotion | The method adds a movement along the specified additional axis to the specified coordinate. Input parameters: AxisIndex (integer) - index of the additional machine axis; Value (real number) - coordinate value. | |
| CloseTooltipMotion | The method completes the input of movements and adds to the tool path the multi-axis movement command formed from the movements added by the *Tooltip* commands since the start of the input by OpenTooltipMotion. | |
| GetAxisValue | The function returns the coordinate of the current tool position for the specified axis (real number). Input parameter: Index (integer) - axis index. | Used to get the current tool position, for example, to set the hole center when using CreateDrillingCycleFormer. |
| WasAxisMovement | The function returns the flag of whether the first movement along the specified axis has been made (boolean). True - the first movement has already been made, the current tool position can be obtained with GetAxisValue. False - no movements along the specified axis have been made yet. Input parameter: Index (integer) - axis index. | See GetAxisValue. |
| AddSinglePassThread | The method adds to the tool path a command that turns on the mode of continuous thread cutting with constant pitch with a turning tool by the specified parameters. Input parameters: Orient (TNCThreadOrientation) - thread orientation; LeadType (TNCThreadLeadType) - way of setting the thread pitch; Step (real number) - thread pitch; StartAngle (real number) - initial angular position of the spindle in degrees (used for multi-start threads). TNCThreadLeadType: ltDistance - by distance; TNCThreadOrientation: toOuter - outer; | To interpret commands like G33 in ISO code. |
| CreateLinearMotionFormer | The function returns the interface of the linear movement generator (INCT_LinearMotionFormer). Using the generator in the interpreter simplifies forming a linear tool path. Working with the generator is described in the article Linear movements. No input parameters. | To interpret commands like G00/G01 X Y Z A B C in ISO code. |
| CreateCircularMotionFormer | The function returns the interface of the arc movement generator (INCT_CircularMotionFormer). Using the generator in the interpreter simplifies forming a tool path along an arc. Working with the generator is described in the article Circular movements. No input parameters. | To interpret commands like G02/G03 X Y Z I J K R in ISO code. |
| CreateDrillingCycleFormer | Depending on the specified parameter, the function returns the interface of the generator of one of the drilling cycles. Working with the generators is described in the articles Drilling cycle, Drilling cycle with shift, Drilling cycle with chip breaking. Input parameter: CycleType (TNCDrillingCycleType) - cycle type. dctSimple - simple drilling cycle; the returned generator supports only one interface: INCT_DrillingCycleFormer. | To interpret commands like G73, G74, G76, G80-89 for the Fanuc controller. |
| CreateLatheCycleFormer | Depending on the specified parameter, the function returns the interface of the generator of one of the turning cycles. Working with the generators is described in the articles Turning grooving cycle, Turning threading cycle, Turning stock removal cycle. Input parameter: CycleType (TNCLatheCycleType) - cycle type. lctGrooving - turning grooving cycle; the returned generator supports one interface: INCT_LatheGroovingCycleFormer. | To interpret commands like CYCLE93, CYCLE95, CYCLE97 for the Sinumerik controller. |
| OutPolarInterpolation | The method turns the polar interpolation on or off. Input parameter: Enable (boolean) - polar interpolation flag. True - the interpolation is on, False - the interpolation is off. | To interpret commands like G132/G133 of the Okuma turning controller. |
| OutCylindricalInterpolation | The method turns the cylindrical interpolation with the specified radius on or off. Input parameters: Enable (boolean) - cylindrical interpolation flag. True - the interpolation is on, False - the interpolation is off. Radius (real number) - radius. | To interpret commands like G119 of the Okuma turning controller. |
| AddOriginByShiftAndRotate | The method turns on the shift and rotation of the coordinate system by the specified parameters. Input parameters: Shift (TNC3DPoint) - shift along the axes (X, Y, Z); Ang1, Ang2, Ang3 (real number) - values of the angular movements; Convention (TNCEulerAnglesConvention) - order of the angular movements, see SetTooltipAttitude; RotationsAroundMovableAxes (boolean) - rotation around the moving axes. True - with rotation, False - without rotation; AnglesInDegrees (boolean) - the angular movements are set in degrees. True - in degrees, False - in radians. | To interpret commands like G68.2, G53.1 of the Fanuc controller. |
| ResetOrigin | The method turns off the shift and rotation of the coordinate system set in AddOriginByShiftAndRotate. | |
| SetRTCPMode | The method adds to the tool path a command that turns the RTCP mode (five-axis interpolation with tool center point control) on or off. Input parameter: Enable (boolean) - True - the mode is on, False - the mode is off. | To interpret commands like G43.4/G49 for the Fanuc controller, TRAORI/TRAFOOF for the Sinumerik controller, M128/M129 for the Heidenhain controller. |
INCT_AddOriginByShiftAndRotate - a CAM system interface that turns on the shift and rotation of the coordinate system with a choice of the rotary axes solution (the FlipMode parameter).
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| AddOriginByShiftAndRotate | The method turns on the shift and rotation of the coordinate system by the specified parameters. Input parameters: Shift (TNC3DPoint) - shift along the axes (X, Y, Z); Ang1, Ang2, Ang3 (real number) - values of the angular movements; Convention (TNCEulerAnglesConvention) - order of the angular movements, see SetTooltipAttitude; RotationsAroundMovableAxes (boolean) - rotation around the moving axes. True - with rotation, False - without rotation; AnglesInDegrees (boolean) - the angular movements are set in degrees. True - in degrees, False - in radians; PositioningMode (TNCSPositioningMode) - type of positioning the machine axes by the local coordinate system: cspmStay - the local coordinate system does not move the machine axes; cspmTurn - the local coordinate system positions only the rotary machine axes; cspmMove - the local coordinate system positions all machine axes so that the position of the tool tip relative to the part does not change; FlipMode (TNCAddOriginFlipMode) - solution for the tool position relative to the workpiece if the machine can reach the same position in several ways: ofmNearest - nearest; ofmDirect - direct; ofmAlternate - alternative. |
To interpret commands like G68.2, G53.1 of the Fanuc controller. |
INCT_CLData2 - a CAM system interface that implements the commands of forming the tool path in machine axes.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| CreateMillingCycleFormer | The function returns the interface of the milling cycle generator. Working with the generators is described in the article Thread milling cycle. Input parameter: CycleType (TNCMillingCycleType) - cycle type. mctThreadMilling - thread milling; the returned generator supports the interface INCT_ThreadMillingCycleFormer. |
To interpret commands like CYCLE90 for the Sinumerik controller. |
INCT_CLData_CutTo5d - a CAM system interface that implements the commands of tool movement by normal vectors.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| CutTo5d | Used for movements by normal vectors. Input parameters: P (TNC3DPoint) - coordinates (X, Y, Z), real numbers; N (TNC3DPoint) - normal vector (components from -1 to 1), real numbers. |
To interpret commands like TRAORI for the Sinumerik controller with the normal vectors A3 B3 C3. |
INCT_CLData_AutoAxesBrakes - a CAM system interface that turns the automatic output of the axis brakes on or off.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| Get_AutoAxesBrakes | Gets the state of the automatic output of the axis brakes. Output parameters: | Used when there is no need to output to CLData the information about turning the axis brakes on or off. |
| Set_AutoAxesBrakes | Turns the automatic output of the axis brakes on or off. Input parameter: |
INCT_CLData_Comment - a CAM system interface that allows adding custom comments to CLData.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| AddComment | The method adds a comment line to CLData. Input parameter: Value (string) - comment text. |
Adding explanations to individual commands or groups of commands. Adding service information for process engineers or machine operators. |
The interfaces described below are requested from the INCT_CLData object. Check the result of the request: in earlier versions of the CAM system and in some of its operating modes the object may not support the interface.
INCT_CLData_BreakCommand - a CAM system interface that implements the command of turning the machine axis brakes on or off.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| Open | The method starts the input of the axis brake command. No input or output parameters. | To interpret axis clamp and unclamp commands, for example M10/M11. Call order: Open, then SetBreak for each axis, then Close. Usually used together with turning off the automatic output of the axis brakes (Set_AutoAxesBrakes of the INCT_CLData_AutoAxesBrakes interface). |
| SetBreak | The method sets the brake state of an axis in the command. Input parameters: AxisIndex (integer) - machine axis index; Value (boolean) - True - the brake is on, False - the brake is off. | |
| Close | The method completes the input and adds to the tool path the axis brake command for the axes set by SetBreak since Open. If no axis has been set, the command is not added. No input or output parameters. |
INCT_CLData_Insert - a CAM system interface that allows adding an INSERT command with arbitrary text to CLData.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| AddInsert | The method adds to the tool path an INSERT command with the specified text. Input parameter: Value (string) - command text. |
To pass to the postprocessor text that the CAM system does not simulate, for example auxiliary machine commands. The postprocessor determines how the text gets into the NC program. |
INCT_CLData_Print - a CAM system interface that allows adding a PPRINT command with arbitrary text to CLData. The interface is supported by the INCT_CLData and INCT_GeomCLData objects.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| AddPrint | The method adds to the tool path a PPRINT command with the specified text. Input parameter: Value (string) - command text. |
To interpret commands like PPRINT in APT. |
INCT_CLData_Wait - a CAM system interface that implements the channel synchronization of a multichannel machine.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| AddWait | The method adds to the tool path a channel synchronization point with the specified number. The channels in which a synchronization point with the same number occurs wait for each other. Input parameter: Id (integer) - synchronization point number. |
To interpret wait commands in multichannel programs, like WAITM for the Sinumerik controller. |
INCT_CLData_LngID - a CAM system interface that returns the CAM system interface language.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| GetLngID | The function returns the code of the CAM system interface language (integer) - the Windows language code, for example 1049 - Russian, 1033 - English. No input parameters. |
To output interpreter messages in the CAM system interface language. |
INCT_AddOriginByPhysicAxes - a CAM system interface that sets a coordinate system by the position of the machine axes.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| AddOriginByPhysicAxes | The method adds to the tool path a command that shifts and rotates the coordinate system defined by the position of the machine axes. In the calculation, the axes with the indexes AxisIndex1-AxisIndex3 are set to the values Ang1-Ang3: the orientation of the new coordinate system matches the tool orientation in this machine position, and its origin is shifted by Shift relative to the current part coordinate system. The movement of the machine axes is determined by the PositioningMode parameter. Input parameters: Shift (TNC3DPoint) - shift of the coordinate system origin along the axes (X, Y, Z); AxisIndex1, AxisIndex2, AxisIndex3 (integer) - machine axis indexes, -1 - the axis is not set; Ang1, Ang2, Ang3 (real number) - values of the axes AxisIndex1-AxisIndex3 in the same units as the coordinate value in AddMotion; PositioningMode (TNCSPositioningMode) - type of positioning the machine axes by the local coordinate system, see INCT_AddOriginByShiftAndRotate. If no axis is set, the command is not added. |
To interpret commands like PLANE AXIAL for the Heidenhain controller. |
INCT_OriginSolver - a CAM system interface that allows calculating in advance the machine axis positions for a coordinate system rotation without changing the machine state and without adding commands to the tool path.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| CalculateOriginSolutions | The method calculates the machine axis positions for the coordinate system defined by a shift and a rotation. The solutions are calculated at once for three TNCAddOriginFlipMode modes: ofmDirect - direct, ofmAlternate - alternative, ofmNearest - the nearest of the possible ones. The results are returned by the GetOriginSolutionState and GetOriginSolutionAxisValue functions. Input parameters: Shift, Ang1, Ang2, Ang3, Convention, RotationsAroundMovableAxes, AnglesInDegrees - as in the AddOriginByShiftAndRotate method. | To interpret commands like PLANE SPATIAL ... SEQ+/SEQ- for the Heidenhain controller: allows choosing a solution by the sign of the main rotary axis in advance, checking whether it is reachable, and then passing the selected mode to INCT_AddOriginByShiftAndRotate.AddOriginByShiftAndRotate (the FlipMode parameter). |
| GetOriginSolutionState | The function returns the state of the solution for the specified mode (TNCOriginSolutionState): ossNotCalculated - the solution has not been calculated; Input parameter: FlipMode (TNCAddOriginFlipMode) - mode. | |
| GetOriginSolutionAxisValue | The function returns the value of a machine axis in the solution for the specified mode (real number). If the axis does not participate in the solution, 0 is returned. Input parameters: FlipMode (TNCAddOriginFlipMode) - mode; AxisIndex (integer) - machine axis index. | |
| GetFirstRotaryAxisAfterCurrentTool | The function returns the index of the rotary axis nearest to the current tool in the machine kinematic chain (integer). Spindles are not taken into account. If there is no such axis, -1 is returned. No input parameters. | |
| GetLastRotaryAxisFromCurrentWorkpiece | The function returns the index of the rotary axis on the side of the current workpiece that is farthest from it in the machine kinematic chain (integer). Spindles are not taken into account. If there is no such axis, -1 is returned. No input parameters. |