IControlCom : Interface uses uint[8] filterConstants (Juzna Afrika, Genesis), ver. 2.18.861
This commit is contained in:
@@ -430,11 +430,14 @@ namespace TBF.BenchControl.Elde
|
||||
{
|
||||
if (DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
uint filter = Convert.ToUInt32(filterConstant);
|
||||
///
|
||||
if (sendCommandFlag)
|
||||
{
|
||||
controlCom.SendCommand(cmd, refNr, (benchModelRoute & routeMask),
|
||||
totalRefPulses, massRefPulses, testMethods,
|
||||
filterConstant, FMFreq, regConst, shortImp, stopDevs);
|
||||
new uint[] { filter, filter, filter, filter, filter, filter, filter, filter },
|
||||
FMFreq, regConst, shortImp, stopDevs);
|
||||
}
|
||||
|
||||
controlCom.RunDeviceAfter();
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace TBF.BenchControl.Elde
|
||||
int totalRefPulses;
|
||||
int massRefPulses;
|
||||
TestMethods testMethods;
|
||||
float filterConstant;
|
||||
uint[] filterConstants;
|
||||
float[] FMFreq;
|
||||
int regConst;
|
||||
int shortImp;
|
||||
@@ -174,7 +174,7 @@ namespace TBF.BenchControl.Elde
|
||||
/// <param name="stopDevs">What to stop</param>
|
||||
public void SendCommand(Command cmd, int refFlowmtrNr, UInt128 route,
|
||||
int totalRefPulses, int massRefPulses, TestMethods testMethods,
|
||||
float filterConstant, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs)
|
||||
uint[] filterConstants, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs)
|
||||
{
|
||||
log.InfoFormat("SendCommand(Cmd={0},Ref#={1},Route={2} {3} {4} {5},TotalPls={6},MassPls={7},TstM={8},filt={9},FM=[{10}{11}{12}{13}{14}{15}],Reg={16},ShrtImp={17},Stop={18})",
|
||||
cmd, refFlowmtrNr, /// 0, 1
|
||||
@@ -182,7 +182,7 @@ namespace TBF.BenchControl.Elde
|
||||
((route >> 32) & 0xFFFF).ToString("X4"), /// 3
|
||||
((route >> 16) & 0xFFFF).ToString("X4"), /// 4
|
||||
(route & 0xFFFF).ToString("X4"), /// 5
|
||||
totalRefPulses, massRefPulses, testMethods, filterConstant, /// 6, 7, 8, 9
|
||||
totalRefPulses, massRefPulses, testMethods, filterConstants, /// 6, 7, 8, 9
|
||||
fmFreq[0].ToString(), /// 10
|
||||
(fmFreq.Length > 1) ? ("," + fmFreq[1].ToString()) : "", /// 11
|
||||
(fmFreq.Length > 2) ? ("," + fmFreq[2].ToString()) : "", /// 12
|
||||
@@ -212,7 +212,7 @@ namespace TBF.BenchControl.Elde
|
||||
this.totalRefPulses = totalRefPulses;
|
||||
this.massRefPulses = massRefPulses;
|
||||
this.testMethods = testMethods;
|
||||
this.filterConstant = filterConstant;
|
||||
this.filterConstants = filterConstants;
|
||||
this.FMFreq = fmFreq;
|
||||
this.regConst = regConst;
|
||||
this.shortImp = shortImp;
|
||||
|
||||
@@ -280,37 +280,37 @@ namespace TBF.BenchControl.Elde
|
||||
/// <param name="route">Route: 64-bit installation specific number</param>
|
||||
/// <param name="refPulses">Test duration as a number of reference flow meter pulses</param>
|
||||
/// <param name="testMethods">See ControlBoard.TestMethods enum</param>
|
||||
/// <param name="filterConstant">0 = No filtering (0..255)</param>
|
||||
/// <param name="filterConstants">0 = No filtering (0..255)</param>
|
||||
/// <param name="FMFreq">Freq.inverter control (not applicable in DT100, Munich)</param>
|
||||
/// <param name="regConst">Coefficient used to control the regulation valve (1..100)</param>
|
||||
/// <param name="shortImp">0 = default value, 1 = spec. processing of very short pulses</param>
|
||||
/// <param name="stopDevs">What to stop</param>
|
||||
public void SendCommand(Command cmd, int refFlowMeterNr, UInt128 route,
|
||||
int totalRefPulses, int massRefPulses, TestMethods testMethods,
|
||||
float filterConstant, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs)
|
||||
uint[] filterConstants, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs)
|
||||
{
|
||||
if (Program.MainWnd.InvokeRequired)
|
||||
{
|
||||
/// When SendCommand(...) called from the worker thread
|
||||
object[] args = new object[] { cmd, refFlowMeterNr, route, totalRefPulses, massRefPulses,
|
||||
testMethods, filterConstant, fmFreq, regConst, shortImp, stopDevs };
|
||||
testMethods, filterConstants, fmFreq, regConst, shortImp, stopDevs };
|
||||
Program.MainWnd.Invoke((SendCommandDlgt)DoSendCommand, args); /// Component was created in UI thread - use Invoke()
|
||||
}
|
||||
else
|
||||
{
|
||||
/// When SendCommand(...) called from the UI thread
|
||||
DoSendCommand(cmd, refFlowMeterNr, route, totalRefPulses, massRefPulses, testMethods,
|
||||
filterConstant, fmFreq, regConst, shortImp, stopDevs);
|
||||
filterConstants, fmFreq, regConst, shortImp, stopDevs);
|
||||
}
|
||||
}
|
||||
///
|
||||
delegate void SendCommandDlgt(Command cmd, int refFlowmtrNr, UInt128 route,
|
||||
int totalRefPulses, int massRefPulses, TestMethods testMethods,
|
||||
float filterConstant, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs);
|
||||
uint[] filterConstants, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs);
|
||||
///
|
||||
private void DoSendCommand(Command cmd, int refFlowMeterNr, UInt128 route,
|
||||
int totalRefPulses, int massRefPulses, TestMethods testMethods,
|
||||
float filterConstant, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs)
|
||||
uint[] filterConstants, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs)
|
||||
{
|
||||
//TBF.UiBridge.Bridge.OnLog(this, string.Format("{0} SendCommand({1}, {2}, {3}, {4}, {5}, {6}, [{7},{8}], {9}, {10}, {11})\r\n",
|
||||
// DateTime.Now.ToLongTimeString(),
|
||||
@@ -352,7 +352,7 @@ namespace TBF.BenchControl.Elde
|
||||
cmd, /// 0
|
||||
refFlowMeterNr, /// 1
|
||||
Utils.RouteToStr(route), /// 2
|
||||
totalRefPulses, massRefPulses, testMethods, filterConstant, /// 3, 4, 5, 6
|
||||
totalRefPulses, massRefPulses, testMethods, filterConstants, /// 3, 4, 5, 6
|
||||
fmFreq[0].ToString(), /// 7
|
||||
(fmFreq.Length > 1) ? ("," + fmFreq[1].ToString()) : "", /// 8
|
||||
(fmFreq.Length > 2) ? ("," + fmFreq[2].ToString()) : "", /// 9
|
||||
@@ -363,18 +363,22 @@ namespace TBF.BenchControl.Elde
|
||||
|
||||
#if DN100 || MUNICH
|
||||
ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)route, (uint)totalRefPulses, (uint)testMethods,
|
||||
filterConstant, fmFreq[0], (uint)regConst, (uint)shortImp, (uint)stopDevs);
|
||||
Convert.ToSingle(filterConstants[0]), fmFreq[0], (uint)regConst, (uint)shortImp, (uint)stopDevs);
|
||||
#elif BADGER_MALA_TRAT || BADGER_VELKA_TRAT || FUZHOU_40 || FUZHOU150 || FUZHOU300 || PT200IL || PUCHONG_PT200 || TORINO50 || TORUN_PT50_2015 || CEVAK_PT40_272 || MURES_PT40
|
||||
ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)route, (uint)totalRefPulses, (uint)testMethods,
|
||||
filterConstant, fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs);
|
||||
Convert.ToSingle(filterConstants[0]), fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs);
|
||||
#elif GENESIS || BERLIN || SLM_150 || PETERSBURG_200
|
||||
uint[] pulsesArr = new uint[] { (uint)totalRefPulses, (uint)massRefPulses };
|
||||
ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)(route & (UInt128)0xFFFFFFFFFFFFFFFF), (ulong)(route >> 64), pulsesArr, (uint)testMethods,
|
||||
filterConstant, fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs);
|
||||
#else /// if TURA_IPERL || TURA_SPECIAL || MALTA_WSD25 || SLM_50 || SLM_END || WARSAW_END || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || RUM_MOB || KRAKOW_50 || BADGER_STREDNA_TRAT || JUZNA_AFRIKA_50
|
||||
Convert.ToSingle(filterConstants[0]), fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs);
|
||||
#elif JUZNA_AFRIKA_50
|
||||
uint[] pulsesArr = new uint[] { (uint)totalRefPulses, (uint)massRefPulses };
|
||||
ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)route, pulsesArr, (uint)testMethods,
|
||||
filterConstant, fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs);
|
||||
filterConstants, fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs);
|
||||
#else /// if TURA_IPERL || TURA_SPECIAL || MALTA_WSD25 || SLM_50 || SLM_END || WARSAW_END || PETERSBURG_50 || KEMPNO_50 || BAHRAIN_50 || RUM_MOB || KRAKOW_50 || BADGER_STREDNA_TRAT
|
||||
uint[] pulsesArr = new uint[] { (uint)totalRefPulses, (uint)massRefPulses };
|
||||
ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)route, pulsesArr, (uint)testMethods,
|
||||
Convert.ToSingle(filterConstants[0]), fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs);
|
||||
#endif
|
||||
log.InfoFormat("DoSendCommand() Route = {0}", Utils.RouteToStr(route));
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace TBF.BenchControl.Elde
|
||||
/// <param name="shortImp">0 = default value, 1 = spec. processing of very short pulses</param>
|
||||
/// <param name="stopDevs">What to stop</param>
|
||||
void SendCommand(Command cmd, int refNr, UInt128 route, int totalRefPulses, int massRefPulses, TestMethods testMethods,
|
||||
float filterConstant, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs);
|
||||
uint[] filterConstants, float[] fmFreq, int regConst, int shortImp, StopDevs stopDevs);
|
||||
|
||||
/// <summary>
|
||||
/// Control of regulating valves.
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.18.860.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.860.0")]
|
||||
[assembly: AssemblyVersion("2.18.861.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.861.0")]
|
||||
|
||||
Reference in New Issue
Block a user