Files
2026-05-29 10:07:05 +08:00

60 lines
2.0 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using MesServerWork;
//using SystemFramework;
namespace MesServerFunctions
{
partial class Functions_BASE_28
{
/// <summary>
/// PLC传递机型处理
/// </summary>
/// <param name="OpName"></param>
/// <param name="tagValue"></param>
private void EngineTypeGetOver_PLC(object e)
{
try
{
DoWhatPlc.CustomeEvetnArgs msgEvent = (DoWhatPlc.CustomeEvetnArgs)e;
string OpName = Convert.ToString(msgEvent.OpName);
int tagValue = Convert.ToInt32(msgEvent.TagValue);
if (tagValue == 1)
{
bool MesRead = false;
int EngineTypeID;//机型代码
int PartPallet_Code;//托盘编号
string EngineType;//机型
string EngineID;//工件编号
MIS_BASE.Read_QualityData_Read_CF(OpName, out MesRead);
//第一步判断允许保存和保存完成信号是否全部被清空若未清空则通知复位MES&PLC
if (MesRead)
{
//未能清空信号,请求复位
SendInfomation("AskReset", "1", OpName);
return;
}
string OrderForm;
MIS_BASE.GetEngineTypeFromPLC(OpName, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code,out OrderForm);
if (EngineType == "" || EngineID == "")
{
AsyncSendMessage_Notice(OpName, "传递信号为空值!");
return;
}
EngineTypeGetOver_PLC_Work(OpName, EngineTypeID, EngineType, EngineID, PartPallet_Code,OrderForm);
}
}
catch (Exception err)
{
////ApplicationLog.WriteLog(err, "Function08:EngineTypeGetOver_PLC");
}
}
}
}