Table of Contents

Class ControllerParameterTableBase

Namespace
Hi.NcParsers.Dependencys
Assembly
HiMech.dll

Base class for brand-specific controller parameter tables. Provides shared data structures, XML IO, and IHomeMcConfig

  • IMachineAxisConfig implementations. Subclasses define brand-specific parameter numbers, XML attribute names, and derived convenience properties.
public abstract class ControllerParameterTableBase : IHomeMcConfig, IMachineAxisConfig, INcDependency, IMakeXmlSource
Inheritance
ControllerParameterTableBase
Implements
Derived
Inherited Members
Extension Methods

Properties

AxisNames

Gets the configured axis names in order.

public IEnumerable<string> AxisNames { get; }

Property Value

IEnumerable<string>

AxisParams

Per-axis float parameters. Outer key = parameter number, inner key = axis name.

public Dictionary<int, Dictionary<string, double>> AxisParams { get; set; }

Property Value

Dictionary<int, Dictionary<string, double>>

AxisTypeParamId

Parameter/MD/MP number for axis type (linear/rotary/spindle).

protected abstract int AxisTypeParamId { get; }

Property Value

int

IdAttributeName

XML attribute name for the parameter ID (“ParamId”, “MdId”, “MpId”).

protected abstract string IdAttributeName { get; }

Property Value

string

IntAxisParams

Per-axis integer parameters. Outer key = parameter number, inner key = axis name.

public Dictionary<int, Dictionary<string, int>> IntAxisParams { get; set; }

Property Value

Dictionary<int, Dictionary<string, int>>

ReferencePositionParamId

Parameter/MD/MP number for reference position (G28 home).

protected abstract int ReferencePositionParamId { get; }

Property Value

int

SystemParams

System-wide parameters. Key = parameter number.

public Dictionary<int, double> SystemParams { get; set; }

Property Value

Dictionary<int, double>

Methods

AxisParam(int)

public Dictionary<string, double> AxisParam(int paramId)

Parameters

paramId int

Returns

Dictionary<string, double>

GetHomePosition(string)

Gets the home position for a specific axis. Returns null if the axis has no home position configured.

public double? GetHomePosition(string axisName)

Parameters

axisName string

Returns

double?

IntAxisParam(int)

public Dictionary<string, int> IntAxisParam(int paramId)

Parameters

paramId int

Returns

Dictionary<string, int>

IsRotaryAxis(string)

Returns true if the axis is rotary or spindle, false if linear.

public bool IsRotaryAxis(string axisName)

Parameters

axisName string

Returns

bool

MakeXmlSource(string, string, bool)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public abstract XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if true, the extended file creation is suppressed.

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.

ReadXml(XElement)

protected void ReadXml(XElement src)

Parameters

src XElement

RemoveAxis(string)

Removes an axis from the configuration.

public void RemoveAxis(string axisName)

Parameters

axisName string

SetAxis(string, AxisType)

Adds or updates an axis with the specified type.

public void SetAxis(string axisName, AxisType type)

Parameters

axisName string
type AxisType

SetHomePosition(string, double)

Sets the home position for a specific axis.

public void SetHomePosition(string axisName, double value)

Parameters

axisName string
value double

WriteXml(string)

protected XElement WriteXml(string xName)

Parameters

xName string

Returns

XElement