feat: 增加LG/TCS-AGV接口并完善物料校验与Function逻辑

This commit is contained in:
XingCheng3
2026-07-16 16:47:45 +08:00
parent 7303ddde9a
commit 8e44e11248
74 changed files with 4324 additions and 1091 deletions

View File

@@ -102,6 +102,7 @@
<Compile Include="OpcServer\AllowAGVRaise.cs" />
<Compile Include="OpcServer\CallMaterials.cs" />
<Compile Include="Methods\EngineGetOverBaseWork.cs" />
<Compile Include="Methods\TcsAgvDispatch.cs" />
<Compile Include="OpcServer\LoadEmptyTray.cs" />
<Compile Include="OpcServer\PointToPoint.cs" />
<Compile Include="OpcServer\RequestReturnMaterial.cs" />

View File

@@ -9,13 +9,12 @@ namespace MesServerFunctions
{
public partial class FunctionMES
{
object lockFunWork;
private readonly object lockFunWork = new object();
//public void FunWork(DeviceDriver_BasicData.CustomeEvetnArgs e)
public void FunWork(string recData)
{
lockFunWork = new object();
lock (lockFunWork)
{
List<string> dataArray = MisDataFun.GetCmdStringList(recData);
@@ -176,10 +175,17 @@ namespace MesServerFunctions
break;
// 请求插插头
case "452":
// 需要调用AGV插插头接口 去插
if (tagValue == "1")
fun_TcsAgvDispatch(e, "插");
else
MIS_BASE.WritePLC(400, OpName, false);
break;
// 请求拔插头
case "453":
if (tagValue == "1")
fun_TcsAgvDispatch(e, "拔");
else
MIS_BASE.WritePLC(401, OpName, false);
break;
// 开始磨合
case "454":

View File

@@ -1,4 +1,4 @@
using MesServerWork;
using MesServerWork;
using MisDataFunDll;
using System;

View File

@@ -1,4 +1,4 @@
using MesServerWork;
using MesServerWork;
using MisDataFunDll;
using System;

View File

@@ -42,6 +42,11 @@ namespace MesServerFunctions
string targetProcessCode = nextDT.Rows[0]["目标工序号"].ToString();
string targetProcess = nextDT.Rows[0]["目标工序"].ToString();
if(targetStoreCode == "" || targetProcessCode == "" || targetProcess == "")
{
MisDataSaveDate.Helper.ApiLogHelper.SaveMesLog(OpName, "RequestReturnMaterial " + "当前无可用转序目标库位 请确认库位空闲状态!", MisDataSaveDate.Helper.MesLogType.ERROR);
return;
}
// 1. 调用AGV转序接口
var agvResult = CALL_Inerface_DataHandle.CALL_Inerface_MaterialTransfer(OpName, targetStoreCode);
@@ -97,9 +102,7 @@ namespace MesServerFunctions
MIS_BASE.WritePLC(306, OpName, 2); // 任务状态反馈
}
SendMessage.AsyncSendMessage_Notice(OpName, msg);
MyLog4Net.MyLogHelper.Info("RequestReturnMaterial", msg);
MisDataSaveDate.Helper.ApiLogHelper.SaveMesLog(OpName, "RequestReturnMaterial " + msg, MisDataSaveDate.Helper.MesLogType.ERROR);
}
else
{