| | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 写入齐套结果 |
| | | /// 写入齐套结果、解析结果 |
| | | /// </summary> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="value">true:表示 齐套。false:不齐套</param> |
| | |
| | | |
| | | var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault(); |
| | | |
| | | int i_result = 0; |
| | | if (value) |
| | | MessageModel b2 = null; |
| | | if (stationCode == StationLocationEnum.BZ01.ToString()) |
| | | { |
| | | i_result = 998; |
| | | } |
| | | else |
| | | { |
| | | i_result = 999; |
| | | } |
| | | 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; |
| | | int i_result = 0; |
| | | if (value) |
| | | { |
| | | i_result = 998; |
| | | } |
| | | else |
| | | { |
| | | i_result = 999; |
| | | } |
| | | 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); |
| | |
| | | } |
| | | } |
| | | |
| | | public bool OutboundFinishConfirm(string stationCode, bool value, out string msg) |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="stationCode"></param> |
| | | /// <param name="value"></param> |
| | | /// <param name="msg"></param> |
| | | /// <param name="isClearData">是否需要清理数据</param> |
| | | /// <returns></returns> |
| | | public bool OutboundFinishConfirm(string stationCode, bool value, out string msg, bool isClearData) |
| | | { |
| | | try |
| | | { |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (value) |
| | | if (value && isClearData) |
| | | { |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, false, view_stationObj.W_ReqOut); |
| | | if (!b2.result) |
| | |
| | | /// <param name=""></param> |
| | | /// <param name=""></param> |
| | | /// <returns></returns> |
| | | public bool WritePalletizingTaskInfo(string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ,short lastnum, out string msg) |
| | | public bool WritePalletizingTaskInfo(string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum, out string msg) |
| | | { |
| | | try |
| | | { |
| | |
| | | stationObj.W_Inbound_TaskID); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_Length, length, view_stationObj.W_Length); |
| | | if (!b2.result) |
| | | { |
| | |
| | | stationObj.W_Height); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish); |
| | | if (!b2.result) |
| | | { |
| | |
| | | MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_PalletizingTaskFinish, value, view_stationObj.W_PalletizingTaskFinish); |
| | | if (!b2.result) |
| | | { |
| | | msg = string.Format("向Station"+stationCode+" 写入任务完成确认 地址{0} 写 " + value + "失败,返回结果:" + b2.resMsg, |
| | | msg = string.Format("向Station" + stationCode + " 写入任务完成确认 地址{0} 写 " + value + "失败,返回结果:" + b2.resMsg, |
| | | stationObj.W_OutboundFinishConfirm); |
| | | return false; |
| | | } |