Table of Contents

Execution Tool Bar

The transport controls for the run. In the web application they sit in the run header of the Execution Page's Control Tree pane — pinned above the tree, beside the run-state badge, on the Execution page only — and this sole instance registers the F5–F8 shortcuts.

Layout

  • Execution Tool Bar
    • Status Text Field
    • Start Button (F5; Resume once the run is paused)
    • Pause Button (F6)
    • Run-One-Line Button (F7 — one NC line)
    • Run-One-Step Button (F8 — one machining step)
    • Stop Button
    • Reset Button

In the web application the status text is a run-state badge to the right of the button strip; the two share the Control Tree pane's run header, and when the tree column is narrowed the button strip scrolls while the badge keeps its width, so the run state is the last thing a resize hides. The two single-advance buttons share one skip_next icon and are separated by a letter drawn into the button's corner — L for the line button, S for the step button — rather than by colour; the tool-tips carry the key names.

Behavior

  • The webservice watches LocalProjectService events to track PacePlayer status changes.
  • In the webservice, ExecutionStatusService subscribes to those events and broadcasts status changes over SignalR through ExecutionStatusHub.
  • The frequently used buttons carry hotkeys: Start / Resume, Pause, Run One Line and Run One Step. The app's tool-tips are the only place those key bindings are written down.
  • The badge reads the status in lower case (ready, running, paused, finished, no project, error), and the background color of the Status Text Field follows it:
    • Warning (amber) — Running
    • Orange — Paused
    • Positive (green) — Finished, Ready
    • Negative (red) — Error
    • Grey — No Project, and any status the client has no label for (its raw name is shown)

The action of Reset Button is async, so the UI stays responsive while the session unwinds; the button shows a busy state for the duration, and the flag behind it is shared with the keyboard path so the two agree.

Enable Rules

Every button is disabled unless a project is loaded and the page has finished initializing its rendering connection — the web transport reads that readiness from the Execution page, so a dropped canvas connection greys the whole bar with a project still open. On top of that gate each button follows the status:

Button Enabled for status
Start / Resume Ready, Paused
Pause Running
Run-One-Line, Run-One-Step Ready, Paused
Stop Running, Paused, Finished
Reset any, while no reset is in flight

Neither single-advance button is enabled while the run is Running — stepping is a Ready-or-Paused operation, so a moving run has to be paused before it can be stepped.

The F5–F8 handler applies the same predicates before acting, and declines in two more cases: when the event target is an input, a textarea or a contenteditable element, and when the hosting page is deactivated. The second matters because the shell keep-alives the routed pages, so leaving the Execution route deactivates rather than unmounts this component; without the detach, F5 elsewhere in the app would drive the transport instead of reloading the browser. Collapsing the Control Tree row does not detach it: the dock keeps the tree pane mounted through a collapse. Every declined key falls through to the browser.

Tip

Use icons rather than text on the tool-bar buttons. Run One Line and Run One Step share an icon, so they need a second mark to tell them apart — this bar draws an L and an S in the button corner. The default colour is enough for the rest.

Source Code Path

See HiNC App Anatomy for git repository links.

HiNC-2025-webservice (Quasar CLI SPA):

  • wwwroot-src/src/components/execution/ExecutionToolBar.vue — the buttons. All state and handlers come from the shared useExecutionTransport composable, so the component is pure markup.
  • wwwroot-src/src/composables/useExecutionTransport.ts — the enable rules, the API-calling handlers and the F5–F8 listener; the shared reset-in-flight flag lives here.
  • wwwroot-src/src/components/controlTree/ControlTreePanel.vue — the Control Tree pane; its run header mounts the bar beside the run-state badge on the Execution page only, with the badge unshrinkable and the button strip the part that scrolls.
  • wwwroot-src/src/utils/executionStatusPresent.ts — the badge's label and color per status.
  • Execution/ExecutionController.cs — POST /api/Execution/start | pause | resume | run-line | run-step | stop | reset, and GET /api/Execution/status.
  • Execution/ExecutionStatusHub.cs + Execution/ExecutionStatusService.cs — the status broadcast.

SignalR Implementation (Web Service Only)

ExecutionStatusHub is mapped at /executionStatusHub and answers GetExecutionStatus(). ExecutionStatusService watches the PacePlayer events — IsRunningChangedEvent, IsLockedChangedEvent, IsFinishedChangedEvent and ResetedEvent — and broadcasts each change, so every connected client sees the same run state without polling.

See Also