| | |
| | | opc.Write(OPCOutputTag.DetectResult_NG, false); |
| | | CommonUtil.WriteLog(LogType.Inf, "初始化下料NA"); |
| | | |
| | | //250表示启动时需要大复位报警 |
| | | opc.Write(OPCOutputTag.Alarm, 250); |
| | | CommonUtil.WriteLog(LogType.Inf, "软件启动大复位"); |
| | | |
| | | string continuousNGStr = ConfigurationManager.AppSettings["ContinuousNGThreshold"]; |
| | | if (int.TryParse(continuousNGStr, out int temp)) |
| | | { |
| | |
| | | opc.Write(OPCOutputTag.DetectResult_OK, true); |
| | | opc.Write(OPCOutputTag.DetectResult_NG, false); |
| | | |
| | | CommonUtil.WriteLog(LogType.Inf, $"{x.DetectID}|{x.ProductNo}产品应放入OK Tray"); |
| | | CommonUtil.WriteLog(LogType.Inf, $"{x?.DetectID}|{x?.ProductNo}产品应放入OK Tray"); |
| | | |
| | | _continuousNG = 0; |
| | | break; |
| | |
| | | opc.Write(OPCOutputTag.DetectResult_OK, false); |
| | | opc.Write(OPCOutputTag.DetectResult_NG, true); |
| | | |
| | | CommonUtil.WriteLog(LogType.Inf, $"{x.DetectID}|{x.ProductNo}产品应放入NG Tray"); |
| | | CommonUtil.WriteLog(LogType.Inf, $"{x?.DetectID}|{x?.ProductNo}产品应放入NG Tray"); |
| | | CommonUtil.StepControl.RemoveById(detectID); |
| | | |
| | | _continuousNG++; |
| | |
| | | opc.Write(OPCOutputTag.DetectResult_OK, false); |
| | | opc.Write(OPCOutputTag.DetectResult_NG, false); |
| | | |
| | | CommonUtil.WriteLog(LogType.Inf, $"{x.DetectID}|{x.ProductNo}产品应放入NA Tray"); |
| | | CommonUtil.WriteLog(LogType.Inf, $"{x?.DetectID}|{x?.ProductNo}产品应放入NA Tray"); |
| | | CommonUtil.StepControl.RemoveById(detectID); |
| | | |
| | | _continuousNG = 0; |
| | |
| | | if (_continuousNG >= _continuousNGThreshold) |
| | | { |
| | | //脚本中设置报警码2000表示连续NG次数到达设定报警上限 |
| | | opc.Write(OPCInputTag.Alarm, 2000); |
| | | opc.Write(OPCOutputTag.Alarm, 2000); |
| | | |
| | | CommonUtil.WriteLog(LogType.Inf, $"产品连续NG{_continuousNG}次,报警提示"); |
| | | _continuousNG = 0; |