init: 导入项目到 meswork Gitea
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using MesServerWork;
|
||||
//using SystemFramework;
|
||||
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
partial class Functions_BASE_09
|
||||
{
|
||||
/// <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);
|
||||
|
||||
string opName_PrimaryLine="";
|
||||
if (MIS_BASE.hashtable_OpNameRepair == null)
|
||||
{
|
||||
MIS_BASE.InitHashtable_MesServerCode();
|
||||
}
|
||||
//获取总线工位号
|
||||
if (MIS_BASE.hashtable_OpNameRepair.ContainsKey(OpName))
|
||||
{
|
||||
opName_PrimaryLine = MIS_BASE.hashtable_OpNameRepair[OpName].ToString();
|
||||
}
|
||||
sendmessage(opName_PrimaryLine, tagValue, "EngineTypeGetOverMES_Subline");
|
||||
|
||||
if (tagValue == 1)
|
||||
{
|
||||
int EngineTypeID;//机型代码
|
||||
int PartPallet_Code;//托盘编号
|
||||
string EngineType;//机型
|
||||
string EngineID;//工件编号
|
||||
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, "Function09:EngineTypeGetOver_PLC");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using MesServerWork;
|
||||
//using SystemFramework;
|
||||
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
partial class Functions_BASE_09
|
||||
{
|
||||
/// <summary>
|
||||
/// 工件到位与离开时,清空MES自身信号
|
||||
/// </summary>
|
||||
/// <param name="OpName"></param>
|
||||
/// <param name="tagValue"></param>
|
||||
private void WorkStart(object e)
|
||||
{
|
||||
try
|
||||
{
|
||||
DoWhatPlc.CustomeEvetnArgs msgEvent = (DoWhatPlc.CustomeEvetnArgs)e;
|
||||
string OpName = Convert.ToString(msgEvent.OpName);
|
||||
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
||||
|
||||
string opName_PrimaryLine = "";
|
||||
//获取总线工位号
|
||||
if (MIS_BASE.hashtable_OpNameRepair == null)
|
||||
{
|
||||
MIS_BASE.InitHashtable_MesServerCode();
|
||||
}
|
||||
if (MIS_BASE.hashtable_OpNameRepair.ContainsKey(OpName))
|
||||
{
|
||||
opName_PrimaryLine = MIS_BASE.hashtable_OpNameRepair[OpName].ToString();
|
||||
}
|
||||
SendInfomation("ClearSubData", "0", opName_PrimaryLine);
|
||||
|
||||
sendmessage(opName_PrimaryLine, tagValue, "WorkStart_Subline");//显示分线工件到位、离开信号
|
||||
}
|
||||
catch(Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "Function09:WorkStart");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//分线发送工件到位信号函数
|
||||
private void sendmessage(string OpName, int tagValue, string Command)
|
||||
{
|
||||
string SendMessage = "MES|" + Command + "|" + OpName + "|" + tagValue;
|
||||
AsyncSendMessage(SendMessage);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user