Glossary: Machining Step
What Is a Machining Step?
A MachiningStep (MachiningStep) is a single computation unit in the HiNC simulation. By default, one step corresponds to one spindle revolution, but this interval is configurable via the Basic Simulation workflow.
Each step contains data for the time interval between two consecutive steps (from the previous step to the current step). Since this represents a period rather than an instant, many fields are simplified representations using prefixes like Average (Avg), Extremes (Min, Max), Range (Delta), and Maximum Absolute Value (MaxAbs).
Key Properties
The table below summarizes the primary step output fields. For the complete reference, see MachiningStep.
Basic Source Information
| Property | Description |
|---|---|
FileNo / LineNo / FilePath / LineText |
Source NC file and line information |
StepIndex |
Step sequence index |
ToolId |
Active tool ID |
FlagsText |
Active G-code modal flags |
Time and Motion
| Property | Description |
|---|---|
AccumulatedTime |
Accumulated simulation time |
StepDuration |
Duration of this step |
BeginSpindleAngle_deg |
Spindle angle at step start |
Cl (X, Y, Z, I, J, K) |
Cutter location point and tool axis vector |
MC (X, Y, Z, A, B, C) |
Machine coordinates |
Feedrate_mmdmin |
Feed rate (mm/min) |
SpindleSpeed_rpm |
Spindle speed (RPM) |
FeedPerTooth_mm / FeedPerCycle_mm |
Feed per tooth / per cycle |
MovingLength_mm |
Displacement length |
Cutting Engagement
| Property | Description |
|---|---|
IsTouched |
Whether cutting engagement occurred |
CuttingWidth_mm (ae) |
Cutting width |
CuttingDepth_mm (ap) |
Cutting depth |
Mrr_mm3ds |
Material removal rate |
ChipThickness_mm |
Chip thickness |
ChipVolume_mm3 |
Chip volume |
Force and Torque
| Property | Description |
|---|---|
AvgForceToToolOnToolRunningCoordinate_N |
Average force on tool (X, Y, Z) |
MaxAbsForce_N |
Maximum absolute force |
AvgAbsTorque_Nm |
Average absolute torque |
Power and Energy
| Property | Description |
|---|---|
SpindleInputPower_W |
Spindle input power |
SpindleOutputPower_W |
Spindle output power (after efficiency losses) |
MaxSpindlePowerRatio |
Input power / max spindle power capability |
AccumulatedSpindleEnergyConsumption_kWh |
Accumulated energy consumption |
Thermal
| Property | Description |
|---|---|
CutterDermisTemperature_C |
Cutter surface temperature |
WorkpieceDermisTemperature_C |
Workpiece surface temperature |
ChipTemperature_C |
Chip temperature |
ThermalStress_MPa / ThermalYieldRatio |
Thermal stress and yield ratio |
Wear and Deflection
| Property | Description |
|---|---|
AccumulatedCraterWear_um |
Accumulated crater wear |
AccumulatedFlankWearDepth_um / Width_um |
Accumulated flank wear |
ReCutDepth_um |
Re-cut depth from tool deflection |
Registering Custom Step Variables
Beyond default properties, you can register custom step variables using RegisterStepVariable:
RegisterStepVariable(
"ChipVolume", // key
"Chip Volume", // display name
"mm3", // unit
"F2", // format string
(step) => step.ChipVolume_mm3 // value function
);
PlayNcFile("NC/file1.nc");
Parameters:
- key: Unique identifier
- name: Display name (shown in UI)
- unit: Physical unit (can be null)
- formatString: .NET numeric format string (can be null)
- variableFunction: Lambda that computes the value from a step (can be null)
Registered variables appear in the UI and in output files from WriteStepFiles.
Indexer Access
Use the this[string] indexer to read/write custom data on a step:
SessionStepBuilt += (preStep, curStep) => {
if (curStep != null)
curStep["MyCustomField"] = someCalculation();
};
Accessing Step Data
GetMillingStep
GetMillingStep retrieves a step by index:
var step = GetMillingStep(100);
if (step != null)
{
Message($"ToolId={step.ToolId}, Force={step.MaxAbsForce_N} N");
}
StepCount
StepCount returns the total number of steps:
Message($"Total steps: {StepCount}");
Iterating All Steps
for (int i = 0; i < StepCount; i++)
{
var step = GetMillingStep(i);
// process step...
}
Step Output Files
Steps can be exported to CSV using WriteStepFiles:
WriteStepFiles("Output/[NcName].step.csv");
The CSV contains all default properties plus any registered custom variables. The file can be read back with PlayCsvFile.
For waveform-level data (sub-step time resolution), use WriteShotFiles:
WriteShotFiles("Output/[NcName].shot.csv", 1); // 1 ms time resolution
Dynamically Registered Variables (Training)
After executing TrainMillingPara or ReTrainMillingPara, two additional step variables are automatically registered for steps within the training region:
| Variable | Description |
|---|---|
TrainingErrRatio |
Error metric between simulation and measurement for each step |
AngleOffset |
Cutter rotation phase difference between measured and simulated data |
See Also
- Simulation Step — concept definition
- Simulation Step Output — complete field reference
- Glossary: RuntimeApi Quick-Reference — RuntimeApi quick-reference
- Workflow: Basic Machining Simulation — simulation workflow producing steps
- Workflow: Milling Force Parameter Training — training workflow that adds step variables