| | |
| | | |
| | | public static void PLCServiceReconnect(PLCService plcService) |
| | | { |
| | | if(plcService==null) |
| | | if (plcService == null) |
| | | { |
| | | return; |
| | | } |
| | |
| | | public static char PLCDBADDRESS_SEPARATE = '|'; |
| | | |
| | | |
| | | public static List<ThreadStatusMonitor> MainList=new List<ThreadStatusMonitor>(); |
| | | public static List<ThreadStatusMonitor> MainList = new List<ThreadStatusMonitor>(); |
| | | |
| | | private static object lockMainList = new object(); |
| | | public static async void UpdateMainList(ThreadStatusMonitor threadinfo) |
| | | { |
| | | await Task.Run(() => { |
| | | await Task.Run(() => |
| | | { |
| | | lock (lockMainList) |
| | | { |
| | | var info = MainList.Where(o => o.Threadcode == threadinfo.Threadcode).FirstOrDefault(); |
| | | if(info == null) |
| | | if (info == null) |
| | | { |
| | | MainList.Add(threadinfo); |
| | | } |
| | |
| | | DateTime time = DateTime.Now; |
| | | info.Remarks = threadinfo.Remarks; |
| | | info.Threadendtime = time;//每次都更新 |
| | | info.Threadlastmodifytime = threadinfo.Threadlastmodifytime>DateTime.MinValue? threadinfo.Threadlastmodifytime: info.Threadlastmodifytime;//如果有传参则更新 |
| | | info.Threadlastmodifytime = threadinfo.Threadlastmodifytime > DateTime.MinValue ? threadinfo.Threadlastmodifytime : info.Threadlastmodifytime;//如果有传参则更新 |
| | | info.ThreadId = threadinfo.ThreadId; |
| | | info.ThreadFrequency = threadinfo.ThreadFrequency; |
| | | info.UpdatedTime = time; |
| | |
| | | /// <summary> |
| | | /// 是否允许执行监控OP05工序打码完成标记线程 |
| | | /// </summary> |
| | | public static bool isAllowRuning_OP0501 |
| | | { |
| | | get { return _isAllowRuning_OP0501; } |
| | | set { |
| | | public static bool isAllowRuning_OP0501 |
| | | { |
| | | get { return _isAllowRuning_OP0501; } |
| | | set |
| | | { |
| | | lock (lockOP0501Runing) |
| | | { |
| | | _isAllowRuning_OP0501 = value; |
| | |
| | | /// <summary> |
| | | /// OP10工序测试完成标记值 |
| | | /// </summary> |
| | | public static string value_OP1002 = string.Empty; |
| | | public static string value_OP1002 = "FALSE";//注意:默认是FALSE 【Editby shaocx,2024-09-05】 |
| | | /// <summary> |
| | | /// OP10工序推出标记值 |
| | | /// </summary> |
| | | public static string value_OP1003 = string.Empty; |
| | | public static string value_OP1003 = "FALSE";//注意:默认是FALSE 【Editby shaocx,2024-09-05】 |
| | | /// <summary> |
| | | /// OP10工序SPC推出标记值 |
| | | /// </summary> |
| | | public static string value_OP1004 = string.Empty; |
| | | public static string value_OP1004 = "FALSE";//注意:默认是FALSE 【Editby shaocx,2024-09-05】 |
| | | /// <summary> |
| | | /// OP10工序完成标记值 |
| | | /// </summary> |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private static object lockOP3501Alert = new object(); |
| | | private static object lockOP3502Alert = new object(); |
| | | private static object lockOP3503Alert = new object(); |