Program extended for BADGER_MALA_TRAT

This commit is contained in:
Milan Hanajik 2015-04-15 22:03:23 +02:00
parent f84f3f1f0e
commit 7f059d9c6f
8 changed files with 27 additions and 14 deletions

View File

@ -1,3 +1,6 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
using System.IO;
using System.Collections.Generic;
@ -31,7 +34,7 @@ namespace ResultsBrowser
#if (DN100 || MUNICH)
public const int WMsCount = 3;
#else // if FUZHOU300|| FUZHOU150 || PT200IL || TORINO50
#else // if FUZHOU300|| FUZHOU150 || PT200IL || TORINO50 || BADGER_MALA_TRAT
public const int WMsCount = 6;
#endif

View File

@ -12,7 +12,7 @@ namespace TBF.BenchControl.Elde
Stop = 2, /// Stop the measurement
}
#if FUZHOU300 || PT200IL || TORINO50
#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT
public enum StatusP : ulong
{
RefFlowMeterMask = 0x7,

View File

@ -83,7 +83,7 @@ namespace TBF.BenchControl.Elde
// Array length is the reference flowmeters count plus one
#if DN100
public float[] EtCalib = new float[6] { 1, 1, 1, 1, 1, 1 };
#elif MUNICH || TORINO50
#elif MUNICH || TORINO50 || BADGER_MALA_TRAT
public float[] EtCalib = new float[5] { 1, 1, 1, 1, 1 };
#elif FUZHOU150 || FUZHOU300 || PT200IL
public float[] EtCalib = new float[6] { 1, 1, 1, 1, 1, 1 };
@ -173,6 +173,8 @@ namespace TBF.BenchControl.Elde
ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent,
#elif TORINO50
ControlComponent_Torino2015.UserControl1 ctrlBrdComponent,
#elif BADGER_MALA_TRAT
ControlComponent_Torino2015.UserControl1 ctrlBrdComponent,
#endif
ulong valvesToInvert,
float[] tankCapacities)

View File

@ -14,7 +14,7 @@ namespace TBF.BenchControl.Elde
/// Properties
///
public StatusP StatusP { get { return (StatusP)ctrlBrdComponent.StatusP; } }
#if FUZHOU300 || PT200IL || TORINO50
#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT
/// <summary>
/// In case of I11, I12
/// referenceFreq[0] = I11 + I12
@ -25,7 +25,7 @@ namespace TBF.BenchControl.Elde
/// </summary>
public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq[0]; } } /// In [Hz] 0..2500, nom.=2000
#else
public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq; } } /// In [Hz] 0..2500, nom.=2000
public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq; } } /// In [Hz] 0..2500, nom.=2000
#endif
public int EtPulses(int wmNr0)
{
@ -43,7 +43,7 @@ namespace TBF.BenchControl.Elde
public ulong RRoute { get { return ctrlBrdComponent.rRoute; } }
public uint DivTime { get { return ctrlBrdComponent.divTime; } }
public float TTime { get { return ctrlBrdComponent.Ttime; } }
#if FUZHOU300 || PT200IL || TORINO50
#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT
public uint FmState { get { return ctrlBrdComponent.fMState[0]; } } /// TODO: index
#else
public uint FmState { get { return ctrlBrdComponent.fMState; } }
@ -80,9 +80,11 @@ namespace TBF.BenchControl.Elde
private ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent;
#elif TORINO50
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
#elif BADGER_MALA_TRAT
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
#endif
/// <summary>
/// <summary>
/// Constructor that initializes the control board component reference
/// </summary>
/// <param name="ctrlBrdComponent"></param>
@ -98,8 +100,10 @@ namespace TBF.BenchControl.Elde
public ControlComWrap(ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent)
#elif TORINO50
public ControlComWrap(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
#elif BADGER_MALA_TRAT
public ControlComWrap(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
#endif
{
{
this.ctrlBrdComponent = ctrlBrdComponent;
}
@ -181,10 +185,10 @@ namespace TBF.BenchControl.Elde
// valveValue[0],
// valveValue[1]));
log.InfoFormat("ValveMove(#={0}, md={1}, [{2}, {3}])", valveNo, valveMode, valveValue[0], valveValue[1]);
#if FUZHOU300 || PT200IL || TORINO50
#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT
ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue, stableTime);
#else
ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue);
ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue);
#endif
}

View File

@ -192,8 +192,10 @@ namespace TBF.BenchControl
public static void InitializeBoardEtc(ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent)
#elif TORINO50
public static void InitializeBoardEtc(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
#elif BADGER_MALA_TRAT
public static void InitializeBoardEtc(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
#endif
{
{
/// Load the list of components (entities) from the database.
/// Then create the components (derived from IComponent).
components = BenchControl.TbfComponents.LoadComponentsFromDB(FluentCommon.CreateSession(Database.Bench));

View File

@ -585,9 +585,11 @@ namespace TBF
private ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent;
#elif TORINO50
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
#elif BADGER_MALA_TRAT
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
#endif
private System.Windows.Forms.ToolStripMenuItem benchTSMenuItem;
private System.Windows.Forms.ToolStripMenuItem benchTSMenuItem;
private System.Windows.Forms.ToolStripMenuItem homeTSMenuItem;
private System.Windows.Forms.ToolStripMenuItem measurementTSMenuItem;
private System.Windows.Forms.ToolStripMenuItem resultsTSMenuItem;

View File

@ -36,11 +36,11 @@ namespace TBF
#if DN100 || MUNICH
public const int WMsCount = 3;
#else // FUZHOU300, FUZHOU150, PT200IL, TORINO50
#else // if FUZHOU300 || FUZHOU150 || PT200IL || TORINO50 || BADGER_MALA_TRAT
public const int WMsCount = 6;
#endif
/// <summary>
/// <summary>
/// Selected procedure data
/// - before the main program window is open, objects referenced by this variable
/// are loaded from the database.