Class HeidenhainMotionModeSyntax
- Namespace
- Hi.NcParsers.LogicSyntaxs.Heidenhain
- Assembly
- HiMech.dll
Heidenhain-specific: maps the klartext L statement marker
(written by HeidenhainLSyntax) onto the shared ISO
motion-mode vocabulary. An L block carrying the one-shot
FMAX flag becomes a rapid (G00) block; every other L
block is a feed move (G01) driven by the modal feedrate. The injected
G00/G01 flag is consumed downstream exactly like a DIN/ISO block —
by LinearMotionSyntax on ordinary moves and by
MachineCoordSelectSyntax on machine-coordinate (M91)
moves — so no shared syntax needs Heidenhain-specific behavior.
FMAX is one-shot on the real TNC: because every klartext motion is an
L statement and this syntax stamps a mode per statement, the
rapid mode never leaks into the next block — the following L
without FMAX is stamped G01 again. FAUTO (feed from cycle) is
consumed as a feed move. Must be placed at the top of the Logic bundle,
before MachineCoordSelectSyntax and
LinearMotionSyntax.
public class HeidenhainMotionModeSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
HeidenhainMotionModeSyntax
- Implements
- Inherited Members
- Extension Methods
Examples
Feed move — the L marker is consumed and G01 is appended to Flags: #BeforeBuild:
{ "Parsing": { "L": true, "X": 10 } }
#AfterBuild:
{ "Parsing": { "X": 10, "Flags": ["G01"] } }
Rapid move — the one-shot FMAX flag is consumed and G00 is appended: #BeforeBuild:
{ "Parsing": { "Flags": ["FMAX"], "L": true, "X": 10 } }
#AfterBuild:
{ "Parsing": { "Flags": ["G00"], "X": 10 } }
Non-L block — untouched: #BeforeBuild:
{ "Parsing": { "Flags": ["M03"] } }
#AfterBuild:
{ "Parsing": { "Flags": ["M03"] } }
An approach block (the APPR record of
HeidenhainApprDepSyntax) is a feed move onto the contour
like an L block, so it takes the same stamp — G01, or G00 under its
own FMAX — while the record stays for the PostLogic stage that writes
the motion; the one-shot event the stamp produces makes the block
read as the feed motion it is until then (the spindle-direction
fallback judges by it). A CYCL CALL POS block positions the
tool before its cycle fires, at rapid under its own FMAX (TNC7 p.712:
G79 with G00 corresponds to CYCL CALL POS with FMAX, the control moving
to the position at rapid traverse), so it takes the stamp as well; the cycle's
compound motion is on the block by the time the shared linear writer
runs, which then latches the stamp into the modal motion state alone —
the state the Heidenhain approach reads for whether the last
positioning before it was a rapid. A departure block is not stamped:
its principal-axis words stay in the record (a DEP LCT's rotary and
parallel words go to the root like an approach's) and its FMAX in the
flags,
both for the PostLogic departure syntax, which writes the motion and
the modal motion state (G00 under FMAX, else G01) itself when the
departure moves the tool; a departure that moves nothing leaves the
state the block before carried.
#BeforeBuild:
{ "Parsing": { "APPR": { "Form": "LT", "LEN": 15 }, "X": 20, "Y": 20 } }
#AfterBuild:
{ "Parsing": { "APPR": { "Form": "LT", "LEN": 15 }, "X": 20, "Y": 20, "Flags": ["G01"] } }
A positional cycle call under FMAX takes the G00 stamp like an L block, its record untouched: #BeforeBuild:
{ "Parsing": { "CYCL CALL": { "Pos": true, "X": 40, "Y": 10, "Z": 2 }, "Flags": ["FMAX"] } }
#AfterBuild:
{ "Parsing": { "CYCL CALL": { "Pos": true, "X": 40, "Y": 10, "Z": 2 }, "Flags": ["G00"] } }
DIN/ISO numeric L (helix turn count / repeat word captured by the integer tag syntax in the same mixed-dialect list) — only the boolean statement marker written by HeidenhainLSyntax is a klartext L statement; the numeric record is left for CircularMotionSyntax: #BeforeBuild:
{ "Parsing": { "Flags": ["G02"], "L": 3, "I": 5 } }
#AfterBuild:
{ "Parsing": { "Flags": ["G02"], "L": 3, "I": 5 } }
Constructors
HeidenhainMotionModeSyntax()
Initializes a new instance with default settings.
public HeidenhainMotionModeSyntax()
HeidenhainMotionModeSyntax(XElement)
Initializes a new instance by deserializing from the given XML element.
public HeidenhainMotionModeSyntax(XElement src)
Parameters
srcXElementSource XML element.
Fields
FautoFlag
Feed-from-cycle flag; consumed as a feed move.
public const string FautoFlag = "FAUTO"
Field Value
FmaxFlag
One-shot rapid flag on klartext motion statements.
public const string FmaxFlag = "FMAX"
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
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