111
cjs
2025-07-08 7cc26b2202675a4ef2189a60c275bc9345bc9856
HH.WCS.Mobox3.NongFuLinZhi/process/DeviceProcess.cs
@@ -544,7 +544,7 @@
                if (data.Length == 6)
                {
                    if (data.Substring(0, 2) == "11")
                    if (data.Substring(2, 2) == "22")
                    {
                        if (LocationHelper.CheckLocFree(plc.TN_Location[0]))
                        {
@@ -652,7 +652,7 @@
                if (data.Length == 6)
                {
                    if (data.Substring(0, 2) == "11")
                    if (data.Substring(2, 2) == "22")
                    {
                        if (LocationHelper.CheckLocFree(plc.TN_Location[0]))
                        {
@@ -785,11 +785,11 @@
                    taskType = "注塑库存满托下线(瓶坯)";
                }
                //endArea = Settings.GetLinJiangBCPAreaList().Where(a => a.AreaName == "瓶坯满托" && a.Enable == "1").FirstOrDefault().AreaNo;
                if (data.Length == 4)
                if (data.Length == 8)
                {
                    if (data == "1122") LinZhialysisBottleCapAndPreformTwo(plc, db, workInfo, endArea, taskType, plc.TN_Location[0], "瓶坯机");
                    if (data.Substring(0,2) == "12") LinZhialysisBottleCapAndPreformTwo(plc, db, workInfo, endArea, taskType, plc.TN_Location[0], "瓶坯机");
                    if (data == "1221") LinZhialysisBottleCapAndPreformTwo(plc, db, workInfo, endArea, taskType, plc.TN_Location[1], "瓶坯机");
                    if (data.Substring(2,2) == "22") LinZhialysisBottleCapAndPreformTwo(plc, db, workInfo, endArea, taskType, plc.TN_Location[1], "瓶坯机");
                }
            }
            else LogHelper.Info($"瓶坯机:{plc.deviceName} 未开启工单,不可触发满托下线", "瓶坯机");
@@ -929,7 +929,7 @@
                if (mst.S_TYPE.Contains("翻斗机"))
                {
                    LogHelper.Info($"查询翻斗机允许取空信号 允许取空信号={LineState[mst.S_START_LOC.Trim()].status} 时间间隔={DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds}", "安全交互");
                    if ((LineState[mst.S_START_LOC.Trim()].status == "112100" || LineState[mst.S_START_LOC.Trim()].status == "112200") && DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds < 10)
                    if (LineState[mst.S_START_LOC.Trim()].status.Substring(4,2) == "00" && DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds < 10)
                    {
                        //NDCHelper.ChangeParam(mst.S_CODE.Trim(), 1101, 18);
                        NDCApi.ChangeOrderParam(mst.S_CODE.Trim(), 18, "1101");
@@ -941,7 +941,7 @@
                    LogHelper.Info($"查询输送线允许取满信号 允许取满信号={LineState[mst.S_START_LOC.Trim()].status} 时间间隔={DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds}", "安全交互");
                    if (mst.S_TYPE.Contains("满托下线"))
                    {
                        if ((LineState[mst.S_START_LOC.Trim()].status.Substring(4,2) == "01" || LineState[mst.S_START_LOC.Trim()].status.Substring(6,2) == "02") && DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds < 10)
                        if ((LineState[mst.S_START_LOC.Trim()].status.Substring(4,2) == "00" || LineState[mst.S_START_LOC.Trim()].status.Substring(4,2) == "02") && DateTime.Now.Subtract(LineState[mst.S_START_LOC.Trim()].modify).TotalSeconds < 10)
                        {
                            //NDCHelper.ChangeParam(mst.S_CODE.Trim(), 1101, 18);
                            NDCApi.ChangeOrderParam(mst.S_CODE.Trim(), 18, "1101");
@@ -956,7 +956,6 @@
                            TaskProcess.sendSing(mst, 1101);
                        }
                    }
                }
            }
            else LogHelper.Info($"字典中未找到该key的数据,key:{mst.S_START_LOC}");
@@ -973,7 +972,7 @@
                    if (mst.S_TYPE.Contains("翻斗机"))
                    {
                        LogHelper.Info($"查询翻斗机允许上满信号 允许上满信号={LineState[mst.S_END_LOC.Trim()].status} 时间间隔={DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds}", "安全交互");
                        if ((LineState[mst.S_END_LOC.Trim()].status == "112100" || LineState[mst.S_END_LOC.Trim()].status == "112200") && DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds < 10)
                        if (LineState[mst.S_END_LOC.Trim()].status.Substring(4,2) == "00" && DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds < 10)
                        {
                            //NDCHelper.ChangeParam(mst.S_CODE.Trim(), 1103, 18);
                            NDCApi.ChangeOrderParam(mst.S_CODE.Trim(), 18, "1103");
@@ -985,7 +984,7 @@
                        LogHelper.Info($"查询输送线允许补空信号 允许补空信号={LineState[mst.S_END_LOC.Trim()].status} 时间间隔={DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds}", "安全交互");
                        if (mst.S_TYPE.Contains("空托上线"))
                        {
                            if ((LineState[mst.S_END_LOC.Trim()].status.Substring(4,2) == "01" || LineState[mst.S_END_LOC.Trim()].status.Substring(6,2) == "02") && DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds < 10)
                            if ((LineState[mst.S_END_LOC.Trim()].status.Substring(4,2) == "00" || LineState[mst.S_END_LOC.Trim()].status.Substring(4,2) == "02") && DateTime.Now.Subtract(LineState[mst.S_END_LOC.Trim()].modify).TotalSeconds < 10)
                            {
                                //NDCHelper.ChangeParam(mst.S_CODE.Trim(), 1103, 18);
                                NDCApi.ChangeOrderParam(mst.S_CODE.Trim(), 18, "1103");