|
@@ -394,6 +394,7 @@ namespace Venus_Simulator.Instances
|
|
|
ChangeTime(ModuleName.TM);
|
|
|
|
|
|
MonitorMFSlitDoor();
|
|
|
+ MonitorMFPressure();
|
|
|
|
|
|
|
|
|
}
|
|
@@ -986,7 +987,165 @@ namespace Venus_Simulator.Instances
|
|
|
|
|
|
}
|
|
|
|
|
|
+ void MonitorMFPressure()
|
|
|
+ {
|
|
|
+
|
|
|
+ string LLA_AI_ChamberPressure = "AI_LLA_CHB_Pressure";
|
|
|
+ string LLB_AI_ChamberPressure = "AI_LLB_CHB_Pressure";
|
|
|
+ string TM_AI_ChamberPressure = "AI_TM_CHB_Pressure";
|
|
|
+
|
|
|
+
|
|
|
+ ModuleName mod = ModuleName.TM;
|
|
|
+
|
|
|
+ DOAccessor LLA_fast_pump_vlv = IO.DO[$"{mod}.DO_Fast_Pumping_Valve_LLA"];
|
|
|
+ DOAccessor LLA_soft_pump_vlv = IO.DO[$"{mod}.DO_Soft_Pumping_Valve_LLA"];
|
|
|
+
|
|
|
+ DOAccessor LLB_fast_pump_vlv = IO.DO[$"{mod}.DO_Fast_Pumping_Valve_LLB"];
|
|
|
+ DOAccessor LLB_soft_pump_vlv = IO.DO[$"{mod}.DO_Soft_Pumping_Valve_LLB"];
|
|
|
+
|
|
|
+ DOAccessor TM_fast_pump_vlv = IO.DO[$"{mod}.DO_Fast_Pumping_Valve_TM"];
|
|
|
+ DOAccessor TM_soft_pump_vlv = IO.DO[$"{mod}.DO_Soft_Pumping_Valve_TM"];
|
|
|
+
|
|
|
+ DOAccessor LLA_fast_Vent_vlv = IO.DO[$"{mod}.DO_Vent_Valve_LLA"];
|
|
|
+ DOAccessor LLA_soft_Vent_vlv = IO.DO[$"{mod}.DO_Purge_Valve_LLA"];
|
|
|
+
|
|
|
+ DOAccessor LLB_fast_Vent_vlv = IO.DO[$"{mod}.DO_Vent_Valve_LLB"];
|
|
|
+ DOAccessor LLB_soft_Vent_vlv = IO.DO[$"{mod}.DO_Purge_Valve_LLB"];
|
|
|
+
|
|
|
+ DOAccessor TM_fast_Vent_vlv = IO.DO[$"{mod}.DO_Fast_Vent_Valve_TM"];
|
|
|
+ DOAccessor TM_soft_Vent_vlv = IO.DO[$"{mod}.DO_Soft_Vent_Valve_TM"];
|
|
|
+
|
|
|
+ float getAiValue_LLA_ChamberPressure = GetAiValue($"{mod}.{LLA_AI_ChamberPressure}");
|
|
|
+ float getAiValue_LLB_ChamberPressure = GetAiValue($"{mod}.{LLB_AI_ChamberPressure}");
|
|
|
+ float getAiValue_TM_ChamberPressure = GetAiValue($"{mod}.{TM_AI_ChamberPressure}");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (LLA_fast_pump_vlv.Value || LLA_soft_pump_vlv.Value)
|
|
|
+ {
|
|
|
+ if ( getAiValue_LLA_ChamberPressure > 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLA_AI_ChamberPressure}", GetAiValue($"{mod}.{LLA_AI_ChamberPressure}") - 30000);
|
|
|
+ }
|
|
|
+ else if (getAiValue_LLA_ChamberPressure <= 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLA_AI_ChamberPressure}", GetAiValue($"{mod}.{LLA_AI_ChamberPressure}") - 1500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (LLB_fast_pump_vlv.Value || LLB_soft_pump_vlv.Value)
|
|
|
+ {
|
|
|
+ if (getAiValue_LLB_ChamberPressure > 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLB_AI_ChamberPressure}", GetAiValue($"{mod}.{LLB_AI_ChamberPressure}") - 30000);
|
|
|
+ }
|
|
|
+ else if (getAiValue_LLB_ChamberPressure <= 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLB_AI_ChamberPressure}", GetAiValue($"{mod}.{LLB_AI_ChamberPressure}") - 1500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (TM_fast_pump_vlv.Value || TM_soft_pump_vlv.Value)
|
|
|
+ {
|
|
|
+ if (getAiValue_TM_ChamberPressure > 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{TM_AI_ChamberPressure}", GetAiValue($"{mod}.{TM_AI_ChamberPressure}") - 30000);
|
|
|
+ }
|
|
|
+ else if (getAiValue_TM_ChamberPressure <= 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{TM_AI_ChamberPressure}", GetAiValue($"{mod}.{TM_AI_ChamberPressure}") - 1500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (LLA_fast_Vent_vlv.Value || LLA_soft_Vent_vlv.Value)
|
|
|
+ {
|
|
|
+ if (getAiValue_LLA_ChamberPressure > 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLA_AI_ChamberPressure}", GetAiValue($"{mod}.{LLA_AI_ChamberPressure}") + 30000);
|
|
|
+ }
|
|
|
+ else if (getAiValue_LLA_ChamberPressure <= 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLA_AI_ChamberPressure}", GetAiValue($"{mod}.{LLA_AI_ChamberPressure}") + 1500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (LLB_fast_Vent_vlv.Value || LLB_soft_Vent_vlv.Value)
|
|
|
+ {
|
|
|
+ if (getAiValue_LLB_ChamberPressure > 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLB_AI_ChamberPressure}", GetAiValue($"{mod}.{LLB_AI_ChamberPressure}") + 30000);
|
|
|
+ }
|
|
|
+ else if (getAiValue_LLB_ChamberPressure <= 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLB_AI_ChamberPressure}", GetAiValue($"{mod}.{LLB_AI_ChamberPressure}") + 1500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (TM_fast_Vent_vlv.Value || TM_soft_Vent_vlv.Value)
|
|
|
+ {
|
|
|
+ if (getAiValue_TM_ChamberPressure > 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{TM_AI_ChamberPressure}", GetAiValue($"{mod}.{TM_AI_ChamberPressure}") + 30000);
|
|
|
+ }
|
|
|
+ else if (getAiValue_TM_ChamberPressure <= 10000)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{TM_AI_ChamberPressure}", GetAiValue($"{mod}.{TM_AI_ChamberPressure}") + 1500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ getAiValue_LLA_ChamberPressure = GetAiValue($"{mod}.{LLA_AI_ChamberPressure}");
|
|
|
|
|
|
+ if (getAiValue_LLA_ChamberPressure > ATM_PRESSURE)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLA_AI_ChamberPressure}", ATM_PRESSURE);
|
|
|
+ }
|
|
|
+ else if (getAiValue_LLA_ChamberPressure < 20)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLA_AI_ChamberPressure}", 20);
|
|
|
+ }
|
|
|
+
|
|
|
+ getAiValue_LLB_ChamberPressure = GetAiValue($"{mod}.{LLB_AI_ChamberPressure}");
|
|
|
+
|
|
|
+ if (getAiValue_LLB_ChamberPressure > ATM_PRESSURE)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLB_AI_ChamberPressure}", ATM_PRESSURE);
|
|
|
+ }
|
|
|
+ else if (getAiValue_LLB_ChamberPressure < 20)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{LLB_AI_ChamberPressure}", 20);
|
|
|
+ }
|
|
|
+
|
|
|
+ getAiValue_TM_ChamberPressure = GetAiValue($"{mod}.{TM_AI_ChamberPressure}");
|
|
|
+
|
|
|
+ if (getAiValue_TM_ChamberPressure > ATM_PRESSURE)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{TM_AI_ChamberPressure}", ATM_PRESSURE);
|
|
|
+ }
|
|
|
+ else if (getAiValue_TM_ChamberPressure < 20)
|
|
|
+ {
|
|
|
+ SetAiValue($"{mod}.{TM_AI_ChamberPressure}", 20);
|
|
|
+ }
|
|
|
+
|
|
|
+ // ATM switch
|
|
|
+ IO.DI[$"{mod}.DI_TM_ATM_Switch"].Value = GetAiValue($"{mod}.{TM_AI_ChamberPressure}") > ATM_THRESHOLD;
|
|
|
+
|
|
|
+ // VAC switch
|
|
|
+ IO.DI[$"{mod}.DI_TM_VAC_Switch"].Value = GetAiValue($"{mod}.{TM_AI_ChamberPressure}") < VAC_SW_PRESSURE;
|
|
|
+
|
|
|
+ // ATM switch
|
|
|
+ IO.DI[$"{mod}.DI_LLA_ATM_Switch"].Value = GetAiValue($"{mod}.{LLA_AI_ChamberPressure}") > ATM_THRESHOLD;
|
|
|
+
|
|
|
+ // VAC switch
|
|
|
+ IO.DI[$"{mod}.DI_LLA_VAC_Switch"].Value = GetAiValue($"{mod}.{LLA_AI_ChamberPressure}") < VAC_SW_PRESSURE;
|
|
|
+
|
|
|
+ // ATM switch
|
|
|
+ IO.DI[$"{mod}.DI_LLB_ATM_Switch"].Value = GetAiValue($"{mod}.{LLB_AI_ChamberPressure}") > ATM_THRESHOLD;
|
|
|
+
|
|
|
+ // VAC switch
|
|
|
+ IO.DI[$"{mod}.DI_LLB_VAC_Switch"].Value = GetAiValue($"{mod}.{LLB_AI_ChamberPressure}") < VAC_SW_PRESSURE;
|
|
|
+ }
|
|
|
|
|
|
void SetAiValue(string name, float value)
|
|
|
{
|