Files
tbf/TBF/BenchControl/Elde/IControlCom.cs
T

85 lines
3.7 KiB
C#

///
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
///
using System;
using Dirichlet.Numerics;
namespace TBF.BenchControl.Elde
{
interface IControlCom
{
StatusP StatusP { get; }
int EtPulses(int wmNr1);
int EtPulsesK { get; }
int EtPulses2 { get; }
int EtPulses3 { get; }
UInt16 WMeterPulses(int wmNr1);
int WMeterReference(int wmNr0);
uint RegulValveDAC(int rvNr0);
float Pressure(int prsNr0);
float Temperature(int tmpNr0);
RegulValveState RegulValveState(int rvNr1);
UInt128 RRoute { get; }
uint DivTime(int id); /// 50% id=0, 10% id=1, 90% id=2
float TTime { get; }
float ImpulseTime(int WMNr1);
uint FmState { get; }
uint BeginState(int wmNr0);
double ReferenceFreq { get; }
double ReferenceFreqs(int i); /// Frequences for doble/tripple flowmeter
double ReferenceFlow { get; }
float RValvePosition(int rvNr1);
float DivSamples(int time, int divIx0); /// time unit is 2 ms
int ScopeSamples(int i, int j, int k);
ulong DigitalInputs { get; }
float AnalogInput(int adcNr0);
uint AnalogInputRaw(int adcNr0, int bank);
float TotalRefVolume { get; }
float VyslExt(int wmNr0, int what);
void SetWeight(int pos, double mass);
uint[] CyclePar { get; set; }
uint[] WMeterCont { get; }
bool ManualUIAllowed { get; set; }
float ValveOpenCloseTime { get; }
void SetDivLimit(int divNr, uint limLoPct, uint limHiPct);
void SetReservoirTemp(int nr, float temp);
/// <summary>
/// Sends calibration and configuration data to the control board.
/// </summary>
/// <param name="rvCalib">Regulating valves calib.coefs, ix1 = valve nr. (1..5), ix2 = coef.nr. (0..1), values typ. c0 = 0, c1 = 0.2</param>
/// <param name="meretA">Meret address, index = 0..1, value typ. 99 and 100</param>
/// <param name="usedCom">COM port number of the control board (typ. 1)</param>
/// <param name="tempCalib">Temp.calc.coefs, ix1 = temp.sens.nr. (0..7 ???), ix2 = coef.nr</param>
/// <param name="etCalib">Etalon nominal values</param>
/// <param name="divEdge">Percentages for switching of diverters, ix = diverter nr.(0,1), typ.value 50 (%)</param>
/// <param name="balanceRange">TODO</param>
/// <param name="meretProtocol">TODO</param>
void SendCalibData(uint[,] rvCalib, byte[] meretA, int usedCom, float[,] tempCalib, float[] etCalib, uint[] divEdge, uint[] balanceRange, byte meretProtocol);
/// <summary>
/// Updates a command that is regularly sent to the control board by SendCommand.
/// </summary>
/// <param name="sendCommandArgs">Arguments, see SendCommandArgs class</param>
/// <param name="route">State of valves, 128-bit word</param>
/// <param name="filterConstants">Array with length=8 of filter costants (0..255, 0 = no filtering)</param>
/// <param name="fmFreq">Freq.inverter control (not applicable in DT100, Munich)</param>
/// <param name="regConst">PID coefficient for flow control</param>
/// <param name="shortImp">0 = default value, 1 = spec. processing of very short pulses</param>
void SendCommand(SendCommandArgs sendCommandArgs, UInt128 route, uint[] filterConstants, float[] fmFreq, int regConst, int shortImp);
/// <summary>
/// Control of regulating valves.
/// </summary>
/// <param name="valveNo">Regulating valve nr. (1..5)</param>
/// <param name="valveMode">???</param>
/// <param name="valveValue">???</param>
/// <param name="stableTime">Stabilization time when setting the flow: 0=200ms, step 50ms, max. 1.5 sec.</param>
void ValveMove(int valveNo, RegulValveMode valveMode, float[] valveValue, int stableTime);
void RunDeviceBefore();
void RunDeviceAfter();
}
}