Table of Contents

Class SiemensModalCycleSyntax

Namespace
Hi.NcParsers.LogicSyntaxs.Siemens
Assembly
HiMech.dll

Maps Siemens MCALL CYCLE8x(…) modal drilling calls onto the shared canned-cycle machinery — the “setup half” of the Fanuc G66-style modal pattern; the “expansion half” needs no new code because CannedCycleResolveSyntax's previous-block modal lookback already re-triggers the armed cycle at every subsequent block carrying X/Y words, exactly Sinumerik's MCALL semantic.

  • MCALL CYCLE81/82(RTP,RFP,SDIS,DP,DPR[,DTB]) → an armed CannedCycle section (Term G81/G82) with Params.R = RFP + |SDIS|, Params.Z = DP (or RFP − DPR), dwell P = DTB for G82.
  • MCALL CYCLE83(…,FDEP,FDPR,DAM,DTB,DTS,FRF,VARI,…) → G83 (VARI≠0, full retract) or G73 (VARI=0, chip-break) with Q = |RFP − FDEP| or |FDPR|. The FDEP/DAM decreasing peck chain is approximated by that constant first-peck depth.
  • MCALL CYCLE85(…,DTB,FFR,RFF) → G89 (DTB>0, dwell) or G85, feed-in F = FFR; the separate retract feed RFF has no slot in the shared expansion (retract reuses F).
  • bare MCALL → the G80 cancel sentinel (WriteCannedCycleCancel(JsonObject, string)).

The MCALL block itself must NOT execute the cycle (Sinumerik arms only), so no Parsing.G8x section is written here — the armed section rides the ModalCarrySyntax CannedCycle tracked key to the following motion blocks. Return plane: ReturnMode = G98 (previous-block Z); RTP has no slot in the shared expansion — programs that park at RTP before the first trigger get exactly RTP back, the corpus shape. Fail-soft paths (consume + structured warning + no arm): non-literal arguments (R-parameter args — cycle args bypass the P2 evaluator), missing RFP / depth / peck values, and any callee outside the CYCLE8x map (MCALL L123 modal subprogram calls are not simulated). Pipeline placement: before CannedCycleResolveSyntax in the Siemens Logic bundle.

public class SiemensModalCycleSyntax : ISituNcSyntax, INcSyntax, IMakeXmlSource
Inheritance
SiemensModalCycleSyntax
Implements
Inherited Members
Extension Methods

Examples

Arm from the corpus 9-arg CYCLE81 Operate form — R = 327.9137 + 0.5, Z = DP, no immediate execution: #BeforeBuild:

{
  "Parsing": {
    "MCALL": {
      "CycleName": "CYCLE81",
      "Args": ["500.", "327.9137", "0.5", "324.564", "", "", "0", "1", "0"]
    }
  }
}

#AfterBuild:

{
  "CannedCycle": {
    "Term": "G81",
    "ReturnMode": "G98",
    "Params": { "R": 328.4137, "Z": 324.564 }
  }
}

Bare MCALL cancels — the G80 sentinel stops the modal lookback: #BeforeBuild:

{
  "Parsing": { "MCALL": { "Bare": true } }
}

#AfterBuild:

{
  "CannedCycle": { "Term": "G80" }
}

CYCLE83 chip-break variant routes to G73 with the first-peck Q: #BeforeBuild:

{
  "Parsing": {
    "MCALL": {
      "CycleName": "CYCLE83",
      "Args": ["50", "0.4", "2", "-10", "", "", "5", "3", "0", "0", "1", "0"]
    }
  }
}

#AfterBuild:

{
  "CannedCycle": {
    "Term": "G73",
    "ReturnMode": "G98",
    "Params": { "R": 2.4, "Z": -10, "Q": 5 }
  }
}

Constructors

SiemensModalCycleSyntax()

Parameterless instance (no XML state).

public SiemensModalCycleSyntax()

SiemensModalCycleSyntax(XElement)

XML ctor (no child elements; reserved for forward compatibility).

public SiemensModalCycleSyntax(XElement src)

Parameters

src XElement

Root element named XName.

Properties

Name

Syntax kind name (typically the concrete type name).

public string Name { get; }

Property Value

string

XName

XML element name used to register this syntax with XFactory.

public static string XName { get; }

Property Value

string

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

syntaxPieceNode LazyLinkedListNode<SyntaxPiece>
ncDependencyList List<INcDependency>
ncDiagnosticProgress NcDiagnosticProgress

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

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if 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

factory XFactory