Skip to main content

Module model

Module model 

Source
Expand description

Everything the interface shows and edits, without any drawing: the chosen machine and language, the config being edited, the scope history, tuning and analysis results. The window code only draws this and calls its methods.

Structs§

BeltView
The belt sections in the effect view: tension and stretch per section over the scopes’ window, the pretension and the rating to compare them with, and the table of the newest sample.
CompareView
The effect comparison: one scope’s quantity with the effect on (solid) and off (dashed), and per line the peak and RMS of the difference.
FrictionView
One friction contact in the effect view.
Inputs
What the analysis panel is asked with, as typed.
Model
ParamGroup
One group of the parameter panel: a config table and its scalar values.
PathRun
A path as it was planned, run on a simulation of its own and judged.
RunLine
One line of a RunPlot: of which run (its place in the store) and motor (its colour), named, and its points.
RunPlot
One plot of the run comparison: one quantity of every shown run, and each run’s difference from the reference (RunStore::against_reference).
Scope
One scope: one quantity for every axis or motor, actual values together with their setpoints.
ScopeLine
Stats
What a trace did inside the visible time window.
ThermalView
The temperatures in the effect view: one line per winding and, with effects.part_heating or thermal_feedback, per heated part, over the scopes’ window, and the table of where each is now, where it settles on the analysed cycle and what it is rated for.
TraceFit
A trace replayed and fitted: per motor the RMS and peak difference between the trace and its replay, of torque and of following error, and per axis the fit (none for an axis the trace does not move both ways), or on a machine that is fitted in its motors’ coordinates (per_axis_fit false) that fit in joints and no fits. With the trace and its replay, for the overlay, and per motor what the trace says by itself (sim-cli identify: inertia, friction, the loops’ lags). Where it was asked for, the belts’ stiffness from the trace’s moves, or why the trace gives none.
Tuning
The answer of one axis’s position loop to a step and to sines, for choosing gains.
WorkspaceSlice
A horizontal slice through what the machine can reach, for the workspace map (Model::workspace_slice).

Enums§

Analysis
What the analysis panel can compute. Each takes seconds, so each runs in a thread of its own.
JobRef
A background job the window shows progress for and can cancel.

Constants§

BAND_BUCKETS
The most stretches a band over a trace is drawn in (Model::band_plots): each is a filled shape of its own.
HISTORY
Samples kept for the scopes: one minute at one per millisecond.
MODE_POINTS
How many places over the stroke the tuning help asks the machine for its modes.
SUPPLIES
The supplies the motor catalogue has data for: the S210 at 230 V and 400 V, and the S120.

Functions§

config_label
A short label for a config: the values it has other than the machine’s default config, the first three of them as path=value and how many more; “default” where none.
display_scale
A factor and an SI prefix that bring a value of this size into a readable range: 0.00004 m reads as 40 µm.
heat_color
The part colours live in the core, so that the browser’s 3D view (sim-wasm) colours as this one does. The colour of the heat scale at a temperature rise of heat times the rated one: cold blue, yellow at half, red at the rated rise, and magenta beyond it.
part_color
The part colours live in the core, so that the browser’s 3D view (sim-wasm) colours as this one does. The colour a 3D view draws a part in: where its warmth is computed (Part::heat) the heat scale in its place; otherwise its own colour, shifted towards red by belt tension above pretension (highlight up to 1, at twice the pretension) and towards blue below it (-1 at no tension).
short
A number at a readable length, whatever its size: four digits and at most three decimals, so 12.5 reads as 12.50 and 1912.141 as 1912, and 0.0000312 as 3.12e-5; at least three digits, as the exponent has, so 0.0146 reads as 0.0146 and not 0.015. Narrow, so that the tables fit the panel.
short_pair
A check’s value and limit as short writes them; a failing one that would read the same gets as many digits as it takes to tell them apart (1.0004 against 1.000).
start_at_setpoint
A simulation of config whose planned setpoint stands at pose (a running machine’s setpoint), and the config it starts from. The planning model puts the tool at start.pose and its setpoint one rest sag off it (0.26 mm on the planar delta): the tool is moved by what is left until the setpoint is pose. A pose the machine cannot start at is refused; a push that would put the tool past a stroke’s end puts it at that end (the setpoint then stands up to a sag off pose along that axis, where no tool on the stroke can put it). A push off the machine’s envelope (not a stroke’s end) keeps the last start: the tool moves less than a sag between two of them.

Type Aliases§

Curves
Per motor its torque-speed chart (charts::TorqueSpeed), from its own drive (Run::torque_speed).
Message
A message for the user, as a translation key and its argument.
Overlay
The overlay of a replayed trace, per quantity of OVERLAY_KEYS and per motor: (time, measured) and (time, simulated).
Table
A table for the window to draw as it is, the header first. Every cell is text in the chosen language.