Table of Contents

Class SpindleSpeedCache

Namespace
Hi.MachiningProcs
Assembly
HiMech.dll

Represents cached spindle speed information.

public class SpindleSpeedCache
Inheritance
SpindleSpeedCache
Inherited Members
Extension Methods

Constructors

SpindleSpeedCache(SpindleSpeedCache)

Initializes a new instance by copying from another instance.

public SpindleSpeedCache(SpindleSpeedCache src)

Parameters

src SpindleSpeedCache

The source instance to copy from.

SpindleSpeedCache(double, double, double, double, double, double, double, double)

Initializes a new instance.

public SpindleSpeedCache(double spindleSpeed_cycleDs, double infInsistentRatioSpindleTorqueBoundary_Nm, double infInsistentRatioSpindlePowerBoundary_W, double minInsistentRatioSpindleTorqueBoundary_Nm, double minInsistentRatioSpindlePowerBoundary_W, double heatCapacity_JdK, double convectionPara_WdK, double dryRunPower_W)

Parameters

spindleSpeed_cycleDs double

The spindle speed in cycles per second.

infInsistentRatioSpindleTorqueBoundary_Nm double

The infinite insistent ratio spindle torque boundary in Newton-meters.

infInsistentRatioSpindlePowerBoundary_W double

The infinite insistent ratio spindle power boundary in watts.

minInsistentRatioSpindleTorqueBoundary_Nm double

The minimum insistent ratio spindle torque boundary in Newton-meters.

minInsistentRatioSpindlePowerBoundary_W double

The minimum insistent ratio spindle power boundary in watts.

heatCapacity_JdK double

The heat capacity in joules per Kelvin.

convectionPara_WdK double

The convection parameter in watts per Kelvin.

dryRunPower_W double

The dry run power in watts.

Fields

ContinuousConditionNotSetWarning

What the builder says when the capability has no continuous torque or power contour (ContinuousConditionNotSet); the play reports it as Spindle-Speed–Capped, the recompute as its chain warning.

public const string ContinuousConditionNotSetWarning = "Continuous condition not set in Spindle Capability."

Field Value

string

HeatCapacityUnderivedWarning

What a play says on the first step of a run of spindle speeds whose heat capacity the capability's ratings do not give, and a recompute once: the shortest-duration power contour holds no more power than the continuous one, or the capability has no power contour of a finite duration. The spindle temperature is computed all the same.

public const string HeatCapacityUnderivedWarning = "The Spindle Capability does not tell how fast the spindle warms up at a spindle speed in use: its shortest-duration power contour holds no more power than the continuous one (on that speed's side of the gear shift speed when one is set), or it has no power contour of a finite duration. The spindle temperature on the steps at that speed is computed all the same, but how fast it rises and falls does not come from the capability, and without a finite-duration contour it does not change at all. Give the shortest-duration power contour more power than the continuous one, as a short-time rating has."

Field Value

string

LimitsUnreadableWarning

What a play says on the step at which a run of steps the spindle limits cannot be read at starts, a recompute once, and an NC optimization once: Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, out SpindleSpeedCacheWarning) throws at a spindle speed the capability leaves it nothing to read the four boundaries and the heat parameters from — a power or torque contour without points, or a power contour with none on that speed's side of the gear shift speed — and the caller takes the step without a cache, as one played without a capability: the spindle temperature is carried over, and the spindle torque and power ratios of a step that cuts read NaN. One wording whatever the read that threw: the exception's own text (an index out of range, a sequence without elements) names no contour and helps no user.

public const string LimitsUnreadableWarning = "The spindle limits and heat parameters cannot be read from the spindle capability at the spindle speed of some steps: a power or torque contour has no points, or a power contour has none on those steps' side of the gear shift speed; on those steps the spindle temperature stays at the previous step's value and the spindle torque and power ratios of the steps that cut read NaN — correct the contours or the gear shift speed and recompute."

Field Value

string

NoHeatModelWarning

What a play says on the step at which a run of spindle speeds without a heat model starts, and a recompute once, about a spindle speed the chain can take no heat model from.

public const string NoHeatModelWarning = "The spindle heat model cannot be derived from the Spindle Capability at a spindle speed in use, so the spindle temperature is carried over on the steps at that speed. Check the continuous and the shortest-duration power contours (power above zero on that speed's side of the gear shift speed when one is set), the energy efficiency (above 0 and below 1), the working temperature upper boundary (above room temperature) and the shortest workable duration (above 0)."

Field Value

string

Properties

ConvectionPara_WdK

Gets or sets the convection parameter in watts per Kelvin.

public double ConvectionPara_WdK { get; set; }

Property Value

double

DryRunPower_W

Gets or sets the dry run power in watts.

public double DryRunPower_W { get; set; }

Property Value

double

HasHeatModel

