| | |
| | | } |
| | | |
| | | // æ§è¡å§æ |
| | | if (methodName != "TaskEverythingRun") |
| | | return null; |
| | | //if (methodName != "TaskEverythingRun") |
| | | // return null; |
| | | return methodDelegate.DynamicInvoke(args); |
| | | } |
| | | |
| | |
| | | |
| | | if (VERX != null) |
| | | { |
| | | if (tag.wxr1.R44) |
| | | LogHelper.Info($"{VERX.deviceName} R44>{tag.wxr1.R44} R44LAST>{tag.wxr1.R44_LAST} R10>{tag.wxr1.R10}"); |
| | | if (tag.wxr1.R44 && !tag.wxr1.R44_LAST && tag.wxr1.R10) |
| | | { |
| | | if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) |
| | |
| | | if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) |
| | | { |
| | | //䏿¥æ ¡éªã |
| | | LogHelper.Info($"{VERX.deviceNo[0]} 䏿¥æ ¡éª>{traycode}"); |
| | | |
| | | ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson); |
| | | var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new |
| | | { |
| | |
| | | } |
| | | else { TcpServer.TcpServerSend(VERX.deviceNo[0], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); } |
| | | } |
| | | else if (!tag.wxr1.R10) |
| | | { |
| | | TcpServer.TrayIps.Remove(VERX.deviceNo[0]); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | if (VERX != null) |
| | | { |
| | | if (tag.wxr1.R46) |
| | | LogHelper.Info($"{VERX.deviceName} R44>{tag.wxr1.R46} R44LAST>{tag.wxr1.R46_LAST} R10>{tag.wxr1.R11}"); |
| | | if (tag.wxr1.R46 && !tag.wxr1.R46_LAST && tag.wxr1.R11) |
| | | { |
| | | if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) |
| | |
| | | if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) |
| | | { |
| | | //䏿¥æ ¡éªã |
| | | LogHelper.Info($"{VERX.deviceNo[1]} 䏿¥æ ¡éª>{traycode}"); |
| | | ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson); |
| | | var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new |
| | | { |
| | |
| | | } |
| | | else { TcpServer.TcpServerSend(VERX.deviceNo[1], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); } |
| | | } |
| | | else if (!tag.wxr1.R11) |
| | | { |
| | | TcpServer.TrayIps.Remove(VERX.deviceNo[1]); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | if (VERX != null) |
| | | { |
| | | if (tag.wxr2.R44) |
| | | LogHelper.Info($"{VERX.deviceName} R44>{tag.wxr2.R44} R44LAST>{tag.wxr2.R44_LAST} R10>{tag.wxr2.R10}"); |
| | | if (tag.wxr2.R44 && !tag.wxr2.R44_LAST && tag.wxr2.R10) |
| | | { |
| | | if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) |
| | |
| | | if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) |
| | | { |
| | | //䏿¥æ ¡éªã |
| | | LogHelper.Info($"{VERX.deviceNo[0]} 䏿¥æ ¡éª>{traycode}"); |
| | | ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson); |
| | | var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new |
| | | { |
| | |
| | | } |
| | | else { TcpServer.TcpServerSend(VERX.deviceNo[0], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); } |
| | | } |
| | | else if (!tag.wxr2.R10) |
| | | { |
| | | TcpServer.TrayIps.Remove(VERX.deviceNo[0]); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | if (VERX != null) |
| | | { |
| | | if (tag.wxr2.R46) |
| | | LogHelper.Info($"{VERX.deviceName} R44>{tag.wxr2.R46} R44LAST>{tag.wxr2.R46_LAST} R10>{tag.wxr2.R11}"); |
| | | if (tag.wxr2.R46 && !tag.wxr2.R46_LAST && tag.wxr2.R11) |
| | | { |
| | | if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) |
| | |
| | | else |
| | | if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) |
| | | { |
| | | LogHelper.Info($"Threadwxr2R 䏿¥æ ¡éª>{traycode}"); |
| | | LogHelper.Info($"{VERX.deviceNo[1]} 䏿¥æ ¡éª>{traycode}"); |
| | | //䏿¥æ ¡éªã |
| | | ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson); |
| | | var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new |
| | |
| | | LogHelper.Info($"Threadwxr2Rãã -åéæ«ç "); |
| | | TcpServer.TcpServerSend(VERX.deviceNo[1], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); |
| | | } |
| | | } |
| | | else if (!tag.wxr2.R11) |
| | | { |
| | | TcpServer.TrayIps.Remove(VERX.deviceNo[1]); |
| | | } |
| | | } |
| | | } |
| | |
| | | foreach (var task in tasks) |
| | | { |
| | | LogHelper.Info($"è§£éMESä»»å¡ ->{task.S_TASK_NO} "); |
| | | if (task.S_TYPE?.Trim() == "100") |
| | | { |
| | | LogHelper.Info($"MESä»»å¡ S_TYPE 100->{task.S_TYPE} "); |
| | | } |
| | | var sx = VERXs?.Find(x => x.location.Contains(task.S_END_LOC)); |
| | | LogHelper.Info($"è§£éMESä»»å¡ ->{task.S_TASK_NO} {(sx == null ? "é" : "æ¯")}æ»è£
æºå¨äººä»»å¡"); |
| | | if (sx == null) |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public class HttpServer |
| | | { |
| | | System.Net.HttpListener HttpSvcHost = null; |
| | | |
| | | private readonly string _listenerPrefix = ""; |
| | | public static string _listenerPrefix = ""; |
| | | public HttpServer(string ip) |
| | | { |
| | | _listenerPrefix = ip; |
| | | _listenerPrefix = $"http://{ip}:8808/"; |
| | | } |
| | | public void HttpServerRun() |
| | | { |
| | | HttpSvcHost = new System.Net.HttpListener(); |
| | | HttpSvcHost.AuthenticationSchemes = System.Net.AuthenticationSchemes.Anonymous; |
| | | HttpSvcHost.Prefixes.Add($"http://{_listenerPrefix}:8808/"); |
| | | HttpSvcHost.Prefixes.Add(_listenerPrefix); |
| | | HttpSvcHost.Start(); |
| | | HttpSvcHost.BeginGetContext(HttpSvcListenerCallback, null); |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | internal class WebSocketClient |
| | | { |