Table of Contents

Class StepPhysicsChannelReader

Namespace
Hi.MachiningProcs
Assembly
HiMech.dll

Internal Use Only. The reader of the resident channels (StepPhysicsChannels): the per-step quantities the plural strip charts and the color trees derive from the few float32 source numbers a published step left in the channels, with the formulas the step's getters use — the same static formulas, with the spindle capability, the ambient temperature, the tool house and the physics packs of the moment — so that a poll over the whole strip and a tree's evaluation never read the step cache. One reader a runner (StepPhysicsChannelReader), read on any thread at once: the sequencing thread (the step-built hook), the inspecting-slot scan, the requests' polls and the export.

The spindle limits at a step's speed (SpindleSpeedCache) are built once per speed met and kept in a snapshot of the environment they were built from: the capability object, the ambient temperature's bits and the tool house object. A read whose environment differs from the snapshot's by identity builds a new snapshot (a capability or a tool house replaced, an ambient edited); an edit made in place on the capability object is not seen by identity, and the host drops the snapshot where it moves the inspecting-slot generation (Invalidate()) — the environment forward, the step-physics recompute's end, a session's begin — and the runner drops it with the strip.

public sealed class StepPhysicsChannelReader
Inheritance
StepPhysicsChannelReader
Inherited Members
Extension Methods

Constructors

StepPhysicsChannelReader(StepPhysicsChannels, Func<MachiningEquipment>, Func<MachiningToolHouse>)

Creates a reader over channels for the equipment and the tool house of the moment.

public StepPhysicsChannelReader(StepPhysicsChannels channels, Func<MachiningEquipment> equipment, Func<MachiningToolHouse> house)

Parameters

channels StepPhysicsChannels

The resident channels the reader reads.

equipment Func<MachiningEquipment>

Answers the equipment of the moment (its spindle capability and ambient temperature); may answer null.

house Func<MachiningToolHouse>

Answers the tool house of the moment; may answer null.

Exceptions

ArgumentNullException

A parameter is null.

Fields

CachedSpeedCap

The spindle speeds a snapshot keeps the limits of, about: an adder stops adding once the snapshot's count has reached it (a few adders through the check at once can land a few over). A replay whose every step carries its own measured speed would otherwise keep a cache a step for the session; a speed met past the cap is read from limits built for that read and not kept.

public const int CachedSpeedCap = 4096

Field Value

int

Properties

CachedSpeedCount

The spindle speeds whose limits are cached in the current snapshot; 0 after Invalidate().

public int CachedSpeedCount { get; }

Property Value

int

ResidentReads

The quantities a step's presentation key can read off the resident channels, by key: the seven ratios and the max breakage ratio. The step-property registry attaches each to its entry as PropertyAccess.ResidentQuantityFunc, so a color tree reads those keys here and not through the step's getter (which reads the step cache once a step).

public static IReadOnlyDictionary<string, Func<StepPhysicsChannelReader, MachiningStep, double>> ResidentReads { get; }

Property Value

IReadOnlyDictionary<string, Func<StepPhysicsChannelReader, MachiningStep, double>>

Methods

ContinueSpindlePowerRatio(MachiningStep)

Continuous spindle power ratio: input power / time-unlimited maximum power per the current spindle capability, computed on read.

