Class HeidenhainRtcpSyntax
- Namespace
- Hi.NcParsers.LogicSyntaxs.Heidenhain
- Assembly
- HiMech.dll
Heidenhain RTCP (M128/M129, FUNCTION TCPM/FUNCTION RESET TCPM): the
Heidenhain sibling of G43p4RtcpSyntax and
SiemensTraoriSyntax. While RTCP is active the
IToolHeightCompensationDef section carries the
activating term (M128Term or TcpmTerm)
and the ToolHeightCompensation chain entry becomes a
tool-normal · offset translation at the block endpoint ABC
(MakeToolHeightMat(IMachineKinematics, Vec3d, double)), tagged
KindDynamic when the rotary state
changes across the block — the signal that routes the block to
ClLinear per-step IK.
Tool length ownership stays with the TOOL CALL machinery
(HeidenhainToolOffsetSyntax — table height + DL, which
runs earlier in the bundle): activation adopts the compensation
already resolved on this or the previous block and records the
adopted owner in PriorTermKey;
a TOOL CALL during the modal re-takes the section with the fresh
offset; M129 / FUNCTION RESET TCPM hands the section back to the
recorded owner (default Term —
klartext tool-length compensation survives RTCP deactivation). The
TOOL CALL Delta_mm (DL) rides along so the hand-back restores
it. A deactivation with no active RTCP (the corpus' ubiquitous
program-head M129) is consumed silently. Same-block
contradiction (M128 with M129): the off state wins conservatively
(the P1 rule, kept for continuity).
The M128 feed limit (M128 F6000., or an FQn token the
evaluator could not resolve) is recorded on the section as
FeedLimitKey — recorded, not simulated. FUNCTION TCPM
behavior arguments are recorded by the parsing syntax and warn
Tcpm--ArgsNotSimulated on activation.
Must run after ToolHeightOffsetSyntax /
HeidenhainToolOffsetSyntax and the coordinate-offset
syntaxes (mirroring the Fanuc G43.4 / Siemens TRAORI slot) and
before HeidenhainPivotTransformationSyntax,
whose gate recognizes the RtcpTerms and folds the
kinematic pivot. Silently degrades to a plain UnitZ · offset
translation when IMachineKinematics is absent.
public class HeidenhainRtcpSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
HeidenhainRtcpSyntax
- Implements
- Inherited Members
- Extension Methods
Examples
Activation adopting the TOOL CALL compensation resolved earlier on the same block (feed limit recorded; owner recorded for hand-back): #BeforeBuild:
{
"Parsing": { "M128": { "F": 6000 } },
"ToolHeightCompensation": {
"Offset_mm": 120.5, "Term": "TOOL CALL", "OffsetId": 2, "Delta_mm": 0.5
},
"ProgramToMcTransform": [
{
"Source": "ToolHeightCompensation",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,120.5,1]
}
]
}
#AfterBuild:
{
"ToolHeightCompensation": {
"Offset_mm": 120.5, "Term": "M128", "OffsetId": 2,
"PriorTerm": "TOOL CALL", "Delta_mm": 0.5, "FeedLimit": 6000
},
"ProgramToMcTransform": [
{
"Source": "ToolHeightCompensation",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,120.5,1]
}
]
}
Modal continuation — no word on the block; the snapshot is carried and the entry rebuilt: #Previous:
{
"ToolHeightCompensation": {
"Offset_mm": 120.5, "Term": "M128", "OffsetId": 2,
"PriorTerm": "TOOL CALL", "Delta_mm": 0.5, "FeedLimit": 6000
}
}
#BeforeBuild:
{}
#AfterBuild:
{
"ToolHeightCompensation": {
"Offset_mm": 120.5, "Term": "M128", "OffsetId": 2,
"PriorTerm": "TOOL CALL", "Delta_mm": 0.5, "FeedLimit": 6000
},
"ProgramToMcTransform": [
{
"Source": "ToolHeightCompensation",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,120.5,1]
}
]
}
M129 hand-back — the section returns to the recorded owner and the plain translation entry is rebuilt; TOOL CALL modal re-resolution resumes on following blocks: #Previous:
{
"ToolHeightCompensation": {
"Offset_mm": 120.5, "Term": "M128", "OffsetId": 2,
"PriorTerm": "TOOL CALL", "Delta_mm": 0.5, "FeedLimit": 6000
}
}
#BeforeBuild:
{ "Parsing": { "Flags": ["M129"] } }
#AfterBuild:
{
"ToolHeightCompensation": {
"Offset_mm": 120.5, "Term": "TOOL CALL", "OffsetId": 2, "Delta_mm": 0.5
},
"ProgramToMcTransform": [
{
"Source": "ToolHeightCompensation",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,120.5,1]
}
]
}
Defensive M129 with no active RTCP (every GPE program head) — consumed silently, nothing written: #BeforeBuild:
{ "Parsing": { "Flags": ["M129"] } }
#AfterBuild:
{}
Bare activation with no prior compensation and no kinematics — the section is taken with zero offset and the entry collapses to identity: #BeforeBuild:
{ "Parsing": { "M128": { "Bare": true } } }
#AfterBuild:
{
"ToolHeightCompensation": { "Offset_mm": 0, "Term": "M128", "OffsetId": 0 },
"ProgramToMcTransform": [
{
"Source": "ToolHeightCompensation",
"Kind": "Static",
"Mat4d": [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]
}
]
}
Constructors
HeidenhainRtcpSyntax()
Initializes a new instance with default settings.
public HeidenhainRtcpSyntax()
HeidenhainRtcpSyntax(XElement)
Initializes a new instance by deserializing from the given XML element.
public HeidenhainRtcpSyntax(XElement src)
Parameters
srcXElementSource XML element.
Fields
FeedLimitKey
Section key recording the M128 feed limit (compensating-movement feed cap) — recorded, not simulated.
public const string FeedLimitKey = "FeedLimit"
Field Value
M128Term
Ownership term while the classic M128 RTCP is active.
public const string M128Term = "M128"
Field Value
RtcpTerms
The Heidenhain RTCP terms — the brand vocabulary the pivot gate (HeidenhainPivotTransformationSyntax) recognizes on the ToolHeightCompensation section.
public static readonly string[] RtcpTerms
Field Value
- string[]
TcpmTerm
Ownership term while FUNCTION TCPM RTCP is active.
public const string TcpmTerm = "FUNCTION TCPM"
Field Value
Properties
Name
Syntax kind name (typically the concrete type name).
public string Name { get; }
Property Value
XName
XML element name used to register this syntax with XFactory.
public static string XName { get; }
Property Value
Methods
Build(LazyLinkedListNode<SyntaxPiece>, List<INcDependency>, NcDiagnosticProgress)
Build syntax arrangement into the
syntaxPieceNode in-place.
public void Build(LazyLinkedListNode<SyntaxPiece> syntaxPieceNode, List<INcDependency> ncDependencyList, NcDiagnosticProgress ncDiagnosticProgress)
Parameters
syntaxPieceNodeLazyLinkedListNode<SyntaxPiece>ncDependencyListList<INcDependency>ncDiagnosticProgressNcDiagnosticProgress
IsRtcpTerm(string)
True when term is a Heidenhain RTCP owner term.
public static bool IsRtcpTerm(string term)
Parameters
termstring
Returns
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.
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