108 lines
3.2 KiB
C#
108 lines
3.2 KiB
C#
///
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
|
|
namespace TBF.BenchControl.Elde
|
|
{
|
|
public enum Command
|
|
{
|
|
None = 0, /// Do nothing, just transfer data (route, etc.)
|
|
Start = 1, /// Start the measurement
|
|
Stop = 2, /// Stop the measurement
|
|
ReadDivTransition = 4,
|
|
ReadExtremasOfPulses = 6,
|
|
ReadShapesOfPulses = 7,
|
|
ResetShapesOfPulses = 8,
|
|
}
|
|
|
|
#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || IPERLST || BADGER_VELKA_TRAT || PUCHONG_PT200
|
|
public enum StatusP : ulong
|
|
{
|
|
RefFlowMeterMask = 0x7,
|
|
TestCompleted = 0x10,
|
|
TestInProgress = 0x20,
|
|
//DiverterError = 0x20,
|
|
MsrmntWithDivrtr = 0x80,
|
|
RefPulsesMsrmnt = 0x100, /// bit 8
|
|
SynchroMethod = 0x800, /// bit 11
|
|
WaterMeterCalib = 0x1000, /// bit 12
|
|
EmgcyStopActive = 0x2000,
|
|
MsrmntGateActive = 0x4000,
|
|
TimeMeasurement = 0x8000,
|
|
FrequencyMeasured = 0x80000, /// bit 19
|
|
CoaxRegValveBusy = 0x200000, /// bit 21
|
|
ADCError = 0x80000000,
|
|
TimeoutOccured = 0x100000000,
|
|
MeretAddresses = 0x200000000,
|
|
SampleBuferFull = 0x400000000,
|
|
ErrorTempMeter = 0x10000000000,
|
|
ErrorPressMeter1 = 0x1000000000000,
|
|
ErrorPressMeter2 = 0x2000000000000,
|
|
ErrorPressMeter3 = 0x4000000000000,
|
|
ErrorPressMeter4 = 0x8000000000000,
|
|
}
|
|
#else // DN100 || MUNICH || FUZHOU150 || TORUN_PT50_2015 || CEVAK_PT40_272 || MURES_PT40 || FUZHOU_40
|
|
public enum StatusP : ulong
|
|
{
|
|
RefFlowMeterMask = 0x7,
|
|
TestInProgress = 0x8,
|
|
TestCompleted = 0x10,
|
|
DiverterError = 0x20,
|
|
MsrmntWithDivrtr = 0x80,
|
|
RefPulsesMsrmnt = 0x100,
|
|
SynchroMethod = 0x800,
|
|
WaterMeterCalib = 0x1000,
|
|
EmgcyStopActive = 0x2000,
|
|
MsrmntGateActive = 0x4000,
|
|
TimeMeasurement = 0x8000,
|
|
FrequencyMeasured = 0x80000,
|
|
CoaxRegValveBusy = 0x200000, /// bit 21
|
|
ADCError = 0x80000000,
|
|
TimeoutOccured = 0x100000000,
|
|
MeretAddresses = 0x200000000,
|
|
SampleBuferFull = 0x400000000,
|
|
ErrorTempMeter = 0x10000000000,
|
|
ErrorPressMeter1 = 0x1000000000000,
|
|
ErrorPressMeter2 = 0x2000000000000,
|
|
ErrorPressMeter3 = 0x4000000000000,
|
|
ErrorPressMeter4 = 0x8000000000000,
|
|
}
|
|
#endif
|
|
|
|
public enum StopDevs
|
|
{
|
|
None = 0,
|
|
Reference = 0x01,
|
|
Diverter = 0x02,
|
|
GatePulse = 0x08,
|
|
TimeMeasurement = 0x10,
|
|
BypassDevCoupled2Div = 0x20,
|
|
RegValveRegulation = 0x80,
|
|
All = 0xFF,
|
|
}
|
|
|
|
public enum TestMethods
|
|
{
|
|
Diverter = 0x01, /// 0x01 = Mass method (diverters are used), 0 = Volume method
|
|
FixedStart = 0x02,
|
|
Synchro = 0x04, /// 0x02 = Synchro method, 0 = Pulse counting
|
|
}
|
|
|
|
public enum RegulValveMode : byte
|
|
{
|
|
None = 0,
|
|
PulseWidth = 1, /// Pulse width 0.05 .. 2 sec.
|
|
TargetPosition = 2, /// Low and high position (=DAC value) limits (0..100%) are specified
|
|
TargetFrequency = 3, /// Low and high frequency limits (0..2000Hz,0..2200Hz) are specified
|
|
Stop = 4, /// Stop regulation
|
|
}
|
|
|
|
public enum RegulValveState
|
|
{
|
|
Idle = 0,
|
|
PwOrFreqRegul = 2,
|
|
DacValueRegul = 3,
|
|
}
|
|
}
|