gyj 1 mês atrás
pai
commit
ec46c22dfc

+ 43 - 10
TIN001-PLC/Jet_Furance_PMC/Jet_Furance_PMC/Jet_Furance_PMC/FurancePMC/RecipeContext.cpp

@@ -439,10 +439,7 @@ BOOL RecipeContext::judgeStep()
 			{
 				return false;
 			}
-			if (mainStepList.get(currentStepNo) == NULL)
-			{
-				return false;
-			}
+	
 			//	b)currentStepNo指定的当前步骤的isJumpStep为TRUE
 			//	i.根据jumpStepName(在主recipe中)找到jumpStepNo
 			//	ii.找到了设置currentStepNo = jumpStepNo,否则函数返回FALSE
@@ -508,6 +505,7 @@ BOOL RecipeContext::judgeStep()
 					mainStepList.get(currentStepNo)->elapsedSubRecipeLoopCount++;
 					currentRecipeType = currentRecipeTypeValue::SubRecipe;
 					currentOtherStepNo = 0;
+					currentOtherRecipeKey = currentStepNo;//key 也需要设置
 					continue;
 				}
 				else
@@ -531,10 +529,7 @@ BOOL RecipeContext::judgeStep()
 		//	1.currentRecipeType = NormalRecipe
 		//	2.返回(1)继续循环(进入normal recipe的调用步骤)
 			char* cork = CovertIntToChar(currentOtherRecipeKey);
