Files
16-Xikai-MesProjectNew/MisDataFunction/Function1054/OpcServer/TransferSequence.cs
2026-05-29 09:34:04 +08:00

63 lines
2.6 KiB
C#
Raw 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 MesServerWork;
using MisDataFunDll;
using System;
using WebApi;
namespace MesServerFunctions
{
partial class FunctionMES
{
/// <summary>
/// 转序操作
/// </summary>
/// <param name="e"></param>
private void TransferSequence(object e)
{
try
{
DeviceDriver_BasicData.CustomeEvetnArgs msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
string OpName = Convert.ToString(msgEvent.OpName);
int tagValue = Convert.ToInt32(msgEvent.TagValue);
string msg;
if (tagValue == 1)
{
//// 记录转序请求状态
//MisDataFun.Location_MIS_MOBY_Insert(OpName, "TransferSequence", "1");
//MisDataFun.Location_MIS_MOBY_Insert(OpName, "配送类型", "4");
//// 调用转序接口
//// deliveryType: 1退托盘2叫料3送料4转序5下空6上空7点对点
//bool isOk = CALL_Inerface_DataHandle.CALL_Inerface_CallMaterial(OpName, "4");
//if (isOk)
//{
// msg = $"【{OpName}】转序操作成功";
// MIS_BASE.WritePLC(306, OpName, 1); // 任务状态反馈
//}
//else
//{
// msg = $"【{OpName}】转序操作失败";
// MIS_BASE.WritePLC(306, OpName, 2); // 任务状态反馈
//}
//SendMessage.AsyncSendMessage_Notice(OpName, msg);
//MyLog4Net.MyLogHelper.Info("TransferSequence", msg);
}
else
{
MisDataFun.Location_MIS_MOBY_Insert(OpName, "TransferSequence", "0");
MIS_BASE.WritePLC(301, OpName, false); // 请求进入
MIS_BASE.WritePLC(302, OpName, false); // 托盘到位 器具放置完毕
MIS_BASE.WritePLC(303, OpName, false); // AGV已离开
MIS_BASE.WritePLC(305, OpName, "0"); // 比对结果
MIS_BASE.WritePLC(304, OpName, false); // 比对完成
MIS_BASE.WritePLC(306, OpName, 0); // 任务状态反馈
}
}
catch (Exception err)
{
MisDataSaveDate.FuntionMesRead.Alarm_SaveFileLog4Error(System.Reflection.MethodBase.GetCurrentMethod().Name, e, "Fun1054", err);
}
}
}
}