Class NcEnv
Represents the numerical control environment containing configuration for CNC operations.
public class NcEnv : IMakeXmlSource
- Inheritance
-
NcEnv
- Implements
- Inherited Members
- Extension Methods
Constructors
NcEnv(CncBrand)
Ctor.
public NcEnv(CncBrand cncBrand = CncBrand.Fanuc)
Parameters
cncBrand
CncBrand
NcEnv(XElement, string, string)
Ctor.
public NcEnv(XElement src, string baseDirectory, string relFile)
Parameters
src
XElementXML
baseDirectory
stringThe base directory for relative paths.
relFile
stringThe relative file path.
Properties
AttacherAtMcZeroOnTableCoordinate
Gets the attacher position at machine zero on table coordinate.
public Vec3d AttacherAtMcZeroOnTableCoordinate { get; }
Property Value
CncBrand
Gets or sets the CNC brand/controller type.
public CncBrand CncBrand { get; set; }
Property Value
CommentSymbol
Gets the comment symbol used by the current CNC controller.
public string CommentSymbol { get; }
Property Value
ConfigurationTable
Gets a dictionary of CNC configuration parameters used by the system.
public Dictionary<string, int> ConfigurationTable { get; }
Property Value
CoordinateConverter
Gets or sets the coordinate converter used for transformations between different coordinate systems.
public ICoordinateConverter CoordinateConverter { get; set; }
Property Value
EnableArcCornerRadiusCompensation
Gets or sets whether arc corner radius compensation is enabled.
public bool EnableArcCornerRadiusCompensation { get; set; }
Property Value
EnableIntegerShrinkOnPositionCommand
Gets whether integer shrinking is enabled for position commands based on the CNC brand.
public bool EnableIntegerShrinkOnPositionCommand { get; }
Property Value
EnableShortestRotary
Enables shortest rotary path movement. This option does not affect Heidenhain controllers. For Heidenhain controllers, see Hi.UniNc.Heidenhain.IHeidenhainShortestRotaryPathEnabled, Hi.UniNc.Heidenhain.HeidenhainM126 and Hi.UniNc.Heidenhain.HeidenhainM127.
public bool EnableShortestRotary { get; set; }
Property Value
FanucPara5003
Fanuc 5003. These bits are used to specify the type of startup/cancellation of tool radius - tool nose radius compensation. 0: type A; 1: type B; 2,3: type C. Assume always zero.
Type A: A compensation vector perpendicular to the block next to the startup block or the block preceding the cancellation block is output. Type B: A compensation vector perpendicular to the startup block or cancellation block and an intersection vector are output. Type C: When the startup block or cancellation block specifies no movement operation, the tool is shifted by the cutter compensation amount in a direction perpendicular to the block next to the startup or the block before cancellation block.
public byte FanucPara5003 { get; set; }
Property Value
HeidenhainDatumPresetTable
For Heidenhain CYCL DEF 247 Datum Preset.
public Dictionary<int, Vec3d> HeidenhainDatumPresetTable { get; }
Property Value
Remarks
Datum Preset seems an older settings in heidenhain manual relative to Datum Shift.
HeidenhainDatumShiftTable
For Heidenhain CYCL DEF 7 Datum Shift. Also called Datum table in heidenhain manual.
public Dictionary<int, Vec3d> HeidenhainDatumShiftTable { get; }
Property Value
Remarks
Datum Preset seems an older settings in heidenhain manual relative to Datum Shift.
HeidenhainMasterAxisChar
Gets or sets the Heidenhain master rotary axis as a character (A, B, or C).
public char HeidenhainMasterAxisChar { get; set; }
Property Value
HeidenhainMasterAxisDir
The master axis determines the behaviour of SEQ command. ex. PLANE SPATIAL SPA-77.516 SPB+0 SPC-10.365 STAY SEQ-TABLE ROT The master axis is the 1st rotary axis from the tool, or the last rotary axis from the table(depending on the machine configuration). SEQ+ positions the master axis so that it assumes a positive angle. See: TNC 640 | User's ManualDIN/ISO Programming | 1/2015 p432
public int HeidenhainMasterAxisDir { get; set; }
Property Value
HomeMc
Home machine coordinate. First reference position. The position may not equal to machine zero in real Fanuc controller.
public Vec3d HomeMc { get; set; }
Property Value
IsAxisAExisted
Gets whether the A axis exists in the machine configuration.
public bool IsAxisAExisted { get; }
Property Value
IsAxisBExisted
Gets whether the B axis exists in the machine configuration.
public bool IsAxisBExisted { get; }
Property Value
IsAxisCExisted
Gets whether the C axis exists in the machine configuration.
public bool IsAxisCExisted { get; }
Property Value
IsIdealOffsetDependentOnToolHouse
Gets or sets whether the ideal offset depends on tool house position.
public bool IsIdealOffsetDependentOnToolHouse { get; set; }
Property Value
IsoCoordinateTable
ISO coordinate table. i.e., CoordinateTable For G54 series.
public IsoCoordinateTable IsoCoordinateTable { get; set; }
Property Value
MaxRotarySpeedABC_degds
For safety reason, internal use only. Maximum rotary speed in degds.
public Vec3d MaxRotarySpeedABC_degds { get; set; }
Property Value
MaxRotarySpeedABC_radds
Maximum rotary speed in rad/s.
public Vec3d MaxRotarySpeedABC_radds { get; set; }
Property Value
MaxSpindleSpeed_rpm
Gets or sets the maximum spindle speed in revolutions per minute.
public double MaxSpindleSpeed_rpm { get; set; }
Property Value
MillingToolOffsetTable
Gets or sets the milling tool offset table for tool compensation.
public MillingToolOffsetTable MillingToolOffsetTable { get; set; }
Property Value
RapidFeedrate_mmdmin
Rapid move speed in mm/min.
public double RapidFeedrate_mmdmin { get; set; }
Property Value
RapidFeedrate_mmds
Rapid move speed in mm/s.
public double RapidFeedrate_mmds { get; set; }
Property Value
RefNcLineOnInit
Gets or sets the reference NC line used during initialization.
public NcLine RefNcLineOnInit { get; set; }
Property Value
SetToolHeightCompensationOnFeatureNormal
Gets or sets whether tool height compensation should be applied based on feature normal direction.
public bool SetToolHeightCompensationOnFeatureNormal { get; set; }
Property Value
StrokeLimitABC_rad
Gets or sets the ABC axis stroke limits in radians.
public Box3d StrokeLimitABC_rad { get; set; }
Property Value
StrokeLimitXYZ_mm
Gets or sets the XYZ axis stroke limits in millimeters.
public Box3d StrokeLimitXYZ_mm { get; set; }
Property Value
ToolingMc
Gets or sets the machine coordinate for tooling operations. Defaults to HomeMc if not explicitly set.
public Vec3d ToolingMc { get; set; }
Property Value
ToolingTime
Tool changing duration in sec.
public TimeSpan ToolingTime { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
IsAxisExisted(int)
Determines whether a specific rotary axis exists in the machine configuration.
public bool IsAxisExisted(int dir)
Parameters
dir
intThe direction index (0=A, 1=B, 2=C).
Returns
- bool
True if the specified axis exists; otherwise, false.
MakeXmlSource(string, string)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public XElement MakeXmlSource(string baseDirectory, string relFile)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
Returns
- XElement
An XML element representing the object's state