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

65 lines
1.9 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 OpcData;
using System;
using SystemFramework;
using System.Threading;
using System.Collections;
using System.Collections.Specialized;
using MisDataFunction;
using System.Diagnostics;
namespace MisDataName
{
//public partial class ___ { }
public partial class MisData
{
/// <summary>
/// 监控数据的所有变化,从这里产生
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public override void OPCTagData_TagDataOnChangeMIS(object sender, OpcData.CustomeEvetnArgs e)
{
Console.WriteLine($"【【{e.TagName}【【{e.TagValueBefore}->{e.TagValue}【【{ e.TagKeepTime}");
OPCTagData_TagDataOnChange(sender, e);
}
/// <summary>
/// 定时触发检测PLC在线状态周期3 s
/// </summary>
/// <param name="sender"></param>
/// <param name="eState"></param>
public override void PlcStateEvent(object sender, OpcData.PlcStateEvetnArgs eState)
{
}
public void OPCTagData_TagDataOnChange(object sender, OpcData.CustomeEvetnArgs e)
{
//处理MIS业务 保存数据
//ThreadPool.QueueUserWorkItem(Function.MIS_Funtion, e);
//处理MES业务 Function
ThreadPool.QueueUserWorkItem(TagData_MisData_TagDataOnChangeCustomeEvetnArgs, e);
//ThreadPool.QueueUserWorkItem(TagData_MisData_TagDataOnChange, e);
//设备状态日志
ThreadPool.QueueUserWorkItem(TagTypeCodeID_TagDataOnChange, e);
//发送通讯服务器 MES web界面显示用 加工位号
TransferInfToWebServer(e);
//改变控件状态
//showMessagePLCInvoke(e);
//更新状态窗口控件状态
//ExcutePlcChange(e);
}
}
}