1:控制V94和V96阀时,对应的控制MFC设置为0

This commit is contained in:
HCL 2023-06-20 11:09:36 +08:00
parent 6d51c5eaad
commit 0aad8d9f23
25 changed files with 141 additions and 11 deletions

View File

@ -787,6 +787,41 @@ namespace SicModules.LLs.Routines.Base
}
}
public void CloseVentValveAndWait(int id, int timeout = 3)
{
Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
{
Notify($"Close {Module} slow vent valve");
if (!LoadLockDevice.SetSlowVentValve(false, out string reason))
{
Stop(reason);
return false;
}
return true;
}, () =>
{
return LoadLockDevice.CheckSlowVentValve(false);
}, timeout * 1000);
if (ret.Item1)
{
if (ret.Item2 == Result.FAIL)
{
throw (new RoutineFaildException());
}
else if (ret.Item2 == Result.TIMEOUT)
{
Stop($"Close {Module} slow vent valve in {timeout} seconds");
throw (new RoutineFaildException());
}
else
throw (new RoutineBreakException());
}
}
public void CloseVentValve(int id)
{
Tuple<bool, Result> ret = Execute(id, () =>

View File

@ -170,7 +170,7 @@ namespace SicModules.LLs.Routines
TimeDelay((int)RoutineStep.TimeDelay1, 1);
SlowVent((int)RoutineStep.SlowVentV, _ventBasePressure, _ventTimeout);
TimeDelay((int)RoutineStep.VentDelayV, _ventDelayTime);
CloseVentValve((int)RoutineStep.CloseFastVentValveV);
CloseVentValveAndWait((int)RoutineStep.CloseFastVentValveV);
TimeDelay((int)RoutineStep.TimeDelay2, 1);
EndLoop((int)RoutineStep.StopLoop);

View File

@ -136,7 +136,7 @@ namespace SicModules.LLs.Routines
SlowVent((int)RoutineStep.SlowVent, _targetPressure - 5 ,_slowVentTimeout);
CloseVentValve((int)RoutineStep.CloseSlowVentValve);
CloseVentValveAndWait((int)RoutineStep.CloseSlowVentValve);
}
catch (RoutineBreakException)
{

View File

@ -138,7 +138,7 @@ namespace SicModules.LLs.Routines
TimeDelay((int)RoutineStep.TimeDelay1, 1);
SlowVent((int)RoutineStep.SlowVent, _ventBasePressure, _ventTimeOut);
CloseVentValve((int)RoutineStep.CloseSlowVentValve);
CloseVentValveAndWait((int)RoutineStep.CloseSlowVentValve);
TimeDelay((int)RoutineStep.VentDelay, _ventDelayTime);
EndLoop((int)RoutineStep.StopLoop);

View File

@ -151,7 +151,7 @@ namespace SicModules.LLs.Routines
TimeDelay((int)RoutineStep.TimeDelay2, _ventDelayTime);
}
CloseVentValve((int)RoutineStep.CloseSlowVentValve);
CloseVentValveAndWait((int)RoutineStep.CloseSlowVentValve);
}
}
catch (RoutineBreakException)

View File

@ -117,7 +117,7 @@ namespace SicModules.LLs.Routines
TimeDelay((int)RoutineStep.VentDelay, _ventDelayTime);
CloseVentValve((int)RoutineStep.CloseSlowVentValve);
CloseVentValveAndWait((int)RoutineStep.CloseSlowVentValve);
}
catch (RoutineBreakException)

View File

