Interface IIndexingPositionConfig
- Namespace
- Hi.NcParsers.Dependencys
- Assembly
- HiMech.dll
Indexing-axis position table: maps 1-based indexing position numbers to
axis coordinates for axes that only take up discrete stations (Hirth
couplings, indexing rotary tables, turret-style workholders). Consumed
by the coded-position coordinate functions (Siemens
CAC()/CIC()/CDC()/CACP()/CACN() —
unwrapped by SiemensAcIcSyntax,
resolved by McAbcSyntax /
IncrementalResolveSyntax via
CodedPositionUtil).
Implemented by SiemensMachineDataTable using the
Siemens machine data (MD30500 $MA_INDEX_AX_ASSIGN_POS_TAB per
axis; global tables MD10910/MD10930; equidistant MD30501–MD30503).
Positions are expressed in the axis' native units (degrees for rotary, mm for linear) in the coordinate frame the axis word itself is written in — machine coordinates for rotary words, program coordinates for linear words. Position numbering is 1-based: number 1 is the first table entry (the Siemens machine-data help and alarm texts count this way; the 0-based value range printed in some programming-manual editions describes the machine-data array index, not the programmable number).
public interface IIndexingPositionConfig : INcDependency, IMakeXmlSource
- Inherited Members
- Extension Methods
Fields
PositionMatchTolerance
Tolerance, in axis units (degrees or mm), within which an axis position is considered exactly on an indexing position by TryFindIndexingAnchor(string, double, out int, out bool). Anchors come from previous exact table writes, so the tolerance only needs to absorb float round-trip drift — real indexing spacings are many orders of magnitude larger.
public const double PositionMatchTolerance = 1E-06
Field Value
Methods
GetIndexingPositionCount(string)
Number of programmable indexing positions: the table length for table-assigned axes, the per-cycle position count for cyclic equidistant axes, MaxValue for unbounded (non-cyclic equidistant) axes, and 0 when the axis is not a usable indexing axis.
int GetIndexingPositionCount(string axisName)
Parameters
axisNamestringAxis name (e.g., “C”).
Returns
IsIndexingAxis(string)
True when the axis is configured as an indexing axis with a usable position table (a non-empty table, or a valid equidistant definition). An axis declared indexing but with an empty/invalid table reports false — the coded-position words then stay unrecognized (loud residue) instead of resolving against garbage.
bool IsIndexingAxis(string axisName)
Parameters
axisNamestringAxis name (e.g., “C”).
Returns
IsIndexingCyclic(string)
True when position-number arithmetic wraps modulo GetIndexingPositionCount(string) — an indexing axis that is also a modular rotary axis (IsModularRotary(string)). Advancing past the last position continues at position 1.
bool IsIndexingCyclic(string axisName)
Parameters
axisNamestringAxis name (e.g., “C”).
Returns
TryFindIndexingAnchor(string, double, out int, out bool)
Locates an axis position relative to the indexing table for
incremental (CIC) resolution: floorNumber
is the number of the nearest indexing position at or below
position (cyclically behind on cyclic axes; 0
when the position lies below the whole table on a non-cyclic axis),
and exactlyOnPosition reports a match within
PositionMatchTolerance. False when the axis is not a
usable indexing axis.
bool TryFindIndexingAnchor(string axisName, double position, out int floorNumber, out bool exactlyOnPosition)
Parameters
axisNamestringAxis name (e.g., “C”).
positiondoubleCurrent axis coordinate (degrees or mm); rotary values may lie outside one revolution and are normalized by the implementation.
floorNumberintNumber of the nearest indexing position at or (cyclically) below the given position.
exactlyOnPositionboolTrue when the position sits on an indexing position within PositionMatchTolerance.
Returns
TryGetIndexingPosition(string, int, out double)
Resolves a 1-based indexing position number to its axis coordinate.
False when the axis is not a usable indexing axis or the number is
outside [1, count].
bool TryGetIndexingPosition(string axisName, int positionNumber, out double position)
Parameters
axisNamestringAxis name (e.g., “C”).
positionNumberint1-based indexing position number.
positiondoubleResolved axis coordinate (degrees or mm).