2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
|
|
|
|
///
|
|
|
|
|
|
namespace TBF.BenchControl
|
2014-07-28 07:54:35 +00:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Lower level measurement event provided by devices and polled by operations
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public enum MsrmntState
|
|
|
|
|
|
{
|
|
|
|
|
|
Valid,
|
|
|
|
|
|
Overload,
|
|
|
|
|
|
Failed,
|
|
|
|
|
|
Busy,
|
2016-01-26 12:43:47 +00:00
|
|
|
|
Busy1, ///
|
|
|
|
|
|
Busy2, /// Used by Mettler-Toledo Multi to distinguish which scale was queried
|
|
|
|
|
|
Busy3, ///
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Flags returned by each device configuration control Verify(...) function.
|
|
|
|
|
|
/// </summary>
|
2015-01-02 22:42:01 +00:00
|
|
|
|
public enum CfgUpdateFlags
|
2014-07-28 07:54:35 +00:00
|
|
|
|
{
|
|
|
|
|
|
None = 0,
|
2017-02-15 11:11:06 +00:00
|
|
|
|
Error = 0x1, /// Some settings in the user control are invalid and cannot be set
|
|
|
|
|
|
Warning = 0x02, /// Some settings in the user control are suspicious, can be set after user confirmation
|
|
|
|
|
|
RestartRqrd = 0x04, /// TBF program restart is required to apply all changed parameters
|
|
|
|
|
|
AnyChange = 0x08, /// At least one parameter have changed
|
|
|
|
|
|
InvokeCfgChange = 0x10, /// Invoke CfgChange handler of the component
|
2015-01-02 22:42:01 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum CfgChangeCmd
|
|
|
|
|
|
{
|
|
|
|
|
|
None,
|
2017-01-17 15:49:47 +00:00
|
|
|
|
CfgChange, /// Configuation change
|
2015-01-02 22:42:01 +00:00
|
|
|
|
ValveOpen, /// Open a valve
|
|
|
|
|
|
ValveClose, /// Close a valve
|
2015-06-12 16:02:19 +00:00
|
|
|
|
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
|
2015-06-12 14:39:57 +00:00
|
|
|
|
GetAdc1, /// Get regul.valve or diverter ADC feedback value #1
|
|
|
|
|
|
GetAdc2, /// Get regul.valve or diverter ADC feedback value #2
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2014-09-02 16:10:16 +00:00
|
|
|
|
public enum ValveCategory
|
|
|
|
|
|
{
|
2015-02-20 10:37:09 +00:00
|
|
|
|
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
|
2014-09-02 16:10:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-29 09:26:08 +00:00
|
|
|
|
public enum ValveExOperation
|
|
|
|
|
|
{
|
|
|
|
|
|
Or,
|
|
|
|
|
|
And,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-02-18 15:19:37 +00:00
|
|
|
|
public enum PumpProtocol
|
|
|
|
|
|
{
|
2015-02-20 10:37:09 +00:00
|
|
|
|
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
|
2015-02-18 15:19:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 02:45:04 +00:00
|
|
|
|
public enum UIFlowControl
|
|
|
|
|
|
{
|
|
|
|
|
|
Continue,
|
|
|
|
|
|
Stop,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-09-24 06:54:59 +00:00
|
|
|
|
public enum CompoundTestType
|
|
|
|
|
|
{
|
|
|
|
|
|
Regular,
|
|
|
|
|
|
DetectionRise,
|
|
|
|
|
|
DetectionFall,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2014-07-28 07:54:35 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// StateMachine events (issued by operations, IOperation derived classes)
|
|
|
|
|
|
/// </summary>
|
2015-03-01 09:19:00 +00:00
|
|
|
|
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
|
|
|
|
|
|
///
|
|
|
|
|
|
ModelessFormIsOpen,
|
|
|
|
|
|
ModelessFormClosed,
|
2014-12-10 11:36:57 +00:00
|
|
|
|
|
2015-03-01 09:19:00 +00:00
|
|
|
|
ValvesBusy,
|
|
|
|
|
|
ValvesSet,
|
2014-12-10 11:36:57 +00:00
|
|
|
|
|
2015-03-01 09:19:00 +00:00
|
|
|
|
AmbientDone,
|
|
|
|
|
|
BalanceDone,
|
|
|
|
|
|
BalanceOverload,
|
|
|
|
|
|
PressureDone,
|
|
|
|
|
|
PressureInDone,
|
|
|
|
|
|
PressureOutDone,
|
|
|
|
|
|
TempDone,
|
|
|
|
|
|
TempInDone,
|
|
|
|
|
|
TempOutDone,
|
|
|
|
|
|
TempDivDone,
|
|
|
|
|
|
FlowMeasurementDone,
|
|
|
|
|
|
FlowReached,
|
|
|
|
|
|
PositionReached,
|
|
|
|
|
|
RegulValveTimeOut, /// Maximum allowed flow setting time has elapsed
|
|
|
|
|
|
ReadRegisterDone,
|
|
|
|
|
|
ReadReferenceDone,
|
|
|
|
|
|
AllPositionsReached, /// Used in SetAllRegulValvesOp
|
|
|
|
|
|
TurnPumpOnOffDone,
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2015-03-01 09:19:00 +00:00
|
|
|
|
/// CheckUi events
|
|
|
|
|
|
UiCmdStartTest,
|
|
|
|
|
|
UiCmdStartQ1,
|
|
|
|
|
|
UiCmdStartQ2,
|
|
|
|
|
|
UiCmdStartQ3,
|
|
|
|
|
|
UiCmdStartCycle,
|
|
|
|
|
|
UiCmdStop,
|
|
|
|
|
|
UiCmdPurgeBegin,
|
|
|
|
|
|
UiCmdPurgeEnd,
|
|
|
|
|
|
UiCmdEmptyTank1,
|
|
|
|
|
|
UiCmdEmptyTank2,
|
|
|
|
|
|
UiCmdEmptyTank3,
|
2015-05-22 14:43:17 +00:00
|
|
|
|
UiCmdBreak,
|
2015-03-01 09:19:00 +00:00
|
|
|
|
UiCmdResetResults,
|
|
|
|
|
|
UiCmdAcceptResults,
|
|
|
|
|
|
UiCmdCalibration,
|
|
|
|
|
|
UiCmdCameraTest,
|
|
|
|
|
|
UiCmdSensitivityTest,
|
|
|
|
|
|
UiCmdB1,
|
|
|
|
|
|
UiCmdB2,
|
|
|
|
|
|
UiCmdB3,
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2015-03-01 09:19:00 +00:00
|
|
|
|
/// Process/Test oriented
|
|
|
|
|
|
PreviousStopped,
|
|
|
|
|
|
Wait,
|
|
|
|
|
|
ProcedureLoaded,
|
|
|
|
|
|
MeasurementStarted,
|
|
|
|
|
|
ReadAllRegistersDone,
|
|
|
|
|
|
MeasurementCompleted,
|
2016-12-08 10:25:52 +00:00
|
|
|
|
CommandCompleted,
|
2016-01-08 18:18:45 +00:00
|
|
|
|
|
|
|
|
|
|
/// At the end of cycle when saving /printing resultss
|
2015-03-01 09:19:00 +00:00
|
|
|
|
ResultsPrinted,
|
|
|
|
|
|
ResultsWritten,
|
2016-01-08 18:18:45 +00:00
|
|
|
|
ResultsNotWritten,
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2015-03-01 09:19:00 +00:00
|
|
|
|
/// Timer events
|
|
|
|
|
|
TimerExpired,
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2015-03-01 09:19:00 +00:00
|
|
|
|
/// IDC camera events
|
|
|
|
|
|
CameraBusy,
|
|
|
|
|
|
CameraOpCompleted,
|
|
|
|
|
|
CameraOpFailed,
|
2017-01-13 18:12:28 +00:00
|
|
|
|
RoiDetectionPassed,
|
|
|
|
|
|
RoiDetectionFailed,
|
2017-01-14 13:44:03 +00:00
|
|
|
|
RoiDetectionPreviousFailed,
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2015-03-01 09:19:00 +00:00
|
|
|
|
/// Generic
|
|
|
|
|
|
Error, /// Many ops.: Fatal error occurred
|
|
|
|
|
|
OpArgumentError,
|
|
|
|
|
|
ConfigurationError,
|
|
|
|
|
|
Yes,
|
|
|
|
|
|
No,
|
|
|
|
|
|
Next, /// To move to the next state when debugging
|
|
|
|
|
|
OK,
|
|
|
|
|
|
TimerBusy,
|
2015-07-31 08:45:50 +00:00
|
|
|
|
SetOutputsDone,
|
2016-12-10 10:30:57 +00:00
|
|
|
|
|
2017-02-11 21:27:18 +00:00
|
|
|
|
/// Sequence conditions
|
|
|
|
|
|
ConditionNotMet,
|
|
|
|
|
|
ConditionMet,
|
|
|
|
|
|
|
2016-12-10 10:30:57 +00:00
|
|
|
|
/// Outer loop control
|
|
|
|
|
|
OuterLoopStart,
|
|
|
|
|
|
OuterLoopNext,
|
|
|
|
|
|
OuterLoopEnd,
|
2015-03-01 09:19:00 +00:00
|
|
|
|
}
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|