113 lines
3.9 KiB
C#
113 lines
3.9 KiB
C#
///
|
|
/// Copyright (c) 2013-2016 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,
|
|
EnduranceCycleParamsUpload = 11,
|
|
EnduranceCycleStart = 12,
|
|
EnduranceCycleStop = 13,
|
|
}
|
|
|
|
#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TURA_IPERL || TURA_SPECIAL || BADGER_VELKA_TRAT || PUCHONG_PT200 || SLM_50 || GENESIS || MALTA_WSD25 || SLM_END || WARSAW_END || BERLIN || SLM_150 || PETERSBURG_50 || PETERSBURG_200 || KEMPNO_50 || BAHRAIN_50
|
|
public enum StatusP : ulong
|
|
{
|
|
RefFlowMeterMask = 0x7,
|
|
TestCompleted = 0x10, /// bit 4
|
|
TestInProgress = 0x20, /// bit 5
|
|
//DiverterError = 0x20,
|
|
MsrmntWithDivrtr = 0x80, /// bit 7
|
|
RefPulsesMsrmnt = 0x100, /// bit 8
|
|
SynchroMethod = 0x800, /// bit 11
|
|
WaterMeterCalib = 0x1000, /// bit 12
|
|
EmgcyStopActive = 0x2000, /// bit 13
|
|
MsrmntGateActive = 0x4000, /// bit 14
|
|
TimeMeasurement = 0x8000, /// bit 15
|
|
FrequencyMeasured = 0x80000, /// bit 19
|
|
CoaxRegValveBusy = 0x200000, /// bit 21
|
|
ADCError = 0x80000000, /// bit 31
|
|
TimeoutOccured = 0x100000000, /// bit 32
|
|
MeretAddresses = 0x200000000, /// bit 33
|
|
SampleBuferFull = 0x400000000, /// bit 34
|
|
ErrorTempMeter = 0x10000000000, /// bit 40
|
|
ErrorPressMeter1 = 0x1000000000000, /// bit 48
|
|
ErrorPressMeter2 = 0x2000000000000, /// bit 49
|
|
ErrorPressMeter3 = 0x4000000000000, /// bit 50
|
|
ErrorPressMeter4 = 0x8000000000000, /// bit 51
|
|
EndurCycleRunning = 0x200000000000000, /// bit 57
|
|
}
|
|
#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, /// bit 0
|
|
Diverter = 0x02, /// bit 1
|
|
GatePulse = 0x08, /// bit 3
|
|
TimeMeasurement = 0x10, /// bit 4
|
|
BypassDevCoupled2Div = 0x20, /// bit 5
|
|
RegValveRegulation = 0x80, /// bit 7
|
|
All = 0xFF,
|
|
}
|
|
|
|
public enum TestMethods
|
|
{
|
|
Diverter = 0x01, /// bit 0: 1=Mass method (diverters are used), 0=Volume method
|
|
FixedStart = 0x02, /// bit 1: 1=fixed start method, 0=flying start method
|
|
Synchro = 0x04, /// bit 2: 1=Synchro method, 0=Pulse counting
|
|
MassAndContinue = 0x08, /// bit 3: 1=Method with mass measurement followed by a volume method
|
|
}
|
|
|
|
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,
|
|
}
|
|
}
|