Endurance : cBrd.CyclePar usage change, ver. 2.12.407
This commit is contained in:
@@ -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 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 ReferenceVolume { get { return controlCom.TotalRefVolume; } }
|
||||||
public float VyslExt(int wmNr0, int what) { return controlCom.VyslExt(wmNr0, what); }
|
public float VyslExt(int wmNr0, int what) { return controlCom.VyslExt(wmNr0, what); }
|
||||||
public uint GetCyclePar(int ix) { return controlCom.GetCyclePar(ix); }
|
public uint[] CyclePar { get { return controlCom.CyclePar; } set { controlCom.CyclePar = value; } }
|
||||||
public void SetCyclePar(int ix, uint val) { controlCom.SetCyclePar(ix, val); return; }
|
|
||||||
|
|
||||||
/// <summary> Extracted from the StatusP in RunDeviceBefore </summary>
|
/// <summary> Extracted from the StatusP in RunDeviceBefore </summary>
|
||||||
public bool EmergencyStop { get { return emergencyStop; } }
|
public bool EmergencyStop { get { return emergencyStop; } }
|
||||||
|
|||||||
@@ -69,8 +69,7 @@ namespace TBF.BenchControl.Elde
|
|||||||
public float VyslExt(int wmNr0, int what) { return 0; }
|
public float VyslExt(int wmNr0, int what) { return 0; }
|
||||||
public void SetWeight(int pos, double mass) { return; } /// not available in sim. mode
|
public void SetWeight(int pos, double mass) { return; } /// not available in sim. mode
|
||||||
|
|
||||||
public uint GetCyclePar(int ix) { return 0; } /// dummy
|
public uint[] CyclePar { get { return new uint[163]; } set { return; } } /// dummy
|
||||||
public void SetCyclePar(int ix, uint value) { return; } /// dummy
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Private initialization data updated by contructors of children components
|
/// Private initialization data updated by contructors of children components
|
||||||
|
|||||||
@@ -67,11 +67,9 @@ namespace TBF.BenchControl.Elde
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SLM_END || WARSAW_END
|
#if SLM_END || WARSAW_END
|
||||||
public uint GetCyclePar(int ix) { return ctrlBrdComponent.CyclePar[ix]; }
|
public uint[] CyclePar { get { return ctrlBrdComponent.CyclePar; } set { ctrlBrdComponent.CyclePar = value; } }
|
||||||
public void SetCyclePar(int ix, uint val) { ctrlBrdComponent.CyclePar[ix] = val; }
|
|
||||||
#else
|
#else
|
||||||
public uint GetCyclePar(int ix) { return 0; } /// Dummy
|
public uint[] CyclePar { get { return new uint[163]; } set { return; }} /// Dummy
|
||||||
public void SetCyclePar(int ix, uint val) { return; } /// Dummy
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public float VyslExt(int wmNr0, int what) { return ctrlBrdComponent.VyslExt[wmNr0, what]; }
|
public float VyslExt(int wmNr0, int what) { return ctrlBrdComponent.VyslExt[wmNr0, what]; }
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ namespace TBF.BenchControl.Elde
|
|||||||
float TotalRefVolume { get; }
|
float TotalRefVolume { get; }
|
||||||
float VyslExt(int wmNr0, int what);
|
float VyslExt(int wmNr0, int what);
|
||||||
void SetWeight(int pos, double mass);
|
void SetWeight(int pos, double mass);
|
||||||
uint GetCyclePar(int ix);
|
uint[] CyclePar { get; set; }
|
||||||
void SetCyclePar(int ix, uint value);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends calibration and configuration data to the control board.
|
/// 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);
|
int stepsCount = Math.Min(enduranceCycle.Count, 80);
|
||||||
///
|
///
|
||||||
uint[] cyclePar = new uint[2 * stepsCount + 3];
|
uint[] cyclePar = new uint[2 * stepsCount + 3];
|
||||||
uint duration = 0;
|
uint duration = 10;
|
||||||
uint state = 0;
|
uint state = 0;
|
||||||
for (int i = 0; i < stepsCount; i++)
|
for (int i = 0; i < stepsCount; i++)
|
||||||
{
|
{
|
||||||
state = state | enduranceCycle[i].ValvesOpen;
|
state = state | enduranceCycle[i].ValvesOpen;
|
||||||
state = state & (~enduranceCycle[i].ValvesClose);
|
state = state & (~enduranceCycle[i].ValvesClose);
|
||||||
|
|
||||||
cBrd.SetCyclePar(2 * i + 1, duration / 10);
|
cyclePar[2 * i + 1] = duration / 10;
|
||||||
cBrd.SetCyclePar(2 * i + 2, state);
|
cyclePar[2 * i + 2] = state;
|
||||||
|
|
||||||
duration += enduranceCycle[i].Duration;
|
duration += enduranceCycle[i].Duration;
|
||||||
}
|
}
|
||||||
cBrd.SetCyclePar(2 * stepsCount + 1, 0);
|
cyclePar[2 * stepsCount + 1] = 0;
|
||||||
cBrd.SetCyclePar(2 * stepsCount + 2, 0);
|
cyclePar[2 * stepsCount + 2] = 0;
|
||||||
cBrd.SetCyclePar(0, duration / 10);
|
cyclePar[0] = duration / 10;
|
||||||
|
|
||||||
|
uint[] originalCyclePar = cBrd.CyclePar;
|
||||||
|
|
||||||
|
cBrd.CyclePar = cyclePar;
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("2.12.406.1")]
|
[assembly: AssemblyVersion("2.12.407.1")]
|
||||||
[assembly: AssemblyFileVersion("2.12.406.1")]
|
[assembly: AssemblyFileVersion("2.12.407.1")]
|
||||||
|
|||||||
Reference in New Issue
Block a user