-			if (subStepListMap.get(cork) == NULL)
-			{
-				return false;
-			}
+
 			if (currentOtherStepNo >= (*subStepListMap.get(cork)).size())
 			{
 				currentRecipeType = currentRecipeTypeValue::NormalRecipe;
@@ -974,7 +969,26 @@ void RecipeContext::updateTime(BOOL newStep)
 	if (newStep)
 	{
 		elapsedStepTime = 0;
-		remainStepTime = mainStepList.get(currentStepNo)->time;
+		if (currentRecipeType == currentRecipeTypeValue::NormalRecipe)
+		{
+			remainStepTime = mainStepList.get(currentStepNo)->time;
+		}
+		if (currentRecipeType == currentRecipeTypeValue::SubRecipe)
+		{
+			char* cork = CovertIntToChar(currentOtherRecipeKey);
+			remainStepTime = (subStepListMap.get(cork))->get(currentOtherStepNo)->time;
+		}
+		if (currentRecipeType == currentRecipeTypeValue::AlarmRecipe)
+		{
+			char* cork = CovertIntToChar(currentOtherRecipeKey);
+			remainStepTime = (alarmStepListMap.get(cork))->get(currentOtherStepNo)->time;
+		}
+		if (currentRecipeType == currentRecipeTypeValue::AbortRecipe)
+		{
+			char* cork = CovertIntToChar(currentOtherRecipeKey);
+			remainStepTime = (abortStepListMap.get(cork))->get(currentOtherStepNo)->time;
+		}
+		
 		if (remainStepTime == 0)
 		{
 			int currentstepno_c = currentStepNo;
@@ -985,7 +999,26 @@ void RecipeContext::updateTime(BOOL newStep)
 			{
 				if (next())
 				{
-					remainTotalTime += mainStepList.get(currentStepNo)->time;
+					if (currentRecipeType == currentRecipeTypeValue::NormalRecipe)
+					{
+						remainTotalTime += mainStepList.get(currentStepNo)->time;
+					}
+					if (currentRecipeType == currentRecipeTypeValue::SubRecipe)
+					{
+						char* cork = CovertIntToChar(currentOtherRecipeKey);
+						remainTotalTime += (subStepListMap.get(cork))->get(currentOtherStepNo)->time;
+					}
+					if (currentRecipeType == currentRecipeTypeValue::AlarmRecipe)
+					{
+						char* cork = CovertIntToChar(currentOtherRecipeKey);
+						remainTotalTime += (alarmStepListMap.get(cork))->get(currentOtherStepNo)->time;
+					}
+					if (currentRecipeType == currentRecipeTypeValue::AbortRecipe)
+					{
+						char* cork = CovertIntToChar(currentOtherRecipeKey);
+						remainTotalTime += (abortStepListMap.get(cork))->get(currentOtherStepNo)->time;
+					}
+					//remainTotalTime += mainStepList.get(currentStepNo)->time;
 				}
 				else
 				{

BIN
TIN001-PLC/TIN001/FurancePMC.pdb


BIN
TIN001-PLC/TIN001/FurancePMC.sys


+ 2 - 2
TIN001-PLC/TIN001/PMC.tsproj

@@ -2889,9 +2889,9 @@ External Setpoint Generation:
 			<Licenses>
 				<Target>
 					<ManualSelect>{96ADB134-211A-4863-977F-10E53B30C2D2}</ManualSelect>
-					<ManualSelect>{AD7F40C3-F160-4413-83E3-6B7656A795A2}</ManualSelect>
-					<ManualSelect>{3E823FFB-0BB3-43BA-9023-5952947C15A8}</ManualSelect>
 					<ManualSelect>{3EBB9639-5FF3-42B6-8847-35C70DC013C8}</ManualSelect>
+					<ManualSelect>{3E823FFB-0BB3-43BA-9023-5952947C15A8}</ManualSelect>
+					<ManualSelect>{AD7F40C3-F160-4413-83E3-6B7656A795A2}</ManualSelect>
 					<ManualSelect>{19E93A3D-90D1-45B9-A28A-32DD8D2A166A}</ManualSelect>
 					<ManualSelect>{6952449D-F68C-49A2-ADE4-8639D85B33A4}</ManualSelect>
 					<ManualSelect>{A1AF8A04-C08D-4853-A5A0-0E6C3A278A8C}</ManualSelect>

+ 2 - 2
TIN001-PLC/TIN001/PMC.tsproj.bak

@@ -2889,9 +2889,9 @@ External Setpoint Generation:
 			<Licenses>
 				<Target>
 					<ManualSelect>{96ADB134-211A-4863-977F-10E53B30C2D2}</ManualSelect>
-					<ManualSelect>{AD7F40C3-F160-4413-83E3-6B7656A795A2}</ManualSelect>
-					<ManualSelect>{3E823FFB-0BB3-43BA-9023-5952947C15A8}</ManualSelect>
 					<ManualSelect>{3EBB9639-5FF3-42B6-8847-35C70DC013C8}</ManualSelect>
+					<ManualSelect>{3E823FFB-0BB3-43BA-9023-5952947C15A8}</ManualSelect>
+					<ManualSelect>{AD7F40C3-F160-4413-83E3-6B7656A795A2}</ManualSelect>
 					<ManualSelect>{19E93A3D-90D1-45B9-A28A-32DD8D2A166A}</ManualSelect>
 					<ManualSelect>{6952449D-F68C-49A2-ADE4-8639D85B33A4}</ManualSelect>
 					<ManualSelect>{A1AF8A04-C08D-4853-A5A0-0E6C3A278A8C}</ManualSelect>

BIN
TIN001-PLC/TIN001/PMC/_CompileInfo/3F581919-8DE5-3414-5B46-74662B58ED84.compileinfo


BIN
TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/CurrentConfig.tszip


+ 1 - 1
TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/CurrentConfig.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<TcBootProject CreateTime="2025-07-10T18:34:07">
+<TcBootProject CreateTime="2025-07-11T13:50:09">
 	<System>
 		<LockedMemSize>33554432</LockedMemSize>
 		<AffinityMask>#x1</AffinityMask>

BIN
TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/CurrentConfig/FurancePMC.tczip


BIN
TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/Plc/Port_851.app


BIN
TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/Plc/Port_851.crc


BIN
TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/Plc/Port_851_boot.tizip


BIN
TIN001-PLC/TIN001/_Deployment/TwinCAT RT (x64)/FurancePMC.pdb


BIN
TIN001-PLC/TIN001/_Deployment/TwinCAT RT (x64)/FurancePMC.sys