|
@@ -21,32 +21,32 @@ namespace PunkHPX8_RT.Devices.Reservoir
|
|
|
public class ReservoirDevice : BaseDevice, IDevice
|
|
|
{
|
|
|
#region 常量
|
|
|
- private const string AUTO = "Auto";
|
|
|
- private const string MANUAL = "Manual";
|
|
|
- private const string DISABLE = "Disable";
|
|
|
+ protected const string AUTO = "Auto";
|
|
|
+ protected const string MANUAL = "Manual";
|
|
|
+ protected const string DISABLE = "Disable";
|
|
|
|
|
|
- private const string CA_PUMP_RUNNING="CaPumpRunning";
|
|
|
- private const string AN_TOWER_HIGH="AnTowerHigh";
|
|
|
- private const string AN_TOWER_LOW="AnTowerLow";
|
|
|
- private const string CA_LEVEL="CaLevel";
|
|
|
- private const string CA_WATER_LEVEL="CaWaterLevel";
|
|
|
- private const string AN_FLOW="AnFlow";
|
|
|
- private const string AN_PUMP_ENABLE="AnPumpEnable";
|
|
|
- private const string AN_PUMP_SPEED="AnPumpSpeed";
|
|
|
- private const string CA_FLOW="CaFlow";
|
|
|
- private const string CA_PUMP_ENABLE="CaPumpEnable";
|
|
|
- private const string CA_PUMP_SPEED="CaPumpSpeed";
|
|
|
- private const string RETURN_VALVE_OPENING="ReturnValveOpening";
|
|
|
- private const string RETURN_VALVE="ReturnValve";
|
|
|
- private const string RETURN_VALVE_PERCENT="ReturnValvePercent";
|
|
|
- private const string CA_DI_REPLEN="CaDiReplen";
|
|
|
- private const string AN_DI_REPLEN="AnDiReplen";
|
|
|
- private const string SAMPLE_OUT="SampleOut";
|
|
|
- private const string DEGAS_ENABLE="DegasEnable";
|
|
|
- private const string HED_FLOW="HedFlow";
|
|
|
- private const string HED_FLOW_ENABLE="HedFlowEnable";
|
|
|
- private const string PH_FLOW_VALVE="PhFlowValve";
|
|
|
- private const string PH_VALUE="PhValue";
|
|
|
+ protected const string CA_PUMP_RUNNING="CaPumpRunning";
|
|
|
+ protected const string AN_TOWER_HIGH="AnTowerHigh";
|
|
|
+ protected const string AN_TOWER_LOW="AnTowerLow";
|
|
|
+ protected const string CA_LEVEL="CaLevel";
|
|
|
+ protected const string CA_WATER_LEVEL="CaWaterLevel";
|
|
|
+ protected const string AN_FLOW="AnFlow";
|
|
|
+ protected const string AN_PUMP_ENABLE="AnPumpEnable";
|
|
|
+ protected const string AN_PUMP_SPEED="AnPumpSpeed";
|
|
|
+ protected const string CA_FLOW="CaFlow";
|
|
|
+ protected const string CA_PUMP_ENABLE="CaPumpEnable";
|
|
|
+ protected const string CA_PUMP_SPEED="CaPumpSpeed";
|
|
|
+ protected const string RETURN_VALVE_OPENING="ReturnValveOpening";
|
|
|
+ protected const string RETURN_VALVE="ReturnValve";
|
|
|
+ protected const string RETURN_VALVE_PERCENT="ReturnValvePercent";
|
|
|
+ protected const string CA_DI_REPLEN="CaDiReplen";
|
|
|
+ protected const string AN_DI_REPLEN="AnDiReplen";
|
|
|
+ protected const string SAMPLE_OUT="SampleOut";
|
|
|
+ protected const string DEGAS_ENABLE="DegasEnable";
|
|
|
+ protected const string HED_FLOW="HedFlow";
|
|
|
+ protected const string HED_FLOW_ENABLE="HedFlowEnable";
|
|
|
+ protected const string PH_FLOW_VALVE="PhFlowValve";
|
|
|
+ protected const string PH_VALUE="PhValue";
|
|
|
#endregion
|
|
|
|
|
|
#region 内部变量
|
|
@@ -152,23 +152,24 @@ namespace PunkHPX8_RT.Devices.Reservoir
|
|
|
/// </summary>
|
|
|
protected virtual void SubscribeValueAction()
|
|
|
{
|
|
|
- BeckhoffIoSubscribeUpdateVariable(CA_PUMP_RUNNING);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(AN_TOWER_HIGH);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(AN_TOWER_LOW);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(CA_LEVEL);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(CA_WATER_LEVEL);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(CA_PUMP_ENABLE);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(CA_PUMP_SPEED);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(CA_DI_REPLEN);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(RETURN_VALVE);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(RETURN_VALVE_OPENING);
|
|
|
- BeckhoffIoSubscribeUpdateVariable(RETURN_VALVE_PERCENT);
|
|
|
+ IoSubscribeUpdateVariable(CA_PUMP_RUNNING);
|
|
|
+ IoSubscribeUpdateVariable(AN_TOWER_HIGH);
|
|
|
+ IoSubscribeUpdateVariable(AN_TOWER_LOW);
|
|
|
+ IoSubscribeUpdateVariable(CA_LEVEL);
|
|
|
+ IoSubscribeUpdateVariable(CA_WATER_LEVEL);
|
|
|
+ IoSubscribeUpdateVariable(CA_PUMP_ENABLE);
|
|
|
+ IoSubscribeUpdateVariable(CA_PUMP_SPEED);
|
|
|
+ IoSubscribeUpdateVariable(CA_DI_REPLEN);
|
|
|
+ IoSubscribeUpdateVariable(RETURN_VALVE);
|
|
|
+ IoSubscribeUpdateVariable(RETURN_VALVE_OPENING);
|
|
|
+ IoSubscribeUpdateVariable(RETURN_VALVE_PERCENT);
|
|
|
+ IoSubscribeUpdateVariable(SAMPLE_OUT);
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 订阅IO变量
|
|
|
/// </summary>
|
|
|
/// <param name="variable"></param>
|
|
|
- private void BeckhoffIoSubscribeUpdateVariable(string variable)
|
|
|
+ protected void IoSubscribeUpdateVariable(string variable)
|
|
|
{
|
|
|
_variableInitializeDic[variable] = false;
|
|
|
IOModuleManager.Instance.SubscribeModuleVariable(Module, variable, UpdateVariableValue);
|