188 lines
4.0 KiB
C#
188 lines
4.0 KiB
C#
///
|
|
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
|
///
|
|
namespace TBF.BenchControl
|
|
{
|
|
/// <summary>
|
|
/// Lower level measurement event provided by devices and polled by operations
|
|
/// </summary>
|
|
public enum MsrmntState
|
|
{
|
|
Valid,
|
|
Overload,
|
|
Failed,
|
|
Busy,
|
|
Busy1, ///
|
|
Busy2, /// Used by Mettler-Toledo Multi to distinguish which scale was queried
|
|
Busy3, ///
|
|
}
|
|
|
|
public enum CfgChangeCmd
|
|
{
|
|
None,
|
|
CfgChange, /// Configuation change
|
|
ValveOpen, /// Open a valve
|
|
ValveClose, /// Close a valve
|
|
RVOpenStep, /// Open a regulation valve (RV only)
|
|
RVCloseStep, /// Close a regulation valve *RV only)
|
|
DivToTank, /// Diverter to tank (Div only)
|
|
DivToSink, /// Diverter to sink (Div only)
|
|
ReadDivTransition, /// Read diverter ADC value transition
|
|
GetAdc, /// Get regul.valve or diverter ADC
|
|
GetAdc1, /// Get regul.valve or diverter ADC feedback value #1
|
|
GetAdc2, /// Get regul.valve or diverter ADC feedback value #2
|
|
}
|
|
|
|
public enum ValveCategory
|
|
{
|
|
All = 0, /// Valve will be shown in all paths
|
|
Feeding, /// Valve will be shown in Feeding paths
|
|
Bench, /// Valve will be shown in Bench paths
|
|
Output, /// Valve will be shown in Output paths
|
|
None, /// Valve will not be shown in the paths
|
|
}
|
|
|
|
public enum ValveExOperation
|
|
{
|
|
Or,
|
|
And,
|
|
}
|
|
|
|
public enum PumpProtocol
|
|
{
|
|
Modbus, /// Modbus protocol, default serial settings are 9600Bd, 8bits, NoP, 1stop
|
|
FC, /// FC protocol with Siemens address (1..31), default serial settings are 9600Bd, 8bits, PE, 1stop
|
|
}
|
|
|
|
public enum UIFlowControl
|
|
{
|
|
Continue,
|
|
Stop,
|
|
}
|
|
|
|
public enum CompoundTestType
|
|
{
|
|
Regular,
|
|
DetectionRise,
|
|
DetectionFall,
|
|
}
|
|
|
|
/// <summary>
|
|
/// StateMachine events (issued by operations, IOperation derived classes)
|
|
/// </summary>
|
|
public enum Event
|
|
{
|
|
None = 0,
|
|
Busy, /// Useful when waiting in state until at least one is busy (all are done)
|
|
Done, /// Useful when waiting in state until the first is done, the rest miht still be busy
|
|
MakeSecondPass, /// Test completed OK but 2nd pass (evaluation) is required
|
|
///
|
|
ModelessFormIsOpen,
|
|
ModelessFormClosed,
|
|
|
|
ValvesBusy,
|
|
ValvesSet,
|
|
|
|
AmbientDone,
|
|
BalanceDone,
|
|
BalanceOverload,
|
|
PressureDone,
|
|
PressureInDone,
|
|
PressureOutDone,
|
|
TempDone,
|
|
TempInDone,
|
|
TempOutDone,
|
|
TempDivDone,
|
|
LevelDone,
|
|
VolumeDone,
|
|
FlowMeasurementDone,
|
|
FlowReached,
|
|
PositionReached,
|
|
RegulValveTimeOut, /// Maximum allowed flow setting time has elapsed
|
|
ReadRegisterDone,
|
|
ReadReferenceDone,
|
|
AllPositionsReached, /// Used in SetAllRegulValvesOp
|
|
TurnPumpOnOffDone,
|
|
|
|
/// CheckUi events
|
|
UiCmdReloadBatch,
|
|
UiCmdStartTest,
|
|
UiCmdStartQ1,
|
|
UiCmdStartQ2,
|
|
UiCmdStartQ3,
|
|
UiCmdStartCycle,
|
|
UiCmdStop,
|
|
UiCmdPurgeBegin,
|
|
UiCmdPurgeEnd,
|
|
UiCmdDrainTank1,
|
|
UiCmdDrainTank2,
|
|
UiCmdDrainTank3,
|
|
UiCmdStopDrainingTank1,
|
|
UiCmdStopDrainingTank2,
|
|
UiCmdStopDrainingTank3,
|
|
UiCmdBreak,
|
|
UiCmdResetResults,
|
|
UiCmdAcceptResults,
|
|
UiCmdShutdown,
|
|
UiCmdCameraTest,
|
|
UiCmdSensitivityTest,
|
|
UiCmdCustom,
|
|
UiCmdB1,
|
|
UiCmdB2,
|
|
UiCmdB3,
|
|
|
|
/// Process/Test oriented
|
|
PreviousStopped,
|
|
Wait,
|
|
ProcedureLoaded,
|
|
MeasurementStarted,
|
|
ReadAllRegistersDone,
|
|
MeasurementCompleted,
|
|
CommandCompleted,
|
|
|
|
/// At the end of cycle when saving /printing resultss
|
|
ResultsPrinted,
|
|
ResultsWritten,
|
|
ResultsNotWritten,
|
|
|
|
/// Timer events
|
|
TimerExpired,
|
|
|
|
/// Process camera events
|
|
CameraBusy,
|
|
GrabPassed,
|
|
GrabFailed,
|
|
RoiDetectionPassed,
|
|
RoiDetectionFailed,
|
|
RoiDetectionPreviousFailed,
|
|
|
|
/// Generic
|
|
Error, /// Many ops.: Fatal error occurred
|
|
OpArgumentError,
|
|
ConfigurationError,
|
|
Yes,
|
|
No,
|
|
Next, /// To move to the next state when debugging
|
|
OK,
|
|
Retry,
|
|
Abort,
|
|
TimerBusy,
|
|
SetOutputsDone,
|
|
|
|
/// Sequence conditions
|
|
ConditionNotMet,
|
|
ConditionMet,
|
|
|
|
/// Outer loop control
|
|
OuterLoopStart,
|
|
OuterLoopEnd,
|
|
|
|
/// Production tracing
|
|
CheckDone,
|
|
CheckNotDone,
|
|
|
|
/// Error evaluation
|
|
ErrorConditionsDone,
|
|
}
|
|
}
|