- COmponent properties 'Position' --> 'Idx0' or 'Idx1'
- process data logging, RegulVal position logging - changes for I11+I12, NOK yet
This commit is contained in:
@@ -10,7 +10,7 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
///
|
||||
/// Stored parameters
|
||||
///
|
||||
public int Position; /// 0..7
|
||||
public int Idx1; /// 1..7
|
||||
public int DacValueClosed; /// 0..1023
|
||||
public int DacValueOpen; /// 0..1023
|
||||
public int PidCoef; /// 1..100
|
||||
@@ -26,6 +26,7 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
/// Parameterless constructor
|
||||
public RegulValveCfg()
|
||||
{
|
||||
Idx1 = 1;
|
||||
StableTimeMs = 500;
|
||||
FlowStableSec = 5;
|
||||
}
|
||||
@@ -33,19 +34,19 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
/// Regulation valve configuration parameters
|
||||
/// </summary>
|
||||
/// <param name="name">Regulation valve name</param>
|
||||
/// <param name="position">Position on the control board 0..7</param>
|
||||
/// <param name="idx1">Position on the control board 0..7</param>
|
||||
/// <param name="dacValueClosed">0..1023</param>
|
||||
/// <param name="dacValueOpen">0..1023</param>
|
||||
/// <param name="pidCoef">1..100</param>
|
||||
public RegulValveCfg(IComponentFactory factory, string name, string parentName, int position, int dacValueClosed, int dacValueOpen, int pidCoef, int stableTimeMs, bool storedPositionReuse, int flowStableSec)
|
||||
public RegulValveCfg(IComponentFactory factory, string name, string parentName, int idx1, int dacValueClosed, int dacValueOpen, int pidCoef, int stableTimeMs, bool storedPositionReuse, int flowStableSec)
|
||||
: base(factory, name, parentName)
|
||||
{
|
||||
if (position < 0 || position > 7) throw new ArgumentOutOfRangeException("position");
|
||||
if (idx1 < 1 || idx1 > 7) throw new ArgumentOutOfRangeException("position");
|
||||
if (dacValueClosed < 0 || dacValueClosed > 1023) throw new ArgumentOutOfRangeException("dacValueOpen");
|
||||
if (dacValueOpen < 0 || dacValueOpen > 1023) throw new ArgumentOutOfRangeException("dacValueOpen");
|
||||
if (pidCoef < 1 || pidCoef > 100) throw new ArgumentOutOfRangeException("pidCoef");
|
||||
|
||||
this.Position = position;
|
||||
this.Idx1 = idx1;
|
||||
this.DacValueClosed = dacValueClosed;
|
||||
this.DacValueOpen = dacValueOpen;
|
||||
this.PidCoef = pidCoef;
|
||||
@@ -56,13 +57,13 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
|
||||
public IComponentCfg Clone()
|
||||
{
|
||||
return new RegulValveCfg(Factory, Name, ParentName, Position, DacValueClosed, DacValueOpen, PidCoef, StableTimeMs, StoredPositionReuse, FlowStableSec);
|
||||
return new RegulValveCfg(Factory, Name, ParentName, Idx1, DacValueClosed, DacValueOpen, PidCoef, StableTimeMs, StoredPositionReuse, FlowStableSec);
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("position={0}, DAC-closed={1}, DAC-open={2}, PID={3}, posReuse={4}, flowStableSec={5}",
|
||||
Position, DacValueClosed, DacValueOpen, PidCoef, StoredPositionReuse, FlowStableSec);
|
||||
return string.Format("idx1={0}, DA-closed={1}, DA-open={2}, PID={3}, stabT={4}ms, posReuse={5}, flowStable={6}s",
|
||||
Idx1, DacValueClosed, DacValueOpen, PidCoef, StableTimeMs, StoredPositionReuse, FlowStableSec);
|
||||
}
|
||||
|
||||
public TBF.Entities.Component CreateDbEntity()
|
||||
|
||||
Reference in New Issue
Block a user