public double ContinueSpindlePowerRatio(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for a step not held.

Returns

double

ContinueSpindleTorqueRatio(MachiningStep)

Gets the infinite insistent spindle torque ratio: the step's peak axial torque over the torque the current spindle capability sustains indefinitely at the step's speed, computed on read.

public double ContinueSpindleTorqueRatio(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for a step not held.

Returns

double

DeltaTipDeflection_um(MachiningStep, int)

One component of the delta tip deflection on the tool running coordinate in micrometers (DeltaTipDeflectionOnToolRunningCoordinate_um): 0 for an untouched step; NaN for a step not held or a deflection not built.

public double DeltaTipDeflection_um(MachiningStep s, int axis)

Parameters

s MachiningStep

The step; NaN for null.

axis int

0, 1 or 2 for X, Y or Z of the tool running coordinate.

Returns

double

Invalidate()

Drops the spindle caches: the next read builds them from the capability and the ambient temperature of the moment. For an edit made in place on the capability object, which the reader cannot see by identity.

public void Invalidate()

IsHeld(MachiningStep)

Whether the step's channels were written: the step was published by this runner (its row of the two briefs exists) and the strip was not cleared since.

public bool IsHeld(MachiningStep step)

Parameters

step MachiningStep

The step; null is not held.

Returns

bool

true when the reader can answer for the step.

MaxBreakageRatio(MachiningStep)

The max breakage ratio: the largest of the yielding stress ratio, the max spindle torque ratio and the max spindle power ratio that are known, the three computed in one go (one read of the channels' row, one look-up of the spindle limits); NaN while none of the three is known — the physics did not run on the step, or the two spindle ratios have no capability or no limits at the step's speed and the yielding stress ratio is NaN; 0 on a step the cutter did not touch. What MaxBreakageRatio reads.

public double MaxBreakageRatio(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for a step not held.

Returns

double

The largest known of the three ratios, or NaN.

MaxForce_N(MachiningStep, int)

One component of the maximum force on the tool running coordinate in N (MaxForceOnToolRunningCoordinate_N): NaN for a step not held, the null record or a force not built.

public double MaxForce_N(MachiningStep s, int axis)

Parameters

s MachiningStep

The step; NaN for a step not held.

axis int

0, 1 or 2 for X, Y or Z of the tool running coordinate.

Returns

double

MaxSpindlePowerRatio(MachiningStep)

Maximum spindle power ratio: input power / instantaneous maximum power per the current spindle capability, computed on read.

public double MaxSpindlePowerRatio(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for a step not held.

Returns

double

MaxSpindleRatio(MachiningStep)

The spindle overload ratio: the larger of the max spindle torque ratio and the max spindle power ratio that are known, the two computed in one go (one read of the channels' row, one look-up of the spindle limits); NaN while neither is known — the physics did not run on the step, or there is no capability or no limits at the step's speed; 0 on a step the cutter did not touch. What the overload run fold folds (OverloadRunFold) and what SpindleOverloadRevolutions reads to tell a known ratio from an unknown one.

public double MaxSpindleRatio(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for a step not held.

Returns

double

The larger known of the two spindle ratios, or NaN.

MaxSpindleTorqueRatio(MachiningStep)

Gets the maximum spindle torque ratio: the step's peak axial torque over the peak torque the current spindle capability sustains at the step's speed, computed on read.

public double MaxSpindleTorqueRatio(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for a step not held.

Returns

double

ReCutDepth_um(MachiningStep)

The re-cut depth on the bottom edge in micrometers, swung out of the channels' maximum force at its height with the formula of ReCutDepth_um: 0 for an untouched step, for a touched one not held or without a force brief, and for a deflection the formula cannot build (the no-deflection answer the plural chart draws); NaN for null alone.

public double ReCutDepth_um(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for null.

Returns

double

SpindleWorkingTemperatureRatio(MachiningStep)

Gets the spindle working temperature ratio: the spindle temperature above ambient over the current spindle capability's working range, computed on read; NaN without a spindle capability or without its continuous condition.

public double SpindleWorkingTemperatureRatio(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for a step not held.

Returns

double

ThermalYieldRatio(MachiningStep)

Gets the thermal yield ratio: ThermalStress_MPa over the current cutter's flute material tensile strength, computed on read.

public double ThermalYieldRatio(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for a step not held.

Returns

double

YieldingStressRatio(MachiningStep)

Gets the yielding stress ratio

public double YieldingStressRatio(MachiningStep s)

Parameters

s MachiningStep

The step; NaN for a step not held.

Returns

double