| | |
| | | var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | |
| | | var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 " + true + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_DataFinish); |
| | | return false; |
| | | } |
| | | |
| | | int i_result = 0; |
| | | if (value) |
| | | { |
| | |
| | | { |
| | | i_result = 999; |
| | | } |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_KittingInfo, i_result, view_stationObj.W_KittingInfo); |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_KittingInfo, i_result, view_stationObj.W_KittingInfo); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 " + value + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_DataFinish); |
| | | return false; |
| | | } |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 " + true + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_DataFinish); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | |
| | | var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 读码解析完成 " + true + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_DataFinish); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_Inbound_TaskID, inbound_TaskID, view_stationObj.W_Inbound_TaskID); |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Inbound_TaskID, inbound_TaskID, view_stationObj.W_Inbound_TaskID); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 入库任务号 " + inbound_TaskID + "失败,返回结果:" + b2.resMsg, |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station地址{0} 写 读码解析完成 " + true + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_DataFinish); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception ex) |