Table of Contents

Class NcStepMonitor

Namespace
Hi.Numerical
Assembly
HiMech.dll

Monitors NC steps and provides functionality for step tracking and control.

public class NcStepMonitor : IMakeXmlSource
Inheritance
NcStepMonitor
Implements
Inherited Members
Extension Methods

Constructors

NcStepMonitor()

Initializes a new instance of the NcStepMonitor class.

public NcStepMonitor()

NcStepMonitor(XElement, string, IColorGuide)

Initializes a new instance of the NcStepMonitor class from XML.

public NcStepMonitor(XElement src, string baseDirectory, IColorGuide colorGuide)

Parameters

src XElement

The XML source element.

baseDirectory string

The base directory for resolving relative paths.

colorGuide IColorGuide

The color guide instance.

Fields

XName

Gets the XML element name for serialization.

public static string XName

Field Value

string

Properties

EnableReAsignWorkTimeFromBeginingTime

If true, set WorkTime by controller; Otherwise, set WorkTime from the first run of Hi.Numerical.INcStepMonitee.AquireNcStep to the current run.

public bool EnableReAsignWorkTimeFromBeginingTime { get; set; }

Property Value

bool

IgnoreRepeatedStep

Gets or sets a value indicating whether repeated steps should be ignored.

public bool IgnoreRepeatedStep { get; set; }

Property Value

bool

IsRunning

Gets a value indicating whether the monitoring task is currently running.

public bool IsRunning { get; }

Property Value

bool

IsSaveNcStepProviderOnXElement

Gets or sets a value indicating whether the NcStepMonitee should be saved in XML.

public bool IsSaveNcStepProviderOnXElement { get; set; }

Property Value

bool

NcStepMonitee

Gets or sets the NC step monitee instance.

public INcStepMonitee NcStepMonitee { get; set; }

Property Value

INcStepMonitee

Period

Gets or sets the monitoring period.

public TimeSpan Period { get; set; }

Property Value

TimeSpan

Methods

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 string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

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.

Reset()

Resets the monitor.

public void Reset()

Start()

Starts the monitoring task.

public void Start()

Stop()

Stops the monitoring task.

public void Stop()

Events

BeginOnRunningTaskEventHandler

Event raised when the monitoring task begins running.

public event EventHandler BeginOnRunningTaskEventHandler

Event Type

EventHandler

EndOnRunningTaskEventHandler

Event raised when the monitoring task ends running.

public event EventHandler EndOnRunningTaskEventHandler

Event Type

EventHandler

ExceptionEventHandler

Event raised when an exception occurs during monitoring.

public event EventHandler<Exception> ExceptionEventHandler

Event Type

EventHandler<Exception>

ResetedEventHandler

Event raised when the monitor is reset.

public event EventHandler ResetedEventHandler

Event Type

EventHandler

StepAccptedEventHandler

Event raised when a step is accepted by the monitor.

public event EventHandler<INcStep0> StepAccptedEventHandler

Event Type

EventHandler<INcStep0>