Class ToolLengthCompensation
Class for tool length compensation. Responsible for setting the length compensation mode, selecting the axis and performing compensation commands.
Inherited Members
Namespace: DotNet.Interpreter.Helper
Assembly: DotNet.Interpreter.Helper.dll
Syntax
public class ToolLengthCompensation
Constructors
ToolLengthCompensation()
Constructor for the ToolLengthCompensation class for tool length compensation.
Declaration
public ToolLengthCompensation()
Properties
IsRTCPModeActive
Returns flag indicating if RTCP (Rotating Tool Center Point) mode is active.
Declaration
public bool IsRTCPModeActive { get; }
Property Value
Type | Description |
---|---|
bool |
OffsetNumber
Tool length offset number in the offset table.
Declaration
public int OffsetNumber { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
Compensate(TNCPlaneType)
Performs length compensation based on the specified plane. If RTCP mode is enabled, calls mode setting through CLD. Otherwise, selects the compensation axis depending on the plane and executes the corresponding command. After execution, resets the update flag, and the activity flag is updated.
Declaration
public void Compensate(TNCPlaneType lastPlane)
Parameters
Type | Name | Description |
---|---|---|
TNCPlaneType | lastPlane | Last used machining plane. |
Initialize(INCT_CLData)
Initializes the tool length compensation object with CLData interface.
Declaration
public void Initialize(INCT_CLData clData)
Parameters
Type | Name | Description |
---|---|---|
INCT_CLData | clData | Interface for interacting with toolpath data. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |
InitializeBlock()
Initializes the compensation state for processing a new CNC program block.
Declaration
public void InitializeBlock()
SetCompensationMode(TNCLengthCompensationMode, bool)
Sets the tool length compensation mode and, optionally, enables RTCP mode. When switching to compensation off mode, compensation with an arbitrary plane is performed.
Declaration
public void SetCompensationMode(TNCLengthCompensationMode newMode, bool isRTCPMode = false)
Parameters
Type | Name | Description |
---|---|---|
TNCLengthCompensationMode | newMode | New length compensation mode. |
bool | isRTCPMode | Flag indicating if RTCP (Rotating Tool Center Point) mode is active (default |
SetSpecifiedAxis(int)
Sets the axis along which the tool length compensation will act, if it has not already been set in the current block.
Declaration
public void SetSpecifiedAxis(int axisValue)
Parameters
Type | Name | Description |
---|---|---|
int | axisValue | Compensation axis (1=X, 2=Y, 3=Z). For this control system, the compensation direction can only be set once per block. |