Defines re-arranged so that new benches do not require any modification, bug in BADGER fixed.
This commit is contained in:
@@ -31,13 +31,27 @@ namespace ResultsBrowser
|
|||||||
/// Database related: This object reference is set after a successful user login
|
/// Database related: This object reference is set after a successful user login
|
||||||
public static DatabaseSettings CurrentBench;
|
public static DatabaseSettings CurrentBench;
|
||||||
const string SQLiteDbFName = "SQLite.db";
|
const string SQLiteDbFName = "SQLite.db";
|
||||||
|
|
||||||
#if (DN100 || MUNICH)
|
#if DN100 || MUNICH
|
||||||
public const int WMsCount = 3;
|
public const int WMsCount = 3;
|
||||||
#elif FUZHOU300 || FUZHOU150 || PT200IL || TORINO50 || BADGER_MALA_TRAT
|
public const int LineSize = 3;
|
||||||
|
public const int CompoundWMsCount = 1;
|
||||||
|
#elif FUZHOU300 || FUZHOU150 || PT200IL
|
||||||
public const int WMsCount = 6;
|
public const int WMsCount = 6;
|
||||||
#elif TORUN_PT50_2015
|
public const int LineSize = 6;
|
||||||
|
public const int CompoundWMsCount = 3;
|
||||||
|
#elif TORINO50 || BADGER_MALA_TRAT
|
||||||
|
public const int WMsCount = 6;
|
||||||
|
public const int LineSize = 6;
|
||||||
|
public const int CompoundWMsCount = 1;
|
||||||
|
#elif TORUN_PT50_2015 || CEVAK_PT40_272
|
||||||
public const int WMsCount = 20;
|
public const int WMsCount = 20;
|
||||||
|
public const int LineSize = 10;
|
||||||
|
public const int CompoundWMsCount = 1;
|
||||||
|
#elif IPERLST
|
||||||
|
public const int WMsCount = 40;
|
||||||
|
public const int LineSize = 20;
|
||||||
|
public const int CompoundWMsCount = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -118,13 +118,12 @@ namespace TBF.BenchControl.Elde
|
|||||||
public float[,] TempCalibData = new float[8, 5];
|
public float[,] TempCalibData = new float[8, 5];
|
||||||
|
|
||||||
// Array length is the reference flowmeters count plus one
|
// Array length is the reference flowmeters count plus one
|
||||||
#if DN100
|
#if DN100 || FUZHOU150 || FUZHOU300 || PT200IL
|
||||||
public float[] EtCalib = new float[6] { 1, 1, 1, 1, 1, 1 };
|
public float[] EtCalib = new float[6] { 1, 1, 1, 1, 1, 1 };
|
||||||
#elif MUNICH || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST
|
#elif MUNICH || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST
|
||||||
public float[] EtCalib = new float[5] { 1, 1, 1, 1, 1 };
|
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 };
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public uint[] DiverterEdge = new uint[2] { 50, 50 };
|
public uint[] DiverterEdge = new uint[2] { 50, 50 };
|
||||||
public uint[] BalanceRange = new uint[2];
|
public uint[] BalanceRange = new uint[2];
|
||||||
|
|
||||||
@@ -151,11 +150,12 @@ namespace TBF.BenchControl.Elde
|
|||||||
/// <param name="power">Power (0.0f .. 100.0f)</param>
|
/// <param name="power">Power (0.0f .. 100.0f)</param>
|
||||||
public void SetFMFreq(int index, float power)
|
public void SetFMFreq(int index, float power)
|
||||||
{
|
{
|
||||||
#if FUZHOU300 || PT200IL || IPERLST
|
#if DN100 || MUNICH || FUZHOU150
|
||||||
if ((FMFreq == null) || (FMFreq.Length != 6)) FMFreq = new float[6];
|
|
||||||
#else
|
|
||||||
if ((FMFreq == null) || (FMFreq.Length != 2)) FMFreq = new float[2];
|
if ((FMFreq == null) || (FMFreq.Length != 2)) FMFreq = new float[2];
|
||||||
|
#else /// all newer benches
|
||||||
|
if ((FMFreq == null) || (FMFreq.Length != 6)) FMFreq = new float[6];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (index >= 0 && index < FMFreq.Length) FMFreq[index] = power;
|
if (index >= 0 && index < FMFreq.Length) FMFreq[index] = power;
|
||||||
log.DebugFormat("FMFreq=[{0}{1}{2}{3}{4}{5}]",
|
log.DebugFormat("FMFreq=[{0}{1}{2}{3}{4}{5}]",
|
||||||
FMFreq[0].ToString(),
|
FMFreq[0].ToString(),
|
||||||
@@ -192,10 +192,10 @@ namespace TBF.BenchControl.Elde
|
|||||||
{
|
{
|
||||||
controlBoardCfg = cfg;
|
controlBoardCfg = cfg;
|
||||||
|
|
||||||
#if FUZHOU300 || PT200IL || IPERLST
|
#if DN100 || MUNICH || FUZHOU150
|
||||||
FMFreq = new float[6] { 0, 0, 0, 0, 0, 0 }; /// Nr. of pumps: Fuzhou150=2, Fuzhou300,PT200IL=6
|
FMFreq = new float[2] { 0, 0 }; /// Nr. of pumps: Fuzhou150=2, Fuzhou300=6, newer=6
|
||||||
#else
|
#else /// all newer benches
|
||||||
FMFreq = new float[2] { 0, 0 }; /// Nr. of pumps: Fuzhou150=2, Fuzhou300=6
|
FMFreq = new float[6] { 0, 0, 0, 0, 0, 0 };
|
||||||
#endif
|
#endif
|
||||||
emergencyStop = false;
|
emergencyStop = false;
|
||||||
previousEmergencyStop = false;
|
previousEmergencyStop = false;
|
||||||
@@ -227,11 +227,7 @@ namespace TBF.BenchControl.Elde
|
|||||||
ControlComponent3F300.UserControl1 ctrlBrdComponent,
|
ControlComponent3F300.UserControl1 ctrlBrdComponent,
|
||||||
#elif PT200IL
|
#elif PT200IL
|
||||||
ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent,
|
ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent,
|
||||||
#elif TORINO50
|
#else /// all newer benches
|
||||||
ControlComponent_Torino2015.UserControl1 ctrlBrdComponent,
|
|
||||||
#elif BADGER_MALA_TRAT
|
|
||||||
ControlComponent_Torino2015.UserControl1 ctrlBrdComponent,
|
|
||||||
#elif TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST
|
|
||||||
ControlComponent_Torino2015.UserControl1 ctrlBrdComponent,
|
ControlComponent_Torino2015.UserControl1 ctrlBrdComponent,
|
||||||
#endif
|
#endif
|
||||||
ulong valvesToInvert,
|
ulong valvesToInvert,
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ namespace TBF.BenchControl.Elde
|
|||||||
/// Properties
|
/// Properties
|
||||||
///
|
///
|
||||||
public StatusP StatusP { get { return (StatusP)ctrlBrdComponent.StatusP; } }
|
public StatusP StatusP { get { return (StatusP)ctrlBrdComponent.StatusP; } }
|
||||||
#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST
|
#if DN100 || MUNICH || FUZHOU150
|
||||||
|
public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq; } } /// In [Hz] 0..2500, nom.=2000
|
||||||
|
#else /// all newer benches
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// In case of I11, I12
|
/// In case of I11, I12
|
||||||
/// referenceFreq[0] = I11 + I12
|
/// referenceFreq[0] = I11 + I12
|
||||||
@@ -24,8 +26,6 @@ namespace TBF.BenchControl.Elde
|
|||||||
/// referenceFreq[0] = I2 or I3 or I4
|
/// referenceFreq[0] = I2 or I3 or I4
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq[0]; } } /// In [Hz] 0..2500, nom.=2000
|
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
|
|
||||||
#endif
|
#endif
|
||||||
public int EtPulses(int wmNr0) { return (int)ctrlBrdComponent.etPulses[wmNr0]; }
|
public int EtPulses(int wmNr0) { return (int)ctrlBrdComponent.etPulses[wmNr0]; }
|
||||||
public UInt16 WMeterPulses(int wmNr0) { return (UInt16)ctrlBrdComponent.wMeterPuls[wmNr0]; }
|
public UInt16 WMeterPulses(int wmNr0) { return (UInt16)ctrlBrdComponent.wMeterPuls[wmNr0]; }
|
||||||
@@ -37,10 +37,10 @@ namespace TBF.BenchControl.Elde
|
|||||||
public ulong RRoute { get { return ctrlBrdComponent.rRoute; } }
|
public ulong RRoute { get { return ctrlBrdComponent.rRoute; } }
|
||||||
public uint DivTime { get { return ctrlBrdComponent.divTime; } }
|
public uint DivTime { get { return ctrlBrdComponent.divTime; } }
|
||||||
public float TTime { get { return ctrlBrdComponent.Ttime; } }
|
public float TTime { get { return ctrlBrdComponent.Ttime; } }
|
||||||
#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST
|
#if DN100 || MUNICH || FUZHOU150
|
||||||
public uint FmState { get { return ctrlBrdComponent.fMState[0]; } } /// TODO: index
|
|
||||||
#else
|
|
||||||
public uint FmState { get { return ctrlBrdComponent.fMState; } }
|
public uint FmState { get { return ctrlBrdComponent.fMState; } }
|
||||||
|
#else //if everything newer
|
||||||
|
public uint FmState { get { return ctrlBrdComponent.fMState[0]; } } /// TODO: index
|
||||||
#endif
|
#endif
|
||||||
public uint BeginState(int wmNr0) { return ctrlBrdComponent.beginSt[wmNr0]; }
|
public uint BeginState(int wmNr0) { return ctrlBrdComponent.beginSt[wmNr0]; }
|
||||||
public float ReferenceFlow { get { return ctrlBrdComponent.referenceFlow; } }
|
public float ReferenceFlow { get { return ctrlBrdComponent.referenceFlow; } }
|
||||||
@@ -76,15 +76,11 @@ namespace TBF.BenchControl.Elde
|
|||||||
private ControlComponent3F300.UserControl1 ctrlBrdComponent;
|
private ControlComponent3F300.UserControl1 ctrlBrdComponent;
|
||||||
#elif PT200IL
|
#elif PT200IL
|
||||||
private ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent;
|
private ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent;
|
||||||
#elif TORINO50
|
#else /// newer benches
|
||||||
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
|
|
||||||
#elif BADGER_MALA_TRAT
|
|
||||||
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
|
|
||||||
#elif TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST
|
|
||||||
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
|
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor that initializes the control board component reference
|
/// Constructor that initializes the control board component reference
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ctrlBrdComponent"></param>
|
/// <param name="ctrlBrdComponent"></param>
|
||||||
@@ -98,11 +94,7 @@ namespace TBF.BenchControl.Elde
|
|||||||
public ControlComWrap(ControlComponent3F300.UserControl1 ctrlBrdComponent)
|
public ControlComWrap(ControlComponent3F300.UserControl1 ctrlBrdComponent)
|
||||||
#elif PT200IL
|
#elif PT200IL
|
||||||
public ControlComWrap(ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent)
|
public ControlComWrap(ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent)
|
||||||
#elif TORINO50
|
#else /// all newer benches
|
||||||
public ControlComWrap(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
|
|
||||||
#elif BADGER_MALA_TRAT
|
|
||||||
public ControlComWrap(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
|
|
||||||
#elif TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST
|
|
||||||
public ControlComWrap(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
|
public ControlComWrap(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -198,10 +190,10 @@ namespace TBF.BenchControl.Elde
|
|||||||
// valveValue[0],
|
// valveValue[0],
|
||||||
// valveValue[1]));
|
// valveValue[1]));
|
||||||
log.InfoFormat("ValveMove(#={0}, md={1}, [{2}, {3}])", valveNo, valveMode, valveValue[0], valveValue[1]);
|
log.InfoFormat("ValveMove(#={0}, md={1}, [{2}, {3}])", valveNo, valveMode, valveValue[0], valveValue[1]);
|
||||||
#if FUZHOU300 || PT200IL || TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST
|
#if DN100 || MUNICH || FUZHOU150
|
||||||
ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue, stableTime);
|
|
||||||
#else
|
|
||||||
ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue);
|
ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue);
|
||||||
|
#else /// all newer benches
|
||||||
|
ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue, stableTime);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ namespace TBF.BenchControl
|
|||||||
#else
|
#else
|
||||||
public const int Period = 1; /// State machine period in sec.
|
public const int Period = 1; /// State machine period in sec.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static DateTime startDateTime; /// DateTime of time instance when the state machine worker thread starts
|
static DateTime startDateTime; /// DateTime of time instance when the state machine worker thread starts
|
||||||
static int currentTimeSec; /// Time from the start of the state machine in seconds
|
static int currentTimeSec; /// Time from the start of the state machine in seconds
|
||||||
static bool quitStateMachine; /// flag to stop the worker thread
|
static bool quitStateMachine; /// flag to stop the worker thread
|
||||||
@@ -195,7 +196,7 @@ namespace TBF.BenchControl
|
|||||||
public static void InitializeBoardEtc(ControlComponent3F300.UserControl1 ctrlBrdComponent)
|
public static void InitializeBoardEtc(ControlComponent3F300.UserControl1 ctrlBrdComponent)
|
||||||
#elif PT200IL
|
#elif PT200IL
|
||||||
public static void InitializeBoardEtc(ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent)
|
public static void InitializeBoardEtc(ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent)
|
||||||
#elif TORINO50 || BADGER_MALA_TRAT || TORUN_PT50_2015 || CEVAK_PT40_272 || IPERLST
|
#else /// all newer benches
|
||||||
public static void InitializeBoardEtc(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
|
public static void InitializeBoardEtc(ControlComponent_Torino2015.UserControl1 ctrlBrdComponent)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|||||||
Generated
+1
-4
@@ -588,10 +588,7 @@ namespace TBF
|
|||||||
#elif PT200IL
|
#elif PT200IL
|
||||||
private ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent;
|
private ControlComponent_Izrael2014.UserControl1 ctrlBrdComponent;
|
||||||
private TBF.Screens.ProcessTabPageCtrl6 processTabPageCtrl;
|
private TBF.Screens.ProcessTabPageCtrl6 processTabPageCtrl;
|
||||||
#elif TORINO50
|
#elif TORINO50 || BADGER_MALA_TRAT
|
||||||
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
|
|
||||||
private TBF.Screens.ProcessTabPageCtrl6 processTabPageCtrl;
|
|
||||||
#elif BADGER_MALA_TRAT
|
|
||||||
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
|
private ControlComponent_Torino2015.UserControl1 ctrlBrdComponent;
|
||||||
private TBF.Screens.ProcessTabPageCtrl6 processTabPageCtrl;
|
private TBF.Screens.ProcessTabPageCtrl6 processTabPageCtrl;
|
||||||
#elif TORUN_PT50_2015 || CEVAK_PT40_272
|
#elif TORUN_PT50_2015 || CEVAK_PT40_272
|
||||||
|
|||||||
Reference in New Issue
Block a user