Merge branch 'develop' of http://112.124.35.216:65000/Sic-Software/MoS2 into develop

This commit is contained in:
hanqiangqiang 2026-08-05 13:22:18 +08:00
commit b19412c199

View File

@ -17,8 +17,8 @@ namespace SicModules.PMs.Routines
private enum RoutineStep private enum RoutineStep
{ {
SetGroupK, SetGroupK,
SetM7Or10, SetMfc1,
SetM8Or11, SetMfc2,
SetM21, SetM21,
OpenV73, OpenV73,
StartLoop, StartLoop,
@ -34,15 +34,23 @@ namespace SicModules.PMs.Routines
CloseGroup2_2, CloseGroup2_2,
OpenGroup1_2, OpenGroup1_2,
CloseV73, CloseV73,
SetM7Or10_2, SetDefalutMfc1,
SetM8Or11_2, SetDefalutMfc2,
SetPC2Or3, SetPC,
SetPCMax,
TimeDelay1, TimeDelay1,
TimeDelay2, TimeDelay2,
TimeDelay3,
LoopCloseGroup2,
LoopOpenGroup3,
LoopOpenGroup1,
LoopCloseGroup3,
LoopOpenGroup2
} }
private bool _isTCS = false; //标记是TMA换源还是TCS换源 private string _type = ""; //CS2 WCO6 MORE MOCO6
private PMModule _pmModule; private PMModule _pmModule;
private ModuleName moduleName; private ModuleName moduleName;
private IoInterLock _pmIoInterLock; private IoInterLock _pmIoInterLock;
@ -55,9 +63,9 @@ namespace SicModules.PMs.Routines
private double _CLoseTime = 10; private double _CLoseTime = 10;
//默认为TMA换源参数 //默认为TMA换源参数
private int mfc7Or10 = 7; private int mfc1 = 7;
private int mfc8Or11 = 8; private int mfc2 = 8;
private int pc2Or3 = 2; private int pc = 2;
private List<string> _lstGroupV73 = new List<string>() { "V73" }; private List<string> _lstGroupV73 = new List<string>() { "V73" };
@ -76,14 +84,7 @@ namespace SicModules.PMs.Routines
public void Init(string moName) public void Init(string moName)
{ {
if (moName.ToUpper().Contains("TCS")) _type = moName;
{
_isTCS = true;
}
else
{
_isTCS = false;
}
} }
public override Result Start(params object[] objs) public override Result Start(params object[] objs)
@ -116,26 +117,45 @@ namespace SicModules.PMs.Routines
_CLoseTime = SC.GetValue<int>($"PM.{Module}.MoExchange.VentTime"); _CLoseTime = SC.GetValue<int>($"PM.{Module}.MoExchange.VentTime");
_routineTimeOut = SC.GetValue<int>($"PM.{Module}.MoExchange.RoutineTimeOut"); _routineTimeOut = SC.GetValue<int>($"PM.{Module}.MoExchange.RoutineTimeOut");
//设置TCS换源参数 //设置换源参数
if (_isTCS) switch (_type)
{ {
mfc7Or10 = 10; case "CS2":
mfc8Or11 = 11; mfc1 = 11;
pc2Or3 = 3; mfc2 = 12;
pc = 3;
_lstGroup1 = new List<string>() { "V49" }; _lstGroup1 = new List<string>() { "V49" };
_lstGroup2 = new List<string>() { "V48", "V48s" }; _lstGroup2 = new List<string>() { "V50", "V50s" };
_lstGroup3 = new List<string>() { "V50", "V50s" }; _lstGroup3 = new List<string>() { "V48", "V48s" };
} break;
else case "WCO6":
{ mfc1 = 7;
mfc7Or10 = 7; mfc2 = 8;
mfc8Or11 = 8; pc = 2;
pc2Or3 = 2;
_lstGroup1 = new List<string>() { "V45" }; _lstGroup1 = new List<string>() { "V45" };
_lstGroup2 = new List<string>() { "V43", "V43s" }; _lstGroup2 = new List<string>() { "V46", "V46s" };
_lstGroup3 = new List<string>() { "V46", "V46s" }; _lstGroup3 = new List<string>() { "V43", "V43s" };
break;
case "MORE":
mfc1 = 16;
mfc2 = 17;
pc = 9;
_lstGroup1 = new List<string>() { "V22" };
_lstGroup2 = new List<string>() { "V23", "V23s" };
_lstGroup3 = new List<string>() { "V21", "V21s" };
break;
case "MOCO6":
mfc1 = 9;
mfc2 = 10;
pc = 8;
_lstGroup1 = new List<string>() { "V19" };
_lstGroup2 = new List<string>() { "V20", "V20s" };
_lstGroup3 = new List<string>() { "V18", "V18s" };
break;
} }
if (!_pmIoInterLock.SetPMExchangeMoRoutineRunning(true, out string reason)) if (!_pmIoInterLock.SetPMExchangeMoRoutineRunning(true, out string reason))
@ -159,59 +179,40 @@ namespace SicModules.PMs.Routines
//关闭K阀组 //关闭K阀组
SetIoValueByGroup((int)RoutineStep.SetGroupK, IoGroupName.K, false, _IoValueTimeout); SetIoValueByGroup((int)RoutineStep.SetGroupK, IoGroupName.K, false, _IoValueTimeout);
//设定M7,M8 80%,PC2设定Max //设定 M16 M17 80% PC9 设定 Max
SetMfcValueByPercent((int)RoutineStep.SetM7Or10, mfc7Or10, 80); SetMfcValueByPercent((int)RoutineStep.SetMfc1, mfc1, 80);
SetMfcValueByPercent((int)RoutineStep.SetM21, 21, 80); SetMfcValueByPercent((int)RoutineStep.SetMfc2, mfc2, 80);
SetMfcValueByPercent((int)RoutineStep.SetM8Or11, mfc8Or11, 80); SetPCValueByPercent((int)RoutineStep.SetPCMax, pc, 100);
//打开V73 //4.先打开 V73 ,再打开 V23 和 V23S 持续 30s
SetIoValueByList((int)RoutineStep.OpenV73, _lstGroupV73, true, _IoValueTimeout); SetIoValueByList((int)RoutineStep.OpenV73, _lstGroupV73, true, _IoValueTimeout);
SetIoValueByList((int)RoutineStep.OpenGroup2, _lstGroup2, true, _IoValueTimeout);
//循环开始
Loop((int)RoutineStep.StartLoop, _loopCount);
//打开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); TimeDelay((int)RoutineStep.TimeDelay1, _OpenTime);
//关闭Group3 Loop((int)RoutineStep.StartLoop, _loopCount);
SetIoValueByList((int)RoutineStep.CloseGroup3, _lstGroup3, false, _IoValueTimeout);
//打开Group2
SetIoValueByList((int)RoutineStep.OpenGroup2, _lstGroup2, true, _IoValueTimeout);
//关闭Group1
SetIoValueByList((int)RoutineStep.CloseGroup1, _lstGroup1, false, _IoValueTimeout);
//5.先关闭 V23 和 V23S再打开 V21 和 V21S再打开 V22, 持续 10S
SetIoValueByList((int)RoutineStep.LoopCloseGroup2, _lstGroup2, false, _IoValueTimeout);
SetIoValueByList((int)RoutineStep.LoopOpenGroup3, _lstGroup3, true, _IoValueTimeout);
SetIoValueByList((int)RoutineStep.LoopOpenGroup1, _lstGroup1, true, _IoValueTimeout);
TimeDelay((int)RoutineStep.TimeDelay2, _CLoseTime); TimeDelay((int)RoutineStep.TimeDelay2, _CLoseTime);
//6.关闭 V21 和 V21S打开 V23 和 V23S持续 30S
SetIoValueByList((int)RoutineStep.LoopCloseGroup3, _lstGroup3, false, _IoValueTimeout);
SetIoValueByList((int)RoutineStep.LoopOpenGroup2, _lstGroup2, true, _IoValueTimeout);
TimeDelay((int)RoutineStep.TimeDelay3, _OpenTime);
//循环开始
EndLoop((int)RoutineStep.EndLoop); EndLoop((int)RoutineStep.EndLoop);
//关闭Group3 //7.循环结束,关闭 V23 和 V23S关闭 V73
SetIoValueByList((int)RoutineStep.CloseGroup3_2, _lstGroup3, false, _IoValueTimeout);
//关闭Group2
SetIoValueByList((int)RoutineStep.CloseGroup2_2, _lstGroup2, false, _IoValueTimeout); SetIoValueByList((int)RoutineStep.CloseGroup2_2, _lstGroup2, false, _IoValueTimeout);
SetIoValueByList((int)RoutineStep.CloseV73, _lstGroupV73, false, _IoValueTimeout);
//打开Group1 //8.设定 M16 M17 default PC9 default。
SetIoValueByList((int)RoutineStep.OpenGroup1_2, _lstGroup1, true, _IoValueTimeout); SetMfcValueToDefaultByID((int)RoutineStep.SetDefalutMfc1, mfc1);
SetMfcValueToDefaultByID((int)RoutineStep.SetDefalutMfc2, mfc2);
//关闭V73 SetPcToDefault((int)RoutineStep.SetPC, new List<int> { pc });
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) catch (RoutineBreakException)
{ {
@ -239,9 +240,9 @@ namespace SicModules.PMs.Routines
_pmModule.SetIoValue(_lstGroup2, false); _pmModule.SetIoValue(_lstGroup2, false);
_pmModule.SetIoValue(_lstGroup3, false); _pmModule.SetIoValue(_lstGroup3, false);
_pmModule.SetMfcValueToDefault(new List<int> { mfc7Or10 }); _pmModule.SetMfcValueToDefault(new List<int> { mfc1 });
_pmModule.SetMfcValueToDefault(new List<int> { mfc8Or11 }); _pmModule.SetMfcValueToDefault(new List<int> { mfc2 });
_pmModule.SetPCValueToDefault(new List<int> { pc2Or3 }); _pmModule.SetPCValueToDefault(new List<int> { pc });
base.Abort(); base.Abort();
} }
private void CheckRoutineTimeOut() private void CheckRoutineTimeOut()