Class SyntecParameterTable
- Namespace
- Hi.NcParsers.Dependencys.Syntec
- Assembly
- HiMech.dll
Syntec controller parameter table. Stores system parameters (single value) and axis parameters (per-axis value) under Pr-prefixed keys numbered after the Fanuc table's keys, not after Syntec's own parameters: on a Syntec control these numbers hold other parameters (its software stroke limit 1, for one, is Pr2401~Pr2440), and IsStorageKeyOnly(int) marks every modeled key but Pr4002.
Pr4002 is Syntec's own number: the retraction distance of drilling, in the control's least input unit, which this table reads as microns where the Fanuc table's key 4002 holds mm.
public class SyntecParameterTable : ControllerParameterTableBase, IHomeMcConfig, IMachineAxisConfig, IRapidFeedrateConfig, IStrokeLimitConfig, ISpindleControlConfig, IMCodeDeclarationConfig, IToolChangeTriggerConfig, ICannedCycleConfig, IIsoCoordinateConfig, INcDependency, IMakeXmlSource
- Inheritance
-
SyntecParameterTable
- Implements
- Inherited Members
- Extension Methods
Remarks
CutterCompensationType is shared with Fanuc
because both follow the same ISO cutter compensation standard.
Consider relocating to the shared Hi.NcParsers.Dependencys
namespace if more brands need it.
Constructors
SyntecParameterTable()
Initializes a new instance, seeding the ISO G54-G59 / G54.1 P-table coordinate offsets with their default values.
public SyntecParameterTable()
SyntecParameterTable(XElement)
Initializes a new instance by deserializing from src.
public SyntecParameterTable(XElement src)
Parameters
srcXElementXML element produced by MakeXmlSource(string, string, bool).
Fields
PrAxisType
Storage key Pr1006 of the axis type per axis (the AxisType ordinal): HiNC's own key, not Syntec's parameter number (on a Syntec control Pr1001~Pr1020 set each axis' fast return home). See IsStorageKeyOnly(int).
public const int PrAxisType = 1006
Field Value
PrControlledAxes
Storage key Pr1020 of the number of controlled axes: HiNC's own key, not Syntec's parameter number (Pr1020 is the 20th axis' fast return home). See IsStorageKeyOnly(int).
public const int PrControlledAxes = 1020
Field Value
PrCutterCompType
Storage key Pr5003 of the cutter compensation startup type (the CutterCompensationType ordinal): HiNC's own key, not Syntec's parameter number (on a Syntec control Pr5001~Pr5500 are user parameters, the locals #5001~#5500 of customized macros). See IsStorageKeyOnly(int).
public const int PrCutterCompType = 5003
Field Value
PrG54OffsetBase
Storage key Pr5221: base address (X) of the G54 work coordinate offset. G54.Y at +1 (Pr5222), G54.Z at +2 (Pr5223). G55..G59 follow at stride 20. The keys follow FANUC's #5221 addressing (see IsoCoordinateAddressMap), not Syntec's parameters: on a Syntec control Pr5221 and up are user parameters. See IsStorageKeyOnly(int).
public const int PrG54OffsetBase = 5221
Field Value
PrG54p1P1OffsetBase
Storage key Pr7001: base address (X) of the G54.1 P1 extended work coordinate offset. G54.1 P2..P48 follow at stride 20. The keys follow FANUC's #7001 addressing (see IsoCoordinateAddressMap), not Syntec's parameters: on a Syntec control Pr7001~Pr7200 are straightness compensation. See IsStorageKeyOnly(int).
public const int PrG54p1P1OffsetBase = 7001
Field Value
PrMaxSpindleSpeed
Storage key Pr3741 of the maximum spindle speed (RPM): HiNC's own key, not Syntec's parameter number (on a Syntec control Pr3741 is the axis ID of the first rotary axis' auxiliary brake). See IsStorageKeyOnly(int).
public const int PrMaxSpindleSpeed = 3741
Field Value
PrPeckRetraction
Pr4002: G83 peck drilling retraction distance (microns) — Syntec's own parameter, the retraction distance of drilling; convert ×0.001 for mm.
public const int PrPeckRetraction = 4002
Field Value
PrRapidRate
Storage key Pr1420 of the rapid traverse rate per axis (mm/min or deg/min): HiNC's own key, not Syntec's parameter number (on a Syntec control Pr1401~Pr1420 are each axis' mechanical compensation time constant). See IsStorageKeyOnly(int).
public const int PrRapidRate = 1420
Field Value
PrReferencePosition
Storage key Pr1240 of the G28 first reference position per axis: HiNC's own key, not Syntec's parameter number (on a Syntec control Pr1221~Pr1240 enable each axis' backlash compensation). See IsStorageKeyOnly(int).
public const int PrReferencePosition = 1240
Field Value
PrStrokeLimitNeg
Storage key Pr1320 of the negative stroke limit per axis (mm or deg): HiNC's own key, not Syntec's parameter number (a Syntec control keeps its software stroke limit 1 at Pr2401~Pr2440, and its Pr1320 is the 20th axis' pitch error compensation type). See IsStorageKeyOnly(int).
public const int PrStrokeLimitNeg = 1320
Field Value
PrStrokeLimitPos
Storage key Pr1300 of the positive stroke limit per axis (mm or deg): HiNC's own key, not Syntec's parameter number (a Syntec control keeps its software stroke limit 1 at Pr2401~Pr2440, and its Pr1300 is the 20th axis' backlash critical speed). See IsStorageKeyOnly(int).
public const int PrStrokeLimitPos = 1300
Field Value
Properties
AxisPr1006
Axis type per axis, as the AxisType ordinal, under storage key Pr1006 (PrAxisType) — not Syntec's parameter number for it, see IsStorageKeyOnly(int). See AxisNames. See IsRotaryAxis(string).
public Dictionary<string, int> AxisPr1006 { get; set; }
Property Value
AxisPr1240
G28 first reference position per axis (mm or deg), under storage key Pr1240 (PrReferencePosition) — not Syntec's parameter number for it, see IsStorageKeyOnly(int). See IHomeMcConfig. See GetHomePosition(string). See SetHomePosition(string, double).
public Dictionary<string, double> AxisPr1240 { get; set; }
Property Value
AxisPr1420
Rapid traverse rate per axis (mm/min or deg/min), under storage key Pr1420 (PrRapidRate) — not Syntec's parameter number for it, see IsStorageKeyOnly(int). See IRapidFeedrateConfig.
public Dictionary<string, double> AxisPr1420 { get; set; }
Property Value
AxisTypeParamId
Parameter/MD/MP number for axis type (linear/rotary/spindle).
protected override int AxisTypeParamId { get; }
Property Value
ControlledAxisCount
Number of controlled axes. Delegates to Pr1020.
public int ControlledAxisCount { get; set; }
Property Value
CoordinateIds
Enumerates the G-code coordinate ids that this provider currently has data for.
public IEnumerable<string> CoordinateIds { get; }
Property Value
CutterCompType
Cutter compensation startup type. Delegates to Pr5003.
public CutterCompensationType CutterCompType { get; set; }
Property Value
Default3Axis
Default 3-axis Syntec milling machine.
public static SyntecParameterTable Default3Axis { get; }
Property Value
IdAttributeName
XML attribute name for the parameter ID (“ParamId”, “MdId”, “MpId”).
protected override string IdAttributeName { get; }
Property Value
MaxSpindleSpeed_rpm
Maximum spindle speed in RPM. Delegates to Pr3741.
public double MaxSpindleSpeed_rpm { get; set; }
Property Value
PeckRetractionDistance_mm
G83 peck drilling clearance distance above the previous stroke bottom before re-entering at feed (mm).
public double PeckRetractionDistance_mm { get; }
Property Value
Remarks
Syntec Pr4002 stores peck retraction distance in microns. Multiply by 0.001 to convert to mm.
Pr1020
Number of controlled axes, under storage key Pr1020 (PrControlledAxes) — not Syntec's parameter number for it, see IsStorageKeyOnly(int). See ControlledAxisCount.
public int Pr1020 { get; set; }
Property Value
Pr3741
Maximum spindle speed (RPM), under storage key Pr3741 (PrMaxSpindleSpeed) — not Syntec's parameter number for it, see IsStorageKeyOnly(int). See MaxSpindleSpeed_rpm.
public double Pr3741 { get; set; }
Property Value
Pr5003
Cutter compensation startup type, under storage key Pr5003 (PrCutterCompType) — not Syntec's parameter number for it, see IsStorageKeyOnly(int). See CutterCompType.
public CutterCompensationType Pr5003 { get; set; }
Property Value
RapidRateParamId
Parameter/MD/MP number for rapid traverse rate per axis. Null if not defined for this controller brand.
protected override int? RapidRateParamId { get; }
Property Value
- int?
ReferencePositionParamId
Parameter/MD/MP number for reference position (G28 home).
protected override int ReferencePositionParamId { get; }
Property Value
StrokeLimitNegParamId
Parameter/MD/MP number for negative stroke limit per axis; IsStorageKeyOnly(int) marks it as a storage key rather than the controller's own number. Null if not defined for this controller brand.
protected override int? StrokeLimitNegParamId { get; }
Property Value
- int?
StrokeLimitPosParamId
Parameter/MD/MP number for positive stroke limit per axis; IsStorageKeyOnly(int) marks it as a storage key rather than the controller's own number. Null if not defined for this controller brand.
protected override int? StrokeLimitPosParamId { get; }
Property Value
- int?
XName
XML element name used to register this dependency with XFactory.
public static string XName { get; }
Property Value
Methods
DeepClone()
Returns an independent deep copy of this table (all three parameter dictionaries cloned). Used by SyntecParameterTableProxy to clone its fixed machine-config seed into a host that has no table yet.
public SyntecParameterTable DeepClone()
Returns
DescribeAxisParam(int)
Per-axis double counterpart of DescribeSystemParam(int). Covers the role ids the base class consumes (reference position, rapid rate, stroke limits); brand subclasses may override for their own vocabulary or extra numbers.
public override string DescribeAxisParam(int paramId)
Parameters
paramIdintBrand-specific parameter/MD/MP number.
Returns
DescribeSystemParam(int)
Short usage label for a well-known system parameter id, or null when the id has no modeled meaning (a raw pass-through row). Brand subclasses extend this with their own well-known numbers; the native parameter UI shows the label next to the raw id so an operator can tell the modeled parameters from free extras.
public override string DescribeSystemParam(int paramId)
Parameters
paramIdintBrand-specific parameter/MD/MP number.
Returns
IsStorageKeyOnly(int)
Whether the modeled id paramId is only a storage key of this
table: the number the table keeps its value under is known not to be the
controller's own parameter number for that value, so a value read off a real
control goes into such a row by its meaning, and in the unit the row's caption
names, never by matching the number. False does not make an id the controller's
number: only the ids known to differ are marked. The base class marks the positive and the negative stroke-limit ids;
each brand table adds the other keys it knows to differ.
public override bool IsStorageKeyOnly(int paramId)
Parameters
paramIdintBrand-specific parameter/MD/MP number, as the row that DescribeSystemParam(int), DescribeAxisParam(int) or DescribeIntAxisParam(int) describes; a number the table does not model in a section is a free extra there, whatever this answers.
Returns
- bool
True for a storage key known not to be the controller's number; false for every other id.
Remarks
Beyond the stroke-limit pair, marks the axis-type, controlled-axes, reference-position, rapid-rate, maximum-spindle-speed and cutter-compensation keys and every work-offset address: on a Syntec control those numbers hold other parameters. Pr4002 is Syntec's own number.
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public override XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)
Parameters
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif 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.
Reg(XFactory)
Registers this type's deserializer with the given XFactory
(or Default when factory is
null). Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory
SetCoordinateOffset(string, vec3d_t)
Sets the offset for the given G-code coordinate id.
public void SetCoordinateOffset(string coordId, vec3d_t offset)
Parameters
TryGetCoordinateOffset(string, out vec3d_t)
Gets the offset for the given G-code coordinate id. Returns false when no offset is configured for that id by this provider (callers iterate the next provider, or fall back to Zero).
public bool TryGetCoordinateOffset(string coordId, out vec3d_t offset)