(1) DIverter threshold used, (2) UniCB state display can be enabled / disabled, ver. 3.1.1598
This commit is contained in:
@@ -69,7 +69,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
log.InfoFormat("Op.Start() RV#={0} Et#={1} Qfrom={2} Qto={3}", regV.Idx1, flowMeter.Idx1, qFrom, qTo);
|
||||
|
||||
/// Start the test (and the flow measurement)
|
||||
uniCB.StartTest(false, flowMeter.Idx1, 0, 40, true, false, false, false, pulsesCount, 0);
|
||||
uniCB.StartTest(false, flowMeter.Idx1, 0, 0, true, false, false, false, pulsesCount, 0);
|
||||
|
||||
opState = OpState.StartingTest;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
log.InfoFormat("Op.Start() RV#={0} Et#={1} Div#={2} Qfrom={3} Qto={4}", regV.Idx1, flowMeter.Idx1, div.DiverterNr, qFrom, qTo);
|
||||
|
||||
/// Start the test (and the flow measurement)
|
||||
uniCB.StartTest(false, flowMeter.Idx1, div.DiverterNr, 40, true, true, false, isProlongedTest, pulsesCount, massPulsesCount);
|
||||
uniCB.StartTest(false, flowMeter.Idx1, div.DiverterNr, div.StartThreshold, true, true, false, isProlongedTest, pulsesCount, massPulsesCount);
|
||||
|
||||
opState = OpState.StartingTest;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
message[35] = (byte)Math.Max(1, Math.Min(255, action.PID)); /// PIDRV
|
||||
message[36] = 0; // (byte)Math.Max(4, Math.Min(255, action.TolerRV)); /// TolerRV (4..20 mA reg.valve only)
|
||||
message[37] = (byte)Math.Max(0, Math.Min(255, action.StabTime)); /// StabRV
|
||||
message[38] = 0x1A; // (byte)((action.DivThreshold >> 2) & 0xFF); /// HranAK
|
||||
message[38] = (byte)((action.DivThreshold >> 2) & 0xFF);
|
||||
|
||||
message[39] = 0;
|
||||
message[40] = 0;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
log.InfoFormat("Op.Start() RV#={0} Et#={1} Qfrom={2} Qto={3}", regV.Idx1, flowMeter.Idx1, qFrom, qTo);
|
||||
|
||||
/// Start the test (and the flow measurement)
|
||||
uniCB.StartTest(false, flowMeter.Idx1, 0, 40, false, false, true, false, pulsesCount, 0);
|
||||
uniCB.StartTest(false, flowMeter.Idx1, 0, 0, false, false, true, false, pulsesCount, 0);
|
||||
|
||||
opState = OpState.StartingTest;
|
||||
}
|
||||
|
||||
@@ -37,16 +37,20 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
public string AltString
|
||||
{
|
||||
get {
|
||||
altString.Clear();
|
||||
altString.AppendFormat("State: {0}.{1}.{2}.{3}\n", (State >> 48) & 0xFF, (State >> 40) & 0xFF, (State >> 32) & 0xFF, Convert.ToUInt32(State & 0xFFFFFFFF).ToString("X6"));
|
||||
altString.AppendFormat("DI: {0}\n", ToBin40(DigitalInputs));
|
||||
altString.AppendFormat("DO: {0}\n", ToBin40(((UInt64)Route) >> 8));
|
||||
altString.AppendFormat("AI0: {0:D3} AI1: {1:D3} AI2: {2:D3} AI3: {3:D3} AI4: {4:D3} AI5: {5:D3}\n",
|
||||
AnalogInput(0), AnalogInput(1), AnalogInput(2), AnalogInput(3), AnalogInput(4), AnalogInput(5));
|
||||
altString.AppendFormat("AI8: {0:D3} AI9: {1:D3} AI10: {2:D3} AI11: {3:D3}\n",
|
||||
AnalogInput(8), AnalogInput(9), AnalogInput(10), AnalogInput(11));
|
||||
altString.AppendFormat("Frequency: {0:F1} Hz Pulses: {1}", RefFrequency, RefPulses);
|
||||
return altString.ToString();
|
||||
if (cbCfg != null && cbCfg.ShowState)
|
||||
{
|
||||
altString.Clear();
|
||||
altString.AppendFormat("State: {0}.{1}.{2}.{3}\n", (State >> 48) & 0xFF, (State >> 40) & 0xFF, (State >> 32) & 0xFF, Convert.ToUInt32(State & 0xFFFFFFFF).ToString("X6"));
|
||||
altString.AppendFormat("DI: {0}\n", ToBin40(DigitalInputs));
|
||||
altString.AppendFormat("DO: {0}\n", ToBin40(((UInt64)Route) >> 8));
|
||||
altString.AppendFormat("AI0: {0:D3} AI1: {1:D3} AI2: {2:D3} AI3: {3:D3} AI4: {4:D3} AI5: {5:D3}\n",
|
||||
AnalogInput(0), AnalogInput(1), AnalogInput(2), AnalogInput(3), AnalogInput(4), AnalogInput(5));
|
||||
altString.AppendFormat("AI8: {0:D3} AI9: {1:D3} AI10: {2:D3} AI11: {3:D3}\n",
|
||||
AnalogInput(8), AnalogInput(9), AnalogInput(10), AnalogInput(11));
|
||||
altString.AppendFormat("Frequency: {0:F1} Hz Pulses: {1}", RefFrequency, RefPulses);
|
||||
return altString.ToString();
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
public bool RelaysFInstalled;
|
||||
public bool RelaysGInstalled;
|
||||
public bool RelaysHInstalled;
|
||||
public bool ShowState;
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
@@ -88,6 +89,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RelaysFInstalled = true;
|
||||
RelaysGInstalled = true;
|
||||
RelaysHInstalled = true;
|
||||
ShowState = false;
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
@@ -99,6 +101,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
"Relays F are installed",
|
||||
"Relays G are installed",
|
||||
"Relays H are installed",
|
||||
"Show state",
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
@@ -116,6 +119,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
return new string[] { Strings.yes, Strings.no };
|
||||
default:
|
||||
return null;
|
||||
@@ -139,6 +143,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
case 4: return RelaysFInstalled ? Strings.yes : Strings.no;
|
||||
case 5: return RelaysGInstalled ? Strings.yes : Strings.no;
|
||||
case 6: return RelaysHInstalled ? Strings.yes : Strings.no;
|
||||
case 7: return ShowState ? Strings.yes : Strings.no;
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -154,6 +159,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
case 4: RelaysFInstalled = (str == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
case 5: RelaysGInstalled = (str == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
case 6: RelaysHInstalled = (str == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
case 7: ShowState = (str == Strings.yes); return CfgUpdateFlags.RestartRqrd;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
@@ -180,6 +186,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
if (ParamValues(i).Contains(str)) return true;
|
||||
break;
|
||||
default:
|
||||
@@ -200,6 +207,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
prms.RelaysFInstalled = RelaysFInstalled;
|
||||
prms.RelaysGInstalled = RelaysGInstalled;
|
||||
prms.RelaysHInstalled = RelaysHInstalled;
|
||||
prms.ShowState = ShowState;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
|
||||
Reference in New Issue
Block a user