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"] } }
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