| | |
| | | |
| | | if (data.Length == 6) |
| | | { |
| | | if (data.Substring(0, 2) == "11") |
| | | if (data.Substring(2, 2) == "22") |
| | | { |
| | | if (LocationHelper.CheckLocFree(plc.TN_Location[0])) |
| | | { |
| | |
| | | |
| | | if (data.Length == 6) |
| | | { |
| | | if (data.Substring(0, 2) == "11") |
| | | if (data.Substring(2, 2) == "22") |
| | | { |
| | | if (LocationHelper.CheckLocFree(plc.TN_Location[0])) |
| | | { |
| | |
| | | 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} 未开启工单,不可触发满托下线", "瓶坯机"); |
| | |
| | | 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"); |
| | |
| | | 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"); |
| | |
| | | TaskProcess.sendSing(mst, 1101); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | else LogHelper.Info($"字典中未找到该key的数据,key:{mst.S_START_LOC}"); |
| | |
| | | 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"); |
| | |
| | | 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"); |