Class HeidenhainParameterTable
- Namespace
- Hi.NcParsers.Dependencys.Heidenhain
- Assembly
- HiMech.dll
Heidenhain TNC/iTNC machine parameter table. Stores machine parameters (MP numbers) as system and per-axis values, under keys numbered after the TNC's MP numbering; the keys known not to be the TNC's number for the value they hold are marked by IsStorageKeyOnly(int).
The table groups its keys as MP100–MP199 for the general machine configuration and MP400–MP499 for per-axis values.
public class HeidenhainParameterTable : ControllerParameterTableBase, IHomeMcConfig, IMachineAxisConfig, IRapidFeedrateConfig, IStrokeLimitConfig, ISpindleControlConfig, IMCodeDeclarationConfig, IToolChangeTriggerConfig, IRotaryHalfTurnTieConfig, INcDependency, IMakeXmlSource
- Inheritance
-
HeidenhainParameterTable
- Implements
- Inherited Members
- Extension Methods
Constructors
HeidenhainParameterTable()
Initializes a new instance with empty parameter tables.
public HeidenhainParameterTable()
HeidenhainParameterTable(XElement)
Initializes a new instance by deserializing from src.
public HeidenhainParameterTable(XElement src)
Parameters
srcXElementXML element produced by MakeXmlSource(string, string, bool).
Fields
MpAxisType
Storage key MP400 of the axis type per axis (the AxisType ordinal: 0 linear / 1 rotary / 2 spindle): HiNC's own key, not a TNC machine parameter (a TNC 426/430 has no MP400; there an axis is rotary through its letter in the axis designation MP100). See IsStorageKeyOnly(int).
public const int MpAxisType = 400
Field Value
MpMaxSpindleSpeed
Storage key MP100 of the maximum spindle speed (RPM): HiNC's own key, not the TNC's machine parameter number (on a TNC 426/430, MP100 designates the axes, and the maximum spindle speeds are MP3515.x). See IsStorageKeyOnly(int).
public const int MpMaxSpindleSpeed = 100
Field Value
MpRapidRate
MP1010: Rapid traverse rate per axis (mm/min or deg/min).
public const int MpRapidRate = 1010
Field Value
MpReferencePosition
Storage key MP410 of the reference point position per axis: HiNC's own key, not the TNC's machine parameter number (on a TNC 426/430, MP410 assigns the axis keys IV and V). See IsStorageKeyOnly(int).
public const int MpReferencePosition = 410
Field Value
MpStrokeLimitNeg
Storage key MP430 of the negative stroke limit per axis (mm or deg): HiNC's own key, not the TNC's machine parameter number for that limit (a TNC 426/430 keeps its negative software limit switches at MP920.x, and its MP430 is the Hirth increment). See IsStorageKeyOnly(int).
public const int MpStrokeLimitNeg = 430
Field Value
MpStrokeLimitPos
Storage key MP420 of the positive stroke limit per axis (mm or deg): HiNC's own key, not the TNC's machine parameter number for that limit (a TNC 426/430 keeps its positive software limit switches at MP910.x, and its MP420 turns the Hirth coupling on or off). See IsStorageKeyOnly(int).
public const int MpStrokeLimitPos = 420
Field Value
MpToolAxisDirection
Storage key MP101 of the tool axis direction (0 Z / 1 Y / 2 X): HiNC's own key, not a TNC machine parameter (a TNC 426/430 has no MP101; its tool axis is the one a TOOL CALL block names). See IsStorageKeyOnly(int).
public const int MpToolAxisDirection = 101
Field Value
Properties
AxisMp1010
MP1010: Rapid traverse rate per axis (mm/min or deg/min). See IRapidFeedrateConfig.
public Dictionary<string, double> AxisMp1010 { get; set; }
Property Value
AxisMp400
Axis type per axis, as the AxisType ordinal, under storage key MP400 (MpAxisType) — not a TNC machine parameter, see IsStorageKeyOnly(int). See AxisNames.
public Dictionary<string, int> AxisMp400 { get; set; }
Property Value
AxisMp410
Reference point position per axis (mm or deg), under storage key MP410 (MpReferencePosition) — not the TNC's machine parameter number for it, see IsStorageKeyOnly(int). See IHomeMcConfig.
public Dictionary<string, double> AxisMp410 { get; set; }
Property Value
AxisTypeParamId
Parameter/MD/MP number for axis type (linear/rotary/spindle).
protected override int AxisTypeParamId { get; }
Property Value
Default3Axis
Default 3-axis Heidenhain milling machine.
public static HeidenhainParameterTable Default3Axis { get; }
Property Value
IdAttributeName
XML attribute name for the parameter ID (“ParamId”, “MdId”, “MpId”).
protected override string IdAttributeName { get; }
Property Value
MaxSpindleSpeed_rpm
Maximum spindle speed in RPM. Delegates to Mp100.
public double MaxSpindleSpeed_rpm { get; set; }
Property Value
Mp100
Maximum spindle speed (RPM), under storage key MP100 (MpMaxSpindleSpeed) — not the TNC's machine parameter number for it, see IsStorageKeyOnly(int). See MaxSpindleSpeed_rpm.
public double Mp100 { get; set; }
Property Value
Mp101
Tool axis direction (0=Z, 1=Y, 2=X), under storage key MP101 (MpToolAxisDirection) — not a TNC machine parameter, see IsStorageKeyOnly(int). See ToolAxisDirection.
public int Mp101 { get; set; }
Property Value
RapidRateParamId
Parameter/MD/MP number for rapid traverse rate per axis. Null if not defined for this controller brand.
protected override int? RapidRateParamId { get; }
Property Value
- int?
ReferencePositionParamId
Parameter/MD/MP number for reference position (G28 home).
protected override int ReferencePositionParamId { get; }
Property Value
StrokeLimitNegParamId
Parameter/MD/MP number for negative stroke limit per axis; IsStorageKeyOnly(int) marks it as a storage key rather than the controller's own number. Null if not defined for this controller brand.
protected override int? StrokeLimitNegParamId { get; }
Property Value
- int?
StrokeLimitPosParamId
Parameter/MD/MP number for positive stroke limit per axis; IsStorageKeyOnly(int) marks it as a storage key rather than the controller's own number. Null if not defined for this controller brand.
protected override int? StrokeLimitPosParamId { get; }
Property Value
- int?
ToolAxisDirection
Tool axis direction (0=Z, 1=Y, 2=X). Delegates to Mp101.
public int ToolAxisDirection { get; set; }
Property Value
XName
XML element name used to register this dependency with XFactory.
public static string XName { get; }
Property Value
Methods
DeepClone()
Returns an independent deep copy of this table (all three parameter dictionaries cloned). Used by HeidenhainParameterTableProxy to clone its fixed machine-config seed into a host that has no table yet.
public HeidenhainParameterTable DeepClone()
Returns
DescribeAxisParam(int)
Per-axis double counterpart of DescribeSystemParam(int). Covers the role ids the base class consumes (reference position, rapid rate, stroke limits); brand subclasses may override for their own vocabulary or extra numbers.
public override string DescribeAxisParam(int paramId)
Parameters
paramIdintBrand-specific parameter/MD/MP number.
Returns
DescribeSystemParam(int)
Short usage label for a well-known system parameter id, or null when the id has no modeled meaning (a raw pass-through row). Brand subclasses extend this with their own well-known numbers; the native parameter UI shows the label next to the raw id so an operator can tell the modeled parameters from free extras.
public override string DescribeSystemParam(int paramId)
Parameters
paramIdintBrand-specific parameter/MD/MP number.
Returns
HalfTurnTie(string)
A TNC turns a modulo rotary axis towards the side the programmed
word lies on when both ways round are a half turn: “If both
equivalent positions are equidistant (i.e., 180° away), the control
selects the direction of motion according to the programmed value”
— axis at 180°, L C+0 or L C-360 moves to 0,
L C+360 moves to 360 (TNC 640 User's Manual for Setup,
Testing and Running NC Programs 01/2021, 1261174-22, p.455; TNC7
User's Manual for Programming and Testing 09/2024, 1358773-23,
p.549 “according to the programmed algebraic sign”). The
M126 sections name no default for a tie and point at
pre-positioning or the PLANE tilting solution instead (892909-2C
p.440; 1358773-23 p.575), so an angle no word programmed takes the
engine default. A control rule with no machine parameter behind
it: a constant of the table, not a row (shortestDistance,
no. 300401, only switches the shortest path on without M126).
public RotaryHalfTurnTie HalfTurnTie(string axisName)
Parameters
axisNamestring
Returns
IsStorageKeyOnly(int)
Whether the modeled id paramId is only a storage key of this
table: the number the table keeps its value under is known not to be the
controller's own parameter number for that value, so a value read off a real
control goes into such a row by its meaning, and in the unit the row's caption
names, never by matching the number. False does not make an id the controller's
number: only the ids known to differ are marked. The base class marks the positive and the negative stroke-limit ids;
each brand table adds the other keys it knows to differ.
public override bool IsStorageKeyOnly(int paramId)
Parameters
paramIdintBrand-specific parameter/MD/MP number, as the row that DescribeSystemParam(int), DescribeAxisParam(int) or DescribeIntAxisParam(int) describes; a number the table does not model in a section is a free extra there, whatever this answers.
Returns
- bool
True for a storage key known not to be the controller's number; false for every other id.
Remarks
Beyond the stroke-limit pair, marks the axis-type key MP400, the reference-position key MP410, the maximum-spindle-speed key MP100 and the tool-axis key MP101; MP1010, the rapid traverse, is the TNC's own number.
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public override 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.
Reg(XFactory)
Registers this type's deserializer with the given XFactory
(or Default when factory is
null). Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory