Class FanucToolOffsetVariableLookup
- Namespace
- Hi.NcParsers.Dependencys.Fanuc
- Assembly
- HiMech.dll
Fanuc-side adapter that exposes a wrapped ToolOffsetTable
as an IVariableLookup following Fanuc Memory C tool offset
addressing: #2001+N → effective height of offset N
(geometry − wear).
The underlying ToolOffsetTable stays brand-neutral — Heidenhain / Siemens can use the same storage with different addressing by registering their own adapter alongside the table. Holds a reference to the table rather than owning data so writes through the table show up immediately in lookups via this adapter.
public class FanucToolOffsetVariableLookup : INcDependency, IMakeXmlSource, IVariableLookup
- Inheritance
-
FanucToolOffsetVariableLookup
- Implements
- Inherited Members
- Extension Methods
Constructors
FanucToolOffsetVariableLookup()
public FanucToolOffsetVariableLookup()
FanucToolOffsetVariableLookup(ToolOffsetTable)
Wraps the given table so it can serve Fanuc-style #2001+ reads.
public FanucToolOffsetVariableLookup(ToolOffsetTable table)
Parameters
tableToolOffsetTable
FanucToolOffsetVariableLookup(XElement)
Loads from XML produced by MakeXmlSource(string, string, bool); Table is rebound by the runner after deserialisation.
public FanucToolOffsetVariableLookup(XElement src)
Parameters
srcXElement
Fields
ToolHeightMax
Inclusive upper bound of the Fanuc tool height address range (#2200).
public const int ToolHeightMax = 2200
Field Value
ToolHeightMin
Inclusive lower bound of the Fanuc tool height address range (#2001).
public const int ToolHeightMin = 2001
Field Value
Properties
Table
Underlying brand-neutral tool offset storage.
public ToolOffsetTable Table { get; set; }
Property Value
XName
XML element name for Regs registration.
public static string XName { get; }
Property Value
Methods
Get(string)
Returns the value of the variable identified by key
(e.g. "#124"), or null if vacant or unknown to this lookup.
public double? Get(string key)
Parameters
keystring
Returns
Remarks
Routes #2001-#2200 to
GetToolHeightOffset_mm(int); other
keys return null so the evaluator's lookup chain falls through.
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)
Parameters
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif true, the extended file creation is suppressed.
Returns
- XElement
An XML element representing the object's state
Remarks
For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The baseDirectory is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.