Skip to main content

Module runs

Module runs 

Source
Expand description

Runs kept side by side for comparing them: the live session’s scopes, the ghost run beside it, an analysed cycle, a path that was run, a replayed trace, and the cycle of another config or machine. Each holds every signal it has, sampled once per millisecond, with the time counted from its start. Runs of different machines are compared by quantity (Channel): a motor’s torque, speed and following error by the motor’s place in the machine’s list, and the tool’s position error. The views draw what this module gives them; it draws nothing itself.

Structs§

Aligned
One channel of two runs on the first’s time: the second’s values linearly between its samples, and the first less the second. Over the time both have; where one is longer, its rest is not compared.
Channel
One quantity of one motor (the motor’s place in its machine’s list; ignored for the tool’s error). Two runs are compared on the channels both have: of two machines with two and four motors, motors 0 and 1.
Figures
A run’s key figures for the compare panel.
History
The samples of a session as one flat ring buffer: a row of every signal per sample, the newest capacity kept. One allocation of capacity rows in all, where a Vec per row cost a heap block per sample.
MotorFigures
What a motor did over a run.
Run
One run: every signal it has, once per millisecond, the time from its start.
RunStore
The runs kept for comparing, oldest first, and which of them is the reference the others are compared with.
Units
The units the plots and tables show speeds and lengths in: rpm in place of rad/s, mm in place of m. Off, a value keeps its SI unit, which the scopes scale by an SI prefix to a readable size (display_scale).

Enums§

Quantity
A quantity compared across runs.
RunKind
Where a run came from.

Constants§

MAX_RUNS
How many runs the store keeps; the oldest goes for a newer one.
MODE_POSES
How many poses along a run its modes are asked at (Run::rated): the start, the end and evenly between.
PLOT_BUCKETS
At most this many stretches a drawn line is cut into (peak_keeping): two points each, some six thousand a line.

Functions§

align
a and b on a’s time, both counted from their start (see Aligned); None where either lacks the channel.
owner_slot
The colour slot of a signal’s owner, the same in every plot: an axis by its place in the machine’s axes, a motor by its place in its motors (as plots of one value per motor colour them), anything else after those by its place among the other owners of signals. So motor 2 has one colour in the scopes, the torque-speed plot, the sweep and the run comparison.
peak_keeping
At most 2 buckets of the n points point(0) .. point(n - 1), in their order, for drawing a long line: the points cut into buckets stretches of about equal count, and of each the lowest and the highest point (one, where they are the same). A stride would step over a peak one sample wide; this keeps every stretch’s extremes, so the drawn line reaches every peak there is. Fewer points than 2 buckets are given as they are.
plot_line
The points of a line for a plot: every point where there are few, else the lowest and highest of each of PLOT_BUCKETS stretches, so that a peak one sample wide still shows.
scaled_speeds
A torque-speed chart with its speeds times factor (Units), its torques as they are.
shared_channels
The channels two runs share: the alignment of Channel.
trail_until
The travelled path’s points up to time (all of them for None, live): what the 3D view draws while the timeline shows an older scene. The points are in time order.