Class SiemensFixedPointReturnSyntax
- Namespace
- Hi.NcParsers.LogicSyntaxs.Siemens
- Assembly
- HiMech.dll
Consumes the Siemens G74 (reference-point approach) /
G75 (fixed-point approach) statement captured into
Parsing.G74 / Parsing.G75 by the Siemens preset's
dedicated ParameterizedFlagSyntax
instance, and emits a one-shot machine-coordinate move for the
participating axes.
Siemens semantics honored here: non-modal; only the axes written in the block participate; the numeric axis value is a dummy (conventionally 0) and is discarded; the motion happens in MACHINE coordinates ignoring every active frame; the F word in the block does not change the modal feed (the machine travels at its own rapid). The frame bypass reuses the MachineCoordSelectSyntax mechanism — write MachineCoordinateState directly and back-derive ProgramXyz through the inverse of the composed ProgramToMcTransform — so a G54/G505 offset or programmable frame shifts the recovered program coordinate, never the machine target.
Target position: G74 (reference-point approach) reads the per-axis
machine reference from GetHomePosition(string)
(MD34010 on a Siemens table; 0 when the axis has no configured home).
G75 (fixed-point approach) reads the fixed-point table MD30600
$MA_FIX_POINT_POS via
GetFixPointPosition(string),
falling back per axis to the same reference position when no fixed
point is configured — so machines whose fixed point differs from the
reference retract to the right place. Only fixed point 1 is modeled;
a FP= word in the block emits Coord-FixPoint--003 and
uses fixed point 1. Non-participating linear axes keep the previous
machine position; rotary axes participate only when written and
configured rotary (their target lands in the shared MC section,
wrapped shortest-path later by McAbcCyclicPathSyntax).
Placement: after ReferenceReturnSyntax (the G28 slot) —
behind every coordinate-offset / frame syntax so the composed
transform is complete for the ProgramXyz back-derivation, and before
McXyzSyntax / LinearMotionSyntax (the
stamped MotionEvent makes the motion syntaxes skip the
block; a G0/G1 word on the block is claimed into the modal
MotionState exactly like
MachineCoordSelectSyntax does). Without an
IHomeMcConfig dependency the statement stays in
Parsing and surfaces as unconsumed residue.
public class SiemensFixedPointReturnSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
- Inheritance
-
SiemensFixedPointReturnSyntax
- Implements
- Inherited Members
- Extension Methods
Examples
All cases hardcode a TestDeps.HomeMc with X/Y home at 0 and Z
home at 100, and leave the ProgramToMcTransform chain at
identity so ProgramXyz equals MachineCoordinateState.
The corpus shape N19 G75 Z0 F8000 — only Z participates
(its dummy 0 is discarded), X/Y keep the previous machine position,
the F stays inside the consumed statement (modal feed untouched),
and a rapid one-shot machine move is stamped:
{ "MachineCoordinateState": { "X": 50, "Y": 60, "Z": -20 } }
#BeforeBuild:
{ "Parsing": { "G75": { "Z": 0, "F": 8000 } } }
#AfterBuild:
{
"MachineCoordinateState": { "X": 50, "Y": 60, "Z": 100 },
"ProgramXyz": { "X": 50, "Y": 60, "Z": 100 },
"MotionEvent": { "Form": "McLinear", "IsRapid": true, "Term": "G75" }
}
G74 X0 Z0 — reference-point approach for X and Z; Y keeps the
previous machine position:
#Previous:
{ "MachineCoordinateState": { "X": 50, "Y": 60, "Z": -20 } }
#BeforeBuild:
{ "Parsing": { "G74": { "X": 0, "Z": 0 } } }
#AfterBuild:
{
"MachineCoordinateState": { "X": 0, "Y": 60, "Z": 100 },
"ProgramXyz": { "X": 0, "Y": 60, "Z": 100 },
"MotionEvent": { "Form": "McLinear", "IsRapid": true, "Term": "G74" }
}
Statement without any axis word — nothing participates, so the
statement is consumed with a validation warning
(Coord-FixPoint--001, diagnostic sink only) and no motion:
#BeforeBuild:
{ "Parsing": { "G75": { "F": 8000 } } }
#AfterBuild:
{}
G75 Z0 with a Siemens machine-data table carrying MD30600
$MA_FIX_POINT_POS Z = 1150 — the fixed point wins over the Z
reference at 100 (840D-SL posts park at such a fixed point before
M06); X/Y keep the previous machine position:
#Previous:
{ "MachineCoordinateState": { "X": 50, "Y": 60, "Z": -20 } }
#BeforeBuild:
{ "Parsing": { "G75": { "Z": 0 } } }
#AfterBuild:
{
"MachineCoordinateState": { "X": 50, "Y": 60, "Z": 1150 },
"ProgramXyz": { "X": 50, "Y": 60, "Z": 1150 },
"MotionEvent": { "Form": "McLinear", "IsRapid": true, "Term": "G75" }
}
G74 Z0 with the same table — G74 is the reference-point
approach and deliberately ignores the fixed-point table; Z travels to
the reference at 100:
#Previous:
{ "MachineCoordinateState": { "X": 50, "Y": 60, "Z": -20 } }
#BeforeBuild:
{ "Parsing": { "G74": { "Z": 0 } } }
#AfterBuild:
{
"MachineCoordinateState": { "X": 50, "Y": 60, "Z": 100 },
"ProgramXyz": { "X": 50, "Y": 60, "Z": 100 },
"MotionEvent": { "Form": "McLinear", "IsRapid": true, "Term": "G74" }
}
Constructors
SiemensFixedPointReturnSyntax()
Initializes a new instance with default settings.
public SiemensFixedPointReturnSyntax()
SiemensFixedPointReturnSyntax(XElement)
Initializes a new instance by deserializing from the given XML element.
public SiemensFixedPointReturnSyntax(XElement src)
Parameters
srcXElementSource XML element.
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