Update from svn。
This commit is contained in:
parent
3610221ee0
commit
4e54dcba36
|
@ -15,45 +15,29 @@ namespace SicPM.Routines
|
|||
{
|
||||
private enum RoutineStep
|
||||
{
|
||||
SetGroupE,
|
||||
SetGroupK,
|
||||
|
||||
SetM7,
|
||||
SetM8,
|
||||
SetM11,
|
||||
SetPc2,
|
||||
|
||||
SetM7Or10,
|
||||
SetM8Or11,
|
||||
OpenV73,
|
||||
CloseV73,
|
||||
SetGroup1,
|
||||
SetGroup11,
|
||||
SetGroup2,
|
||||
SetGroup3,
|
||||
SetGroup4,
|
||||
SetGroup5,
|
||||
SetGroup6,
|
||||
|
||||
StartLoop,
|
||||
OpenGroup1,
|
||||
CloseGroup2,
|
||||
OpenGroup3,
|
||||
CloseGroup3,
|
||||
OpenGroup2,
|
||||
CloseGroup1,
|
||||
EndLoop,
|
||||
|
||||
SetM7Default,
|
||||
SetM8Default,
|
||||
SetPc2Default,
|
||||
SetM11Default,
|
||||
SetGroupV25,
|
||||
|
||||
CloseGroup3_2,
|
||||
CloseGroup2_2,
|
||||
OpenGroup1_2,
|
||||
CloseV73,
|
||||
SetM7Or10_2,
|
||||
SetM8Or11_2,
|
||||
SetPC2Or3,
|
||||
|
||||
TimeDelay1,
|
||||
TimeDelay2,
|
||||
TimeDelay3,
|
||||
TimeDelay4,
|
||||
TimeDelay5,
|
||||
TimeDelay6,
|
||||
TimeDelay7,
|
||||
TimeDelay8,
|
||||
TimeDelay9,
|
||||
TimeDelay10,
|
||||
TimeDelay11,
|
||||
}
|
||||
|
||||
private bool _isTCS = false; //标记是TMA换源还是TCS换源
|
||||
|
@ -61,26 +45,23 @@ namespace SicPM.Routines
|
|||
private ModuleName moduleName;
|
||||
private IoInterLock _pmIoInterLock;
|
||||
|
||||
private int _IoValueOpenCloseTimeout = 2; //开关超时时间
|
||||
private int _IoValueTimeout = 2; //开关超时时间
|
||||
private int _loopCount;
|
||||
private int _routineTimeOut;
|
||||
|
||||
private double _OpenTime = 10;
|
||||
private double _CLoseTime = 10;
|
||||
private int _routineTimeOut;
|
||||
|
||||
//默认为TMA换源参数
|
||||
private int mfc7Or10 = 7;
|
||||
private int mfc8Or12 = 8;
|
||||
private int mfc11 = 11;
|
||||
private int mfc8Or11 = 8;
|
||||
private int pc2Or3 = 2;
|
||||
private List<string> _lstGroupV73 = new List<string>() { "V73" };
|
||||
private List<string> _lstGroupV50 = new List<string>() { "V50" };
|
||||
private List<string> _lstGroupV48 = new List<string>() { "V48" };
|
||||
private List<string> _lstGroupV49 = new List<string>() { "V49" };
|
||||
|
||||
private List<string> _lstGroup1 = new List<string>() { "V46","V46s","V73" };
|
||||
private List<string> _lstGroup2 = new List<string>() { "V46", "V46s" };
|
||||
private List<string> _lstGroup3 = new List<string>() { "V43", "V43s", "V45" };
|
||||
List<int> _lstPcList = new List<int> { 1, 2, 3, 4, 5, 6, 7 };
|
||||
private List<string> _lstGroupV73 = new List<string>() { "V73" };
|
||||
|
||||
private List<string> _lstGroup1 = new List<string>() { "V49"};
|
||||
private List<string> _lstGroup2 = new List<string>() { "V48", "V48s" };
|
||||
private List<string> _lstGroup3 = new List<string>() { "V50", "V50s"};
|
||||
|
||||
private Stopwatch _swTimer = new Stopwatch();
|
||||
public PMExchangeMoRoutine(ModuleName module, PMModule pm) : base(module, pm)
|
||||
|
@ -129,31 +110,30 @@ namespace SicPM.Routines
|
|||
}
|
||||
|
||||
_loopCount = SC.GetValue<int>($"PM.{Module}.MoExchange.CycleCount");
|
||||
_OpenTime= SC.GetValue<int>($"PM.{Module}.MoExchange.PumpTime");
|
||||
_OpenTime = SC.GetValue<int>($"PM.{Module}.MoExchange.PumpTime");
|
||||
_CLoseTime = SC.GetValue<int>($"PM.{Module}.MoExchange.VentTime");
|
||||
_routineTimeOut = SC.GetValue<int>($"PM.{Module}.MoExchange.RoutineTimeOut");
|
||||
|
||||
|
||||
//设置TCS换源参数
|
||||
if (_isTCS)
|
||||
{
|
||||
mfc7Or10 = 10;
|
||||
mfc8Or12 = 12;
|
||||
mfc8Or11 = 11;
|
||||
pc2Or3 = 3;
|
||||
|
||||
_lstGroup1 = new List<string>() { "V50"};
|
||||
_lstGroup2 = new List<string>() { "V48" };
|
||||
_lstGroup3 = new List<string>() { "V49" };
|
||||
_lstGroup1 = new List<string>() { "V49" };
|
||||
_lstGroup2 = new List<string>() { "V48", "V48s" };
|
||||
_lstGroup3 = new List<string>() { "V50", "V50s" };
|
||||
}
|
||||
else
|
||||
{
|
||||
mfc7Or10 = 7;
|
||||
mfc8Or12 = 8;
|
||||
mfc8Or11 = 8;
|
||||
pc2Or3 = 2;
|
||||
|
||||
_lstGroup1 = new List<string>() { "V46" };
|
||||
_lstGroup2 = new List<string>() { "V43" };
|
||||
_lstGroup3 = new List<string>() { "V45" };
|
||||
_lstGroup1 = new List<string>() { "V45" };
|
||||
_lstGroup2 = new List<string>() { "V43", "V43s" };
|
||||
_lstGroup3 = new List<string>() { "V46", "V46s" };
|
||||
}
|
||||
|
||||
if (!_pmIoInterLock.SetPMExchangeMoRoutineRunning(true, out string reason))
|
||||
|
@ -161,6 +141,7 @@ namespace SicPM.Routines
|
|||
EV.PostAlarmLog(Module, $"can not Exchange Mo,{reason}");
|
||||
return Result.FAIL;
|
||||
}
|
||||
|
||||
_swTimer.Restart();
|
||||
Notify("Start");
|
||||
return Result.RUN;
|
||||
|
@ -173,51 +154,61 @@ namespace SicPM.Routines
|
|||
{
|
||||
CheckRoutineTimeOut();
|
||||
|
||||
// 关闭E组和K组的阀门
|
||||
SetIoValueByGroup((int)RoutineStep.SetGroupE, IoGroupName.E, false, _IoValueOpenCloseTimeout);
|
||||
SetIoValueByGroup((int)RoutineStep.SetGroupK, IoGroupName.K, false, _IoValueOpenCloseTimeout);
|
||||
SetIoValueByGroup((int)RoutineStep.SetGroupV25, IoGroupName.V25, true, _IoValueOpenCloseTimeout);
|
||||
//关闭K阀组
|
||||
SetIoValueByGroup((int)RoutineStep.SetGroupK, IoGroupName.K, false, _IoValueTimeout);
|
||||
|
||||
//设定M7,M8 80%,PC2设定Max
|
||||
SetMfcValueByPercent((int)RoutineStep.SetM7, mfc7Or10, 80);
|
||||
SetMfcValueByPercent((int)RoutineStep.SetM8, mfc8Or12, 80);
|
||||
if (_isTCS)
|
||||
{
|
||||
SetMfcValueByPercent((int)RoutineStep.SetM11, mfc11, 80);
|
||||
}
|
||||
SetPCValueByPercent((int)RoutineStep.SetPc2, pc2Or3, 100);
|
||||
SetMfcValueByPercent((int)RoutineStep.SetM7Or10, mfc7Or10, 80);
|
||||
SetMfcValueByPercent((int)RoutineStep.SetM8Or11, mfc8Or11, 80);
|
||||
|
||||
//打开V73,V46,V46s,保持30s
|
||||
SetIoValueByList((int)RoutineStep.OpenV73, _lstGroupV73, true, _IoValueOpenCloseTimeout);
|
||||
SetIoValueByList((int)RoutineStep.SetGroup11, _lstGroup1, true, _IoValueOpenCloseTimeout);
|
||||
TimeDelay((int)RoutineStep.TimeDelay1, 30);
|
||||
//打开V73
|
||||
SetIoValueByList((int)RoutineStep.OpenV73, _lstGroupV73, true, _IoValueTimeout);
|
||||
|
||||
//Loop
|
||||
//循环开始
|
||||
Loop((int)RoutineStep.StartLoop, _loopCount);
|
||||
SetIoValueByList((int)RoutineStep.SetGroup1, _lstGroup1, false, _IoValueOpenCloseTimeout);
|
||||
SetIoValueByList((int)RoutineStep.SetGroup2, _lstGroup2, true, _IoValueOpenCloseTimeout);
|
||||
SetIoValueByList((int)RoutineStep.SetGroup3, _lstGroup3, true, _IoValueOpenCloseTimeout);
|
||||
TimeDelay((int)RoutineStep.TimeDelay2, _OpenTime);
|
||||
|
||||
//SetIoValueByList((int)RoutineStep.SetGroup4, _lstGroup3, false, _IoValueOpenCloseTimeout);
|
||||
SetIoValueByList((int)RoutineStep.SetGroup5, _lstGroup2, false, _IoValueOpenCloseTimeout);
|
||||
SetIoValueByList((int)RoutineStep.SetGroup6, _lstGroup1, true, _IoValueOpenCloseTimeout);
|
||||
TimeDelay((int)RoutineStep.TimeDelay3, _CLoseTime);
|
||||
//打开Group1
|
||||
SetIoValueByList((int)RoutineStep.OpenGroup1, _lstGroup1, true, _IoValueTimeout);
|
||||
|
||||
//关闭Group2
|
||||
SetIoValueByList((int)RoutineStep.CloseGroup2, _lstGroup2, false, _IoValueTimeout);
|
||||
|
||||
//打开Group3
|
||||
SetIoValueByList((int)RoutineStep.OpenGroup3, _lstGroup3, true, _IoValueTimeout);
|
||||
|
||||
TimeDelay((int)RoutineStep.TimeDelay1, _OpenTime);
|
||||
|
||||
//关闭Group3
|
||||
SetIoValueByList((int)RoutineStep.CloseGroup3, _lstGroup3, false, _IoValueTimeout);
|
||||
|
||||
//打开Group2
|
||||
SetIoValueByList((int)RoutineStep.OpenGroup2, _lstGroup2, true, _IoValueTimeout);
|
||||
|
||||
//关闭Group1
|
||||
SetIoValueByList((int)RoutineStep.CloseGroup1, _lstGroup1, false, _IoValueTimeout);
|
||||
|
||||
TimeDelay((int)RoutineStep.TimeDelay2, _CLoseTime);
|
||||
|
||||
EndLoop((int)RoutineStep.EndLoop);
|
||||
|
||||
//关闭V73,V46,V46s
|
||||
SetIoValueByList((int)RoutineStep.SetGroup6, _lstGroup1, false, _IoValueOpenCloseTimeout);
|
||||
SetIoValueByList((int)RoutineStep.CloseV73, _lstGroupV73, false, _IoValueOpenCloseTimeout);
|
||||
//关闭Group3
|
||||
SetIoValueByList((int)RoutineStep.CloseGroup3_2, _lstGroup3, false, _IoValueTimeout);
|
||||
|
||||
SetMfcValueToDefaultByID((int)RoutineStep.SetM7Default, mfc7Or10);
|
||||
SetMfcValueToDefaultByID((int)RoutineStep.SetM8Default, mfc8Or12);
|
||||
if (_isTCS)
|
||||
{
|
||||
SetMfcValueToDefaultByID((int)RoutineStep.SetM11Default, mfc11);
|
||||
}
|
||||
SetPcToDefault((int)RoutineStep.SetPc2Default, new List<int> { pc2Or3 });
|
||||
//关闭Group2
|
||||
SetIoValueByList((int)RoutineStep.CloseGroup2_2, _lstGroup2, false, _IoValueTimeout);
|
||||
|
||||
//打开Group1
|
||||
SetIoValueByList((int)RoutineStep.OpenGroup1_2, _lstGroup1, true, _IoValueTimeout);
|
||||
|
||||
//关闭V73
|
||||
SetIoValueByList((int)RoutineStep.CloseV73, _lstGroupV73, true, _IoValueTimeout);
|
||||
|
||||
//设定M7,M8/M10,M11到默认值
|
||||
SetMfcValueToDefaultByID((int)RoutineStep.SetM7Or10_2, mfc7Or10);
|
||||
SetMfcValueToDefaultByID((int)RoutineStep.SetM8Or11_2, mfc8Or11);
|
||||
|
||||
//设置PC2/PC3到默认值
|
||||
SetPcToDefault((int)RoutineStep.SetPC2Or3, new List<int> { pc2Or3 });
|
||||
}
|
||||
catch (RoutineBreakException)
|
||||
{
|
||||
|
@ -243,11 +234,10 @@ namespace SicPM.Routines
|
|||
{
|
||||
SetRoutineRuningDo();
|
||||
|
||||
PMDevice.SetIoValue(_lstGroup1,false);
|
||||
PMDevice.SetIoValue(_lstGroup2, false);
|
||||
PMDevice.SetIoValue(_lstGroup3, false);
|
||||
PMDevice.SetMfcValueToDefault(new List<int> { mfc7Or10 });
|
||||
PMDevice.SetMfcValueToDefault(new List<int> { mfc8Or12 });
|
||||
PMDevice.SetMfcValueToDefault(new List<int> { mfc11 });
|
||||
PMDevice.SetMfcValueToDefault(new List<int> { mfc8Or11 });
|
||||
PMDevice.SetPCValueToDefault(new List<int> { pc2Or3 });
|
||||
base.Abort();
|
||||
}
|
||||
|
|
|
@ -51,6 +51,6 @@ using System.Windows;
|
|||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
// 方法是按如下所示使用“*”: :
|
||||
|
||||
[assembly: AssemblyVersion("2.4.14.25")]
|
||||
[assembly: AssemblyFileVersion("2.4.14.25")]
|
||||
[assembly: AssemblyVersion("2.4.14.26")]
|
||||
[assembly: AssemblyFileVersion("2.4.14.26")]
|
||||
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
Sic 系统更新历史记录
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
Sic01 2023-02-03 Version 2.4.14.26
|
||||
1.重新整理PM MO Change TMA/TCS Routine
|
||||
|
||||
Sic01 2023-02-03 Version 2.4.14.25
|
||||
1.修改PM的Interlock
|
||||
|
||||
|
|
|
@ -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("2.4.13.24")]
|
||||
[assembly: AssemblyFileVersion("2.4.13.24")]
|
||||
[assembly: AssemblyVersion("2.4.14.26")]
|
||||
[assembly: AssemblyFileVersion("2.4.14.26")]
|
||||
|
|
Loading…
Reference in New Issue