Whether this cache carries a spindle heat model: a convection parameter and a heat capacity above zero. The capability yields no such pair where it leaves nothing to derive them from at the cache's speed: no power above zero on the continuous or on the shortest-duration power contour there (on the speed's side of the gear shift speed when one is set), an energy efficiency of 1 or more, a working temperature upper boundary with no range to warm through, or a shortest workable duration of zero. The spindle temperature is then carried over on the steps that use the cache; its four boundaries hold all the same.

public bool HasHeatModel { get; }

Property Value

bool

HeatCapacity_JdK

Gets or sets the heat capacity in joules per Kelvin.

public double HeatCapacity_JdK { get; set; }

Property Value

double

InfInsistentRatioSpindlePowerBoundary_W

Gets or sets the infinite insistent ratio spindle power boundary in watts.

public double InfInsistentRatioSpindlePowerBoundary_W { get; set; }

Property Value

double

InfInsistentRatioSpindleTorqueBoundary_Nm

Gets or sets the infinite insistent ratio spindle torque boundary in Newton-meters.

public double InfInsistentRatioSpindleTorqueBoundary_Nm { get; set; }

Property Value

double

MinInsistentRatioSpindlePowerBoundary_W

Gets or sets the minimum insistent ratio spindle power boundary in watts.

public double MinInsistentRatioSpindlePowerBoundary_W { get; set; }

Property Value

double

MinInsistentRatioSpindleTorqueBoundary_Nm

Gets or sets the minimum insistent ratio spindle torque boundary in Newton-meters.

public double MinInsistentRatioSpindleTorqueBoundary_Nm { get; set; }

Property Value

double

SpindleSpeed_cycleDs

Gets or sets the spindle speed in cycles per second.

public double SpindleSpeed_cycleDs { get; set; }

Property Value

double

Methods

Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, out SpindleSpeedCacheWarning)

Creates a SpindleSpeedCache from spindle capability and machine motion step. Returns preSpindleSpeedCache if the spindle speed is unchanged or the capability data is incomplete, and null when there is no spindleCapability at all (the readers then skip the spindle ratios and the spindle temperature). The cache it builds may come without a heat model (HasHeatModel) where the capability leaves nothing to derive one from at that speed: its four boundaries are good, and the caller that runs the chain with it carries the spindle temperature over and says NoHeatModelWarning. Throws where the capability leaves it nothing to read the boundaries or the heat parameters from at the step's speed — a power or torque contour without points, or a power contour with none on that speed's side of the gear shift speed: the callers (the play, the recompute, the NC optimization) take such a step without a cache and say LimitsUnreadableWarning.

public static SpindleSpeedCache Create(SpindleCapability spindleCapability, MachineMotionStep machineMotionStep, SpindleSpeedCache preSpindleSpeedCache, out SpindleSpeedCacheWarning warning)

Parameters

spindleCapability SpindleCapability

The capability of the moment; null builds no cache.

machineMotionStep MachineMotionStep

The step.

preSpindleSpeedCache SpindleSpeedCache

The previous step's cache, handed back while the speed stays.

warning SpindleSpeedCacheWarning

What the builder has to say about the capability; None when nothing.

Returns

SpindleSpeedCache

The cache, the previous one, or null.

Remarks

The body: a pure function of the capability, the step and the previous cache; what it has to say comes back as warning (play-core migration P9), and the caller emits it at its own site – the play as Spindle-Speed–Capped (MachiningActRunner.BuildSpindleSpeedCache), the step-physics recompute as its chain warning – with the text of WarningText(SpindleSpeedCacheWarning). The Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, Action<string>) form wraps it for the callers that hand a sink over.

Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, Action<string>)

Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, out SpindleSpeedCacheWarning) for a caller that hands a sink over: onWarning is invoked with the text of the warning (WarningText(SpindleSpeedCacheWarning)) when the builder has one, and the cache answered is the same. The step's own getter, the feed solver and the NC optimization call this form; the play and the step-physics recompute call the body and emit at their own site.

public static SpindleSpeedCache Create(SpindleCapability spindleCapability, MachineMotionStep machineMotionStep, SpindleSpeedCache preSpindleSpeedCache, Action<string> onWarning)

Parameters

spindleCapability SpindleCapability

The capability of the moment; null builds no cache.

machineMotionStep MachineMotionStep

The step.

preSpindleSpeedCache SpindleSpeedCache

The previous step's cache, handed back while the speed stays.

onWarning Action<string>

Invoked with the warning's text; may be null.

Returns

SpindleSpeedCache

The cache, the previous one, or null.

WarningText(SpindleSpeedCacheWarning)

The text of a builder warning: ContinuousConditionNotSetWarning for ContinuousConditionNotSet, null for None.

public static string WarningText(SpindleSpeedCacheWarning warning)

Parameters

warning SpindleSpeedCacheWarning

The warning the builder answered.

Returns

string

The text, or null when there is nothing to say.