Endurance : cBrd.CyclePar usage change, ver. 2.12.407

This commit is contained in:
Milan Hanajik
2016-12-09 16:37:25 +01:00
parent 1143fa79ae
commit 58a3340f53
6 changed files with 17 additions and 18 deletions
@@ -62,8 +62,7 @@ namespace TBF.BenchControl.Elde
public uint AnalogInputRaw(int adcNr0, int bank) { return controlCom.AnalogInputRaw(adcNr0, bank); } /// adcNr0: 0=RV1, 1=RV2,... bank: 0=RV, 1=Temp
public float ReferenceVolume { get { return controlCom.TotalRefVolume; } }
public float VyslExt(int wmNr0, int what) { return controlCom.VyslExt(wmNr0, what); }
public uint GetCyclePar(int ix) { return controlCom.GetCyclePar(ix); }
public void SetCyclePar(int ix, uint val) { controlCom.SetCyclePar(ix, val); return; }
public uint[] CyclePar { get { return controlCom.CyclePar; } set { controlCom.CyclePar = value; } }
/// <summary> Extracted from the StatusP in RunDeviceBefore </summary>
public bool EmergencyStop { get { return emergencyStop; } }
@@ -69,8 +69,7 @@ namespace TBF.BenchControl.Elde
public float VyslExt(int wmNr0, int what) { return 0; }
public void SetWeight(int pos, double mass) { return; } /// not available in sim. mode
public uint GetCyclePar(int ix) { return 0; } /// dummy
public void SetCyclePar(int ix, uint value) { return; } /// dummy
public uint[] CyclePar { get { return new uint[163]; } set { return; } } /// dummy
///
/// Private initialization data updated by contructors of children components
@@ -67,11 +67,9 @@ namespace TBF.BenchControl.Elde
#endif
#if SLM_END || WARSAW_END
public uint GetCyclePar(int ix) { return ctrlBrdComponent.CyclePar[ix]; }
public void SetCyclePar(int ix, uint val) { ctrlBrdComponent.CyclePar[ix] = val; }
public uint[] CyclePar { get { return ctrlBrdComponent.CyclePar; } set { ctrlBrdComponent.CyclePar = value; } }
#else
public uint GetCyclePar(int ix) { return 0; } /// Dummy
public void SetCyclePar(int ix, uint val) { return; } /// Dummy
public uint[] CyclePar { get { return new uint[163]; } set { return; }} /// Dummy
#endif
public float VyslExt(int wmNr0, int what) { return ctrlBrdComponent.VyslExt[wmNr0, what]; }
@@ -31,8 +31,7 @@ namespace TBF.BenchControl.Elde
float TotalRefVolume { get; }
float VyslExt(int wmNr0, int what);
void SetWeight(int pos, double mass);
uint GetCyclePar(int ix);
void SetCyclePar(int ix, uint value);
uint[] CyclePar { get; set; }
/// <summary>
/// Sends calibration and configuration data to the control board.
@@ -405,21 +405,25 @@ namespace TBF.BenchControl.TestMethods.Endurance
int stepsCount = Math.Min(enduranceCycle.Count, 80);
///
uint[] cyclePar = new uint[2 * stepsCount + 3];
uint duration = 0;
uint duration = 10;
uint state = 0;
for (int i = 0; i < stepsCount; i++)
{
state = state | enduranceCycle[i].ValvesOpen;
state = state & (~enduranceCycle[i].ValvesClose);
cBrd.SetCyclePar(2 * i + 1, duration / 10);
cBrd.SetCyclePar(2 * i + 2, state);
cyclePar[2 * i + 1] = duration / 10;
cyclePar[2 * i + 2] = state;
duration += enduranceCycle[i].Duration;
}
cBrd.SetCyclePar(2 * stepsCount + 1, 0);
cBrd.SetCyclePar(2 * stepsCount + 2, 0);
cBrd.SetCyclePar(0, duration / 10);
cyclePar[2 * stepsCount + 1] = 0;
cyclePar[2 * stepsCount + 2] = 0;
cyclePar[0] = duration / 10;
uint[] originalCyclePar = cBrd.CyclePar;
cBrd.CyclePar = cyclePar;
//------------------------------------------------
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.12.406.1")]
[assembly: AssemblyFileVersion("2.12.406.1")]
[assembly: AssemblyVersion("2.12.407.1")]
[assembly: AssemblyFileVersion("2.12.407.1")]