111
cjs
2025-06-13 6226621ae47b6dd28e4517ca79bf66b6fa57d95e
ams/Hanhe.iWCS.TaizhouGEMTwoProtocol/ProcessHelper.cs
@@ -465,15 +465,14 @@
            try
            {
                string endMachLoc = "";
                string endLoc = "";
                //1、判断上料平台是否空闲,若空闲更改终点到上料平台
                var plc = Settings.GetPlcInfo().Where(a => a.deviceType == "18" && a.enable == 1).ToList();
                var plc = Settings.GetPlcInfo().Where(a => a.deviceType == "51" && a.enable == 1).ToList();
                if (plc.Count > 0)
                {
                    #region 判断输送线模式 变更注释
                    bool action = true;
                    foreach(var a in plc)
                    {
                        bool action = false;
                        var modeResult = OITcpHelper.RegisterReadOutPut(new OITcpHelper.RegisterReadOutPutModel
                        {
                            dataNum = 1,
@@ -483,10 +482,9 @@
                        });
                        if (modeResult != null && modeResult.errCode == 0)
                        {
                            CMMLog.Debug($"OutWareTask:读取滚筒机{a.ip}通道号为:{a.readAddr}的值为:{modeResult.result[0]}");
                            CMMLog.Debug($"OutWareTask:读取滚筒机ip:{a.ip},端口:{a.port}通道号为:{a.readAddr}的值为:{modeResult.result[0]}");
                            if (modeResult.result[0] == 2)
                            {
                                action = false;
                                CMMLog.Debug($"OutWareTask:输送线为 入库模式,输送线点位:{a.location}");
                                break;
                            }
@@ -498,12 +496,11 @@
                                {
                                    if (modelInfo.Mode == "入库模式")
                                    {
                                        action = false;
                                        CMMLog.Debug($"OutWareTask:中间表 ModeList为 入库模式");
                                    }
                                    else
                                    {
                                        action = true;
                                        int[] num = new int[1] { 1 };
                                        var writeRes = OITcpHelper.RegisterWriteOutPutMulti(new OITcpHelper.RegisterWriteOutPutModelMulti
                                        {
@@ -516,16 +513,16 @@
                                }
                                else
                                {
                                    action = false;
                                    CMMLog.Debug("OutWareTask:中间表 ModeList 为空");
                                }
                            }
                        }
                        if (!action)
                        {
                            return false;
                        }
                    };
                    if (!action)
                    {
                        return false;
                    }
                    #endregion
                    CMMLog.Info($"OutWareTask 11111");