1
czw
2025-07-06 42178c2120a5595a57d8f3d5a394ad2caeac6585
2025Äê6ÔÂ12ÈÕ/AuxAllWCS/Build/Project/´úÂë/VS×Ô¶¨ÒåÀà/AutoThread.cs
@@ -303,10 +303,13 @@
                                sceneType = 1,
                                cntrCode = traycode,
                            }));
                            if (str.Contains("true"))
                            var strr = JsonConvert.DeserializeObject<Mesrespone>(str);
                            if (strr != null && strr.success)
                            //if (str.Contains("true"))
                            {
                                //Conn.默认Redis.SetValue("维希尔抓臂1.R10", "true", "维希尔抓臂1Queue");
                                tag.wxr1.R10 = true;
                                //tag.wxr1.R10 = true;
                                Conn.默认Redis.SetValue(VERX.deviceName + ".R10", "true", VERX.deviceName + "Queue");
                                //tag.wxr1.R44_LAST = false;
                                RedisHelper.Add($"维希尔抓臂1.R44_LAST", "false", out string msg);
                            }
@@ -316,6 +319,10 @@
                            }
                        }
                        else { TcpServer.TcpServerSend(VERX.deviceNo[0], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); }
                    }
                    else if (!tag.wxr1.R10)
                    {
                        TcpServer.TrayIps.Remove(VERX.deviceNo[0]);
                    }
                }
            }
@@ -378,10 +385,13 @@
                                sceneType = 1,
                                cntrCode = traycode,
                            }));
                            if (str.Contains("true"))
                            var strr = JsonConvert.DeserializeObject<Mesrespone>(str);
                            if (strr != null && strr.success)
                                //if (str.Contains("true"))
                            {
                                //Conn.默认Redis.SetValue("维希尔抓臂1.R10", "true", "维希尔抓臂1Queue");
                                tag.wxr1.R11 = true;
                                //tag.wxr1.R11 = true;
                                Conn.默认Redis.SetValue(VERX.deviceName + ".R11", "true", VERX.deviceName + "Queue");
                                //tag.wxr1.R46_LAST = false;
                                RedisHelper.Add($"维希尔抓臂1.R46_LAST", "false", out string msg);
                            }
@@ -391,6 +401,10 @@
                            }
                        }
                        else { TcpServer.TcpServerSend(VERX.deviceNo[1], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); }
                    }
                    else if (!tag.wxr1.R11)
                    {
                        TcpServer.TrayIps.Remove(VERX.deviceNo[1]);
                    }
                }
            }
@@ -453,10 +467,13 @@
                                sceneType = 1,
                                cntrCode = traycode,
                            }));
                            if (str.Contains("true"))
                            var strr = JsonConvert.DeserializeObject<Mesrespone>(str);
                            if (strr != null && strr.success)
                                //if (str.Contains("true"))
                            {
                                //Conn.默认Redis.SetValue("维希尔抓臂1.R10", "true", "维希尔抓臂1Queue");
                                tag.wxr2.R10 = true;
                                //tag.wxr2.R10 = true;
                                Conn.默认Redis.SetValue(VERX.deviceName + ".R10", "true", VERX.deviceName + "Queue");
                                //tag.wxr2.R44_LAST = false;
                                RedisHelper.Add($"维希尔抓臂2.R44_LAST", "false", out string msg);
                            }
@@ -466,6 +483,10 @@
                            }
                        }
                        else { TcpServer.TcpServerSend(VERX.deviceNo[0], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); }
                    }
                    else if (!tag.wxr2.R10)
                    {
                        TcpServer.TrayIps.Remove(VERX.deviceNo[0]);
                    }
                }
            }
@@ -531,12 +552,17 @@
                                sceneType = 1,
                                cntrCode = traycode,
                            }));
                            if (str.Contains("true"))
                            var strr = JsonConvert.DeserializeObject<Mesrespone>(str);
                            if (strr != null && strr.success)
                            {
                                //Conn.默认Redis.SetValue("维希尔抓臂1.R10", "true", "维希尔抓臂1Queue");
                                tag.wxr2.R11 = true;
                                //Conn.默认Redis.SetValue("维希尔抓臂1.R11", "true", "维希尔抓臂1Queue");
                                //tag.wxr2.R11 = true;
                                LogHelper.Info($"Threadwxr2R。。  -写R11 true");
                                Conn.默认Redis.SetValue(VERX.deviceName + ".R11", "true", VERX.deviceName + "Queue");
                                //tag.wxr2.R46_LAST = false;
                                RedisHelper.Add($"维希尔抓臂2.R46_LAST", "false", out string msg);
                                LogHelper.Info($"Threadwxr2R。。 æ ¡éªŒä¸‹æ–™å®Œæˆã€‚");
                            }
                            else
                            {
@@ -548,6 +574,10 @@
                            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]);
                    }
                }
            }
@@ -2427,6 +2457,12 @@
        public Ddata data { get; set; }
        public object extra { get; set; }
    }
    class Mesrespone
    {
        public bool success { get; set; }
        public string msg { get; set; }
        public object extra { get; set; }
    }
    public class Ddata
    {