gyj 2 周之前
父節點
當前提交
a9ef15b72a

+ 21 - 21
TIN001-PLC/Jet_Furance_PMC/Jet_Furance_PMC/Jet_Furance_PMC/FurancePMC/RecipeContext.cpp

@@ -1312,28 +1312,28 @@ void RecipeContext::executeNextStep()
 			char* cork = CovertIntToChar(currentOtherRecipeKey);
 			steptimes = (abortStepListMap.get(cork))->get(currentOtherStepNo)->time;
 		}
-		for (int i = 0; i < 200; i++)
-		{
-			if (retcommand == NULL) break;  // 先判断数组指针有效性
-			if (retcommand[i].Command[0] == '\0') continue;  // 跳过空元素
-			if (retcommand[i].Param[0] == '\0') continue;  // 跳过空元素
-			CommandMapST* rc = retcommand + i;
-			//LOG->Log(tlInfo, FLEAVEA"Command = %s,Param = %s", retcommand[i].Command, retcommand[i].Param);
-			static char opName[MAX_NAME_LEN];
-			opName[0] = '\0';
-			if (strcmp(rc->Command, "SetBoatMotion") == 0) {
-				//TODO:boat运动,第一个参数拼到命令中
-				sprintf(opName, "SetBoatMotion.%s", SC->getBaseName(rc->Param, ';'));
-			}
-			else {
-				strcpy(opName, rc->Command);
-			}
-			auto retnode = OP->select(opName);
-			retnode->setParams(rc->Param);
-			retnode->setTimes(TIME_USE_LAST, TIME_USE_LAST, TIME_USE_LAST, steptimes);
-			retnode->Do();
+		//for (int i = 0; i < 200; i++)
+		//{
+		//	if (retcommand == NULL) break;  // 先判断数组指针有效性
+		//	if (retcommand[i].Command[0] == '\0') continue;  // 跳过空元素
+		//	if (retcommand[i].Param[0] == '\0') continue;  // 跳过空元素
+		//	CommandMapST* rc = retcommand + i;
+		//	//LOG->Log(tlInfo, FLEAVEA"Command = %s,Param = %s", retcommand[i].Command, retcommand[i].Param);
+		//	static char opName[MAX_NAME_LEN];
+		//	opName[0] = '\0';
+		//	if (strcmp(rc->Command, "SetBoatMotion") == 0) {
+		//		//TODO:boat运动,第一个参数拼到命令中
+		//		sprintf(opName, "SetBoatMotion.%s", SC->getBaseName(rc->Param, ';'));
+		//	}
+		//	else {
+		//		strcpy(opName, rc->Command);
+		//	}
+		//	auto retnode = OP->select(opName);
+		//	retnode->setParams(rc->Param);
+		//	retnode->setTimes(TIME_USE_LAST, TIME_USE_LAST, TIME_USE_LAST, steptimes);
+		//	retnode->Do();
 
-		}
+		//}
 
 		//	6.如果step.time == 0,设置recipeExecuteStatus == StepCompleted,返回到1步骤进行循环
 

+ 6 - 0
TIN001-PLC/Jet_Furance_PMC/Jet_Furance_PMC/Jet_Furance_PMC/FurancePMC/TlvSession.cpp

@@ -255,6 +255,8 @@ void TlvSession::recv(unsigned long  socketId, const char* buffer, const int len
 	
 }
 void TlvSession::send() {
+	static int testCount = 0;
+	testCount++;
 	while (TRUE) {
 		if (sendLength == 0 && sendTotalLength == 0) {
 			sendTotalLength = sendData.popRawData(sendBuffer);
@@ -264,10 +266,14 @@ void TlvSession::send() {
 		}
 		if (sendLength < sendTotalLength) {
 			unsigned long onceLength = 0;
+			
 			if (sockSend(socketId, sendTotalLength - sendLength, sendBuffer + sendLength, onceLength) != 0) {
+				logger->info("[%d]Try to send but error,send length=%d,real=%d,", testCount,sendTotalLength - sendLength,onceLength);
 				sendLength = 0;
 				break;
 			}
+			logger->info("[%d]Try to send success,send length=%d,real=%d,", testCount,sendTotalLength - sendLength, onceLength);
+
 			if (onceLength < sendTotalLength - sendLength) {
 				//send uncompleted
 				sendLength += onceLength;

File diff suppressed because it is too large
+ 26639 - 4422
TIN001-PLC/TIN001/PMC.tsproj


File diff suppressed because it is too large
+ 92393 - 0
TIN001-PLC/TIN001/PMC.tsproj.bak


File diff suppressed because it is too large
+ 8 - 9
TIN001-PLC/TIN001/TrialLicense.tclrs