- COmponent properties 'Position' --> 'Idx0' or 'Idx1'

- process data logging, RegulVal position logging
- changes for I11+I12, NOK yet
This commit is contained in:
Milan Hanajik
2014-09-10 12:05:49 +02:00
parent c3050863a6
commit fcfdfeca41
26 changed files with 165 additions and 101 deletions
@@ -15,7 +15,7 @@ namespace TBF.BenchControl.Elde.RegulValve
private static readonly ILog log = LogManager.GetLogger(typeof(RegulValve));
public override string ToString()
{
return string.Format("RegulationValve({0},{1})", Name, Position);
return string.Format("RegulationValve({0},{1})", Name, Idx1);
}
public static void ResetStaticProperties() { }
@@ -30,11 +30,16 @@ namespace TBF.BenchControl.Elde.RegulValve
readonly ControlBoardDev controlBoard;
public readonly int Position; /// 0..7
public readonly int Idx1; /// 1..7
public readonly int DacValueClosed; /// 0..1023
public readonly int DacValueOpen; /// 0..1023
public readonly int StableTime; /// 0=200ms, step=50ms, max. 1500ms (max.26)
public readonly int FlowStableSec; /// 0..60 sec
///
public float Position
{
get { return controlBoard.RValvePosition(Idx1); }
}
public RegulValve(RegulValveCfg cfg, IList<Generic.IComponent> components)
{
@@ -44,7 +49,7 @@ namespace TBF.BenchControl.Elde.RegulValve
controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
this.Position = cfg.Position;
this.Idx1 = cfg.Idx1;
this.DacValueClosed = cfg.DacValueClosed;
this.DacValueOpen = cfg.DacValueOpen;
this.StableTime = cfg.StableTime;
@@ -52,8 +57,8 @@ namespace TBF.BenchControl.Elde.RegulValve
this.dict = new Dictionary<float, float>();
this.controlBoard.RegValveCalib[Position - 1, 0] = (uint)DacValueClosed;
this.controlBoard.RegValveCalib[Position - 1, 1] = (uint)DacValueOpen;
this.controlBoard.RegValveCalib[Idx1 - 1, 0] = (uint)DacValueClosed;
this.controlBoard.RegValveCalib[Idx1 - 1, 1] = (uint)DacValueOpen;
log.Debug(this.ToString());
}