Browse Source

Merge branch 'TIN001-dev' of http://10.4.3.168:3000/Furnace/TIN_PMC into TIN001-dev

# Conflicts:
#	TIN001-PLC/TIN001/FurancePMC.pdb
#	TIN001-PLC/TIN001/FurancePMC.sys
#	TIN001-PLC/TIN001/PMC/_CompileInfo/3F581919-8DE5-3414-5B46-74662B58ED84.compileinfo
#	TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/CurrentConfig.tszip
#	TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/CurrentConfig.xml
#	TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/CurrentConfig/FurancePMC.tczip
#	TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/CurrentConfig/PMC.tpzip
#	TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/Plc/Port_851.app
#	TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/Plc/Port_851.crc
#	TIN001-PLC/TIN001/_Boot/TwinCAT RT (x64)/Plc/Port_851_boot.tizip
#	TIN001-PLC/TIN001/_Deployment/TwinCAT RT (x64)/FurancePMC.pdb
#	TIN001-PLC/TIN001/_Deployment/TwinCAT RT (x64)/FurancePMC.sys
shishenghui 1 month ago
parent
commit
2a8683628d

+ 14 - 8
TIN001-PLC/Jet_Furance_PMC/Jet_Furance_PMC/Jet_Furance_PMC/FurancePMC/RecipeContext.cpp

@@ -1139,27 +1139,33 @@ flag1:
 	updateTime(true);
 
 	//	5.取出并执行当前step的所有command
-	map <string, string> retcommand;
+	static CommandMapST* retcommand;
 	if (currentRecipeType == currentRecipeTypeValue::NormalRecipe)
 	{
-		//retcommand = mainStepList[currentStepNo].commandMap;		
+		retcommand = mainStepList.get(currentStepNo)->commandMaps;		
 	}
 	if (currentRecipeType == currentRecipeTypeValue::SubRecipe)
 	{
-		//retcommand = subStepListMap[currentOtherRecipeKey][currentOtherStepNo].commandMap;
+		retcommand = subStepListMap.get(CovertIntToChar(currentOtherRecipeKey))->get(currentOtherStepNo)->commandMaps;
 	}
 	if (currentRecipeType == currentRecipeTypeValue::AlarmRecipe)
 	{
-		//retcommand = alarmStepListMap[currentOtherRecipeKey][currentOtherStepNo].commandMap;
+		retcommand = alarmStepListMap.get(CovertIntToChar(currentOtherRecipeKey))->get(currentOtherStepNo)->commandMaps;
 	}
 	if (currentRecipeType == currentRecipeTypeValue::AbortRecipe)
 	{
-		//retcommand = abortStepListMap[currentOtherRecipeKey][currentOtherStepNo].commandMap;
+		retcommand = abortStepListMap.get(CovertIntToChar(currentOtherRecipeKey))->get(currentOtherStepNo)->commandMaps;
 	}
-	map<string, string>::iterator iter;
-	for (iter=retcommand.begin();iter!=retcommand.end();iter++)
+	
+	for (int i= 0;i<200;i++)
 	{
-		OP->select(iter->first.c_str())->Do();
+		if (retcommand == NULL) break;  // 先判断数组指针有效性
+		if (retcommand[i].Command == NULL) continue;  // 跳过空元素
+		if (retcommand[i].Param == NULL) continue;  // 跳过空元素
+		CommandMapST rc = retcommand[i];
+	
+		OP->select(rc.Command);
+		/*OP.*/
 		/*iter->second;*/ //思考下参数如何处理 
 	}