Block Info Panel
The panel at the top of the Execution Page's Step Info column, route /execution, above
the step group bar: the NC block the shared sentence cursor points at, as the simulator executed it
and as a CNC user reads it. It stands outside the step-based panels because a block need not produce
a machining step, and it follows the cursor whichever way the cursor moves — a step picked on a chart
or on the tool path, or a line clicked on a Program Branch file panel. What an operator
reads off it is Inspecting a Step; this page is where it comes
from.
Key Models
- SyntaxPiece — the executed block: a JSON object whose root keys are
sections (
Feedrate,MotionEvent,CoordinateOffset, …), the NC word kept in a section'sTerm. NcProgramRegistryService— the session-scoped index the Program branch is built from, read here for the block a cursor names, the block executed before it and the call lines.sectionCatalog.json— where each section goes on screen, and the fields the panel reads from it.
What the Service Sends
GET api/NcProgram/syntax-piece answers one block, addressed by fileIndex and lineIndex — the
cursor's source position — or by sentenceIndex when the cursor has no source position; found is
false for a block that has not run in this session. Beside the block text, its source position and
the range of steps it produced, the answer carries the piece's JSON as jsonText — null, with the
reason in jsonError, when the piece cannot be serialized, which a piece the run is still writing
can cause — and what the panel cannot read from that JSON:
prevSentenceIndex/prevJsonText— the piece executed just before, serialized the same way; -1 / null for the first piece, and for every piece of a run whose sentence indices were booked twice. When that piece cannot be serialized,prevSentenceIndexstill names it andprevJsonTextis null.programXyz/prevProgramXyz— the program position in effect after each piece. A piece's ownProgramXyzstands where a program-motion syntax wrote it. A piece without one, or with only the back-fill's, that left every machine axis where the piece before it did under the same composed program-to-machine chain — anM08, anF, a comment, a bareG41— holds the previous piece's position, walked back over such pieces at most 64 deep. Under cutter radius compensation that is what keeps the programmed position: the machine stands at the compensated tool centre there, and the back-fill would put the program position a tool radius off. Any other piece — aG55alone on its line among them, whose chain moved — reads the back-fill's value, else its machine position through the inverse of its chain. Null when no position resolves, when a component is not finite, or when the JSON or the chain cannot be read.rotaryReadout/prevRotaryReadout— the machine coordinate of each wrap-around rotary axis after each piece, folded into [0°, 360°) as the controller's position screen shows it:B: 180for a continuous −540,0for −360, never-0. An axis is folded when the IMachineAxisConfig of the dependency list the session played with — the active NC runner's before a session has run — answersIsModularRotaryfor it: a rotary axis of the brand's parameter table unless both of its stroke limits are set less than a turn apart (ControllerParameterTableBase.IsModularRotary), a SINUMERIK axis only when itsMD30310row is 1 (without the row the control's factory value 0 applies and nothing is folded); a CSV play carries no axis configuration and folds nothing. Only such axes the piece'sMachineCoordinateStatecarries as numbers are listed, each rounded to 0.001° — the position screen's increment — before the fold, so a solve's residue just below 0° reads 0; null when there are none, and for the previous piece when there is none.jsonTextandprevJsonTextkeep the continuous angle the engine moves by, which the raw JSON view prints as it is.isCallSite/callSections— whether the line called a subprogram or a macro (M98/M198,G65, aG66expansion, a Siemens named call, HeidenhainCALL LBL/CALL PGM) or opened a section repeat (SiemensREPEAT, HeidenhainCALL LBL n REP m); and, on such a line, which call records the first block of the pass it opened carries, ofSubProgramCall,FanucMacroCall,HeidenhainCall,SiemensCallandSiemensRepeat. A call record is cloned onto every line of the body it opens, so a call line inside the body of another kind of call carries the outer record too, andcallSectionsnames the call the line made itself. It is empty on every other line.passOrdinal/passCount— which pass over its file the block ran in, among the passes the Program tree lists under the same node: 0-based, -1 / 0 for a block with no source line.sourceKind— the runner that played the session:nc,csvorclsf. A session plays one kind — the engine refuses another runner until a reset — and every rewind that could change the runner drops the index, so the session's runner played every indexed piece. Null before the session has run, after it has ended, and when a runner other than the project's three played it.brand— the CncBrandDependency brand of the NC runner the session played with (Fanuc,Siemens,Heidenhain,Syntec,Mazak), not the brand of the Legacy Controller Model; null for a CSV or CLSF play. Before the session has run, and after it has ended, the brand of the active NC runner.
The Index Behind It
NcProgramRegistryService is fed from the session's piece-ran event in the order the pieces run. For
this panel it keeps:
- The previous piece — the one received just before, which is the run's own order; sentence indices alone do not give it, because a label scan numbers a whole file up front while a call body is numbered as it is pulled. The first NC line's previous piece is the session's init seed, which carries the initial modal state. A sentence index booked for two pieces — a runner built in code without a sentence-index counter — leaves every piece without a previous one.
- The call lines. A pass opens on every jump and loop turn as well as on a call, so the opening
alone says nothing; the pass's first piece does. The piece received before it is the call line
when that first piece runs one call level deeper and the piece before is not a return line (an
Lrepetition's next pass follows the previous pass'sM99, which has already left the frame), when it is a SiemensREPEATsection's first iteration, and when it opens a HeidenhainCALL LBL n REP msection from outside. That last call pushes no frame and writes the same record the section's lines carry, so the pass of the piece before decides: after a return line (LBL 0,END PGM) or a line of the same section's previous repetition it is no call; after a line of a plain pass it is one, and after a line of another section's pass it is one when that line carries this section's record — the call sat inside the other section. A call line keeps the call records of its pass's first piece, whichcallSectionsreturns. - The passes — each counted among the passes of the same tree node, the same path under the same parent node, by a node key every pass computes when it opens.
- The clears. A reset, a project change and an in-session pipeline rewind (a runner-suit rewire
or brand switch,
PowerReset, a mission script'sResetRuntime()between two NC files) drop the index. A session ended byPOST api/SessionShell/EndSessionraises no event, so its pieces stay indexed until the next play, whose init seed clears them first: the new pipeline's file and sentence counters start again at 0, and its pieces would otherwise land on the old ones.
How the CNC View Is Built
blockInfoModel.ts builds the CNC view from the block's JSON and those facts, and BlockInfoView.vue
draws it without reading the JSON itself.
- Sections.
sectionCatalog.jsongives each of the engine's sections a treatment — drawn, folded into a collapsed list, or left to the raw JSON — and lists the fields the panel reads. A section the catalog does not list still reaches the screen: under Other when it carries aTerm, in the not-shown count otherwise. - The file kind is
sourceKind, or, without it, read from the JSON: a CSV section, a CLSF section, or an empty record, which only a CLSF record before any state record is. An NC block shows a program and a machine column, a CSV row the machine column alone, a CLSF record a cutter-location column beside the machine column and a tool-axis row. Only an NC block lists modal codes: a CSV row's and a CLSF record's are the engine's own. A CLSF file's tool is itsActiveTool, or the tool of aLOADrecord, never the NC reading of an equipped and a preselected tool. A CLSF arc gives its centre in all three axes, and its sense is the sign of the arc record's axis — stored already negated from the file's — dotted with the tool axis: counterclockwise when positive, clockwise when negative, none when the two are perpendicular. - The brand. When
brandisHeidenhain, a modal code the engine wrote for the conversational program — an ISO G code, a datum preset — carries its meaning on its face and the code in its tooltip, a radius-compensation side after the group's name; a code whose meaning is a cancel, and the canned-cycle return code, are left out; the program's own words stay codes. The two compensation rows leave theD/Hnumber — the tool number on a TNC — out of the text and out of what the diff compares; aTOOL DEFpreselection shows on its own block without entering the tool row's compared state; theCYCL DEFrow stands for the ISO cycle the engine maps it to, which gets no row of its own; andLBL 0lists its return, not a label. - The call level is the block's innermost call frame (
CallStack), a macro when the block carriesMacroFrame. A return line carries the stack after its pop, so it takes the previous block's level and caller. Call events are listed on the call line alone — the onescallSectionsnames, or every one when it is empty — except a skipped call, whose record is on its own line alone; its reason reads skipped: file not found only where the record tells, skipped otherwise. - The diff. The previous block is built the same way from
prevJsonTextandprevProgramXyz, and the two are compared on state, not on text: positions, modal codes, value rows and list entries — a block's own events are one-off. What differs is marked. A modal code, value row or list entry the previous block lacked is marked too, its previous value Not set; a row the previous block had and this one lacks — local coordinates, a datum shift, mirror, tilt, a canned cycle, path smoothing, polar interpolation, the modal macro — comes back once as a cancel row. HPCC is not among them: its row is on the block that commands it alone. A canned cycle compares its code and return mode alone when only one side carries parameters.
Behavior
- Fetching. The panel watches the shared sentence cursor, asks by
fileIndex/lineIndexand falls back tosentenceIndex; an answer for a cursor that has moved on is dropped. The answer on screen — a block, a failure or an empty state — stays until the next one arrives, and before the first answer the panel shows nothing. - Empty states are the answered request's: no cursor, a failed request, no piece — no block data when that request's cursor came from a step (a play on the legacy NC interpreter keeps no pieces, yet its steps still name their lines), not run otherwise — and, in the CNC view, a piece whose JSON could not be serialized. The raw JSON view shows the serialization error instead, with no Copy JSON button.
- Retries. A piece that could not be serialized is asked for again 600 ms later, at most three times, while the cursor stays; a new cursor or an unmount ends the retries.
- Messages.
GET api/Execution/messageswithkinds=nc,step,minSeverity=Warning, the block's sentence index assentenceMinandsentenceMax, andtail=1000: the block's last 1000 warnings and errors of each list at most.foldSentenceMessagesmerges the copies alike on list, severity, category, id, text and detail into one row at the first copy's place, wherever the others sit, its count their total. The rows are built where they render, so a language switch re-renders their text.
Layout
- Block Info Panel — one bordered, square-cornered box in a collapsible panel of the Step Info
column; the panel header carries the title, whose tooltip says what the panel shows.
- Header Controls
- Block Badge —
N806 · line 799, orblock 13 · line 14for a Heidenhain block number, with the Program panel's pass mark (#2) when the file ran more than once; the file path on hover. In the raw JSON view,F1 L13 · Sn 13. - View Switch —
CNC view/Raw JSON, while the Preference menu's raw JSON checkbox is ticked. - Copy JSON Button — in the raw JSON view, while the record could be read.
- Block Badge —
- Empty State — an icon and one of the five messages.
- CNC View
- Warning Rows — the inch-unit warning, then the folded message rows with their
×ncounts. - Call Level Caption
- Block Text
- This Block — one line per event.
- Position Table — the axes by column, a wrap-around rotary axis from the folded readout, then the tool-axis and polar-plane rows.
- Modal Codes — a word chip may wrap; a code chip does not.
- Value Rows
- Folded Lists — macro variables, CSV columns.
- Other Rows and Not-Shown Count
- Warning Rows — the inch-unit warning, then the folded message rows with their
- Raw JSON View — the block text over the JSON, or the serialization error.
- Header Controls
Source Code Path
See HiNC App Anatomy for git repository links.
HiNC-2025-webservice (Quasar CLI SPA):
wwwroot-src/src/components/execution/SyntaxPiecePanel.vue— the panel: the cursor watch, the retries, the five empty states, the badge, the view switch and the raw JSON view.wwwroot-src/src/components/execution/blockInfo/blockInfoModel.ts— the CNC view's model and the diff against the previous block.wwwroot-src/src/components/execution/blockInfo/BlockInfoView.vue— draws the model.wwwroot-src/src/components/execution/blockInfo/sectionCatalog.json— the section catalog.wwwroot-src/src/components/execution/MessageRow.vue— the message row, shared with the Session Messages panel, and its count badge.wwwroot-src/src/api/ncProgram.ts—getSyntaxPieceand theSyntaxPieceInfoanswer.wwwroot-src/src/api/sessionMessages.ts—getSentenceMessages,foldSentenceMessagesand the rows without an anchor column.wwwroot-src/src/composables/useSentenceCursor.ts— the shared cursor and its origin.wwwroot-src/src/composables/useViewPrefs.ts— the raw JSON checkbox and the view it unlocks.wwwroot-src/src/i18n/en/execution.ts— the panel's strings,execution.syntax.*.Execution/NcProgramController.cs—GET api/NcProgram/syntax-piece: the serialization, the held program position, the folded rotary readout and the runner and brand of the play.Common/RotaryReadout.cs— which axes of the play are folded and the fold itself, shared with Step Properties and the Color Index Time Chart.Execution/NcProgramRegistryService.cs— the index: the previous piece, the call lines and their call records, the passes and the clears.Execution/RunOutputController.cs—GET api/Execution/messages, the block's diagnostics..ai/block-info-e2e.mjs— the REST and screen contract, played against a fixture program.
HiAPI Engine
HiMech/NcParsers/Syntaxs/SyntaxPiece.cs— the executed block and its JSON.HiMech/NcParsers/InspectionSyntaxs/ProgramXyzBackfillSyntax.cs— the back-fill whoseProgramXyza held position replaces.HiMech/NcParsers/Keywords/CallStack.cs— the call frames the call level is read from.HiMech/NcParsers/Dependencys/CncBrandDependency.cs— the brand the play ran with.HiMech/NcParsers/Dependencys/RotaryReadoutUtil.cs— the fold into [0°, 360°), and theIsModularRotarypredicate ofIMachineAxisConfigthat says which axes it applies to.
See Also
- Execution Page — the page whose Step Info column hosts this panel
- Program Branch — the file panels whose line clicks move the cursor, and the index this panel reads too
- Inspecting a Step — what an operator reads off the panel
- Preference Menu — the raw JSON checkbox that adds the view switch and the Copy JSON button