- Modifications for 'StableTime' (ValveMove, RegulValve, etc.
- SHA1 checksum calculated and displayed in AboutDlg (sample data 'nejaky text') - Modifications for the Fuzhou300 component
This commit is contained in:
@@ -7,15 +7,25 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
{
|
||||
public class RegulValveCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
///
|
||||
/// Stored parameters
|
||||
///
|
||||
public int Position; /// 0..7
|
||||
public int DacValueClosed; /// 0..1023
|
||||
public int DacValueOpen; /// 0..1023
|
||||
public int PidCoef; /// 1..100
|
||||
public int StableTimeMs; /// 200..1500 ms
|
||||
public bool StoredPositionReuse; /// true = store and re-use previous regulation valve positions
|
||||
|
||||
/// <summary>
|
||||
/// Stabilization time when setting the flow: 0=200ms, step 50ms, max. 1.5 sec.
|
||||
/// </summary>
|
||||
public int StableTime { get { return (StableTimeMs - 200) / 50; } }
|
||||
|
||||
/// Parameterless constructor
|
||||
public RegulValveCfg()
|
||||
{
|
||||
StableTimeMs = 500;
|
||||
}
|
||||
/// <summary>
|
||||
/// Regulation valve configuration parameters
|
||||
@@ -25,7 +35,7 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
/// <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, bool storedPositionReuse)
|
||||
public RegulValveCfg(IComponentFactory factory, string name, string parentName, int position, int dacValueClosed, int dacValueOpen, int pidCoef, int stableTimeMs, bool storedPositionReuse)
|
||||
: base(factory, name, parentName)
|
||||
{
|
||||
if (position < 0 || position > 7) throw new ArgumentOutOfRangeException("position");
|
||||
@@ -37,12 +47,13 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
this.DacValueClosed = dacValueClosed;
|
||||
this.DacValueOpen = dacValueOpen;
|
||||
this.PidCoef = pidCoef;
|
||||
this.StableTimeMs = stableTimeMs;
|
||||
this.StoredPositionReuse = storedPositionReuse;
|
||||
}
|
||||
|
||||
public IComponentCfg Clone()
|
||||
{
|
||||
return new RegulValveCfg(Factory, Name, ParentName, Position, DacValueClosed, DacValueOpen, PidCoef, StoredPositionReuse);
|
||||
return new RegulValveCfg(Factory, Name, ParentName, Position, DacValueClosed, DacValueOpen, PidCoef, StableTimeMs, StoredPositionReuse);
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
|
||||
Reference in New Issue
Block a user