@ -199,6 +199,11 @@ namespace SicModules.LLs
return _ventValve.TurnValve(isOpen, out reason);
}
public override bool CheckSlowVentValve(bool isOpen)
{
return _ventValve.Status == isOpen;
}
public override bool SetSlowVentValve(bool isOpen, out string reason)
{
return _ventValve.TurnValve(isOpen, out reason);

View File

@ -367,6 +367,41 @@ namespace SicModules.UnLoads.Routines.Base
}
}
public void CloseVentValveAndWait(int id, int timeout = 3)
{
Tuple<bool, Result> ret = ExecuteAndWait(id, () =>
{
Notify($"Close {UnLoadDevice.Name} slow vent valve");
if (!UnLoadDevice.SetSlowVentValve(false, out string reason))
{
Stop(reason);
return false;
}
return true;
}, () =>
{
return UnLoadDevice.CheckSlowVentValve(false);
}, timeout * 1000);
if (ret.Item1)
{
if (ret.Item2 == Result.FAIL)
{
throw (new RoutineFaildException());
}
else if (ret.Item2 == Result.TIMEOUT)
{
Stop($"Close {Module} slow vent valve in {timeout} seconds");
throw (new RoutineFaildException());
}
else
throw (new RoutineBreakException());
}
}
public void CloseVentValve(int id)
{
Tuple<bool, Result> ret = Execute(id, () =>

View File

@ -150,7 +150,7 @@ namespace SicModules.UnLoads.Routines
TimeDelay((int)RoutineStep.TimeDelay1, 1);
SlowVent((int)RoutineStep.SlowVent, _ventBasePressure, _ventTimeOut);
CloseVentValve((int)RoutineStep.CloseSlowVentValve);
CloseVentValveAndWait((int)RoutineStep.CloseSlowVentValve);
TimeDelay((int)RoutineStep.VentDelay, _ventDelayTime);
EndLoop((int)RoutineStep.StopLoop);

View File

@ -134,7 +134,7 @@ namespace SicModules.UnLoads.Routines
SlowVent((int)RoutineStep.SlowVent, _targetPressure - 5, _slowVentTimeout);
CloseVentValve((int)RoutineStep.CloseSlowVentValve);
CloseVentValveAndWait((int)RoutineStep.CloseSlowVentValve);
}
catch (RoutineBreakException)
{

View File

@ -134,7 +134,7 @@ namespace SicModules.UnLoads.Routines
TimeDelay((int)RoutineStep.TimeDelay1, 2);
SlowVent((int)RoutineStep.SlowVent, _ventBasePressure, _ventTimeOut);
CloseVentValve((int)RoutineStep.CloseSlowVentValve);
CloseVentValveAndWait((int)RoutineStep.CloseSlowVentValve);
TimeDelay((int)RoutineStep.VentDelay, _ventDelayTime);
EndLoop((int)RoutineStep.StopLoop);

View File

@ -147,7 +147,7 @@ namespace SicModules.UnLoads.Routines
TimeDelay((int)RoutineStep.TimeDelay3, _ventDelayTime);
}
CloseVentValve((int)RoutineStep.CloseSlowVentValve);
CloseVentValveAndWait((int)RoutineStep.CloseSlowVentValve);
}
}
catch (RoutineBreakException)

View File

@ -164,6 +164,11 @@ namespace SicModules.UnLoads
return _ventValve.TurnValve(isOpen, out reason);
}
public override bool CheckSlowVentValve(bool isOpen)
{
return _ventValve.Status == isOpen;
}
public override bool SetSlowVentValve(bool isOpen, out string reason)
{
return _ventValve.TurnValve(isOpen, out reason);

View File

@ -51,6 +51,6 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
[assembly: AssemblyVersion("1.0.21.33")]
[assembly: AssemblyVersion("1.0.22.34")]

View File

@ -1,6 +1,14 @@

# Sic 系统更新历史记录
## Version 1.0.22.34
**2023-06-20**
- Bug修复
- 无
- 新特性
- 1:控制V94和V96阀时对应的控制MFC设置为0
## Version 1.0.21.33
**2023-06-02**

View File

@ -54,5 +54,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.21.33")]
[assembly: AssemblyVersion("1.0.22.34")]

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SciChart.Charting" publicKeyToken="b55dd9efe817e823" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.1.12982" newVersion="6.0.1.12982"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SciChart.Core" publicKeyToken="b55dd9efe817e823" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.1.12982" newVersion="6.0.1.12982"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SciChart.Data" publicKeyToken="b55dd9efe817e823" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.1.12982" newVersion="6.0.1.12982"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="MECF.Framework.UI.Client.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<userSettings>
<MECF.Framework.UI.Client.Properties.Settings>
<setting name="test" serializeAs="String">
<value/>
</setting>
</MECF.Framework.UI.Client.Properties.Settings>
</userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

Binary file not shown.