| | |
| | | return apiResponse.ErrorResponse($"WCS任塿·»å é误ï¼åå ï¼{ex.Message}"); |
| | | } |
| | | } |
| | | //设置å
å¹ |
| | | |
| | | /// <summary> |
| | | /// 设置å
å¹ |
| | | /// </summary> |
| | | /// <param name="setCurtain"></param> |
| | | /// <returns></returns> |
| | | public ApiResponse setCurtain(SetCurtainRequest setCurtain) |
| | | { |
| | | if (setCurtain == null || setCurtain.Datas == null || setCurtain.Datas.Length == 0) |
| | |
| | | return apiResponse.ErrorResponse($"WCS设置å
å¹é误ï¼åå ï¼{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | /// <summary> |
| | | /// agvè¿åºå
¥åé¦ |
| | | /// </summary> |
| | | /// <param name="agvUpdateRequest"></param> |
| | | /// <returns></returns> |
| | | public ApiResponse getAGVStatus(AgvUpdateRequest agvUpdateRequest) |
| | | { |
| | | if (agvUpdateRequest == null) return new ApiResponse().ErrorResponse("请æ±åæ°ä¸è½ä¸ºç©º"); |
| | |
| | | int portStatus = conveyorLine.Communicator.Read<ushort>(permitHandShake.DeviceProAddress); |
| | | int stationStatus = conveyorLine.Communicator.Read<ushort>(stationNum.DeviceProAddress); |
| | | bool canEnter = (portStatus == 1 && stationStatus == 1) || (portStatus == 2 && stationStatus == 0); |
| | | |
| | | if (!canEnter) |
| | | { |
| | | if (request != null) conveyorLine.Communicator.Write<short>(request.DeviceProAddress, 0); |
| | |
| | | |
| | | commandResult = HttpHelper.Post<CommandResult>(urlWMStaskreturn, taskInfo1, "ä»»å¡ç¶æåè°"); |
| | | |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸åé¦ä»»å¡å®æ", "ä»»å¡ä¿¡æ¯", $"ä»»å¡å·ï¼{taskId}", $"è°ååæ°ï¼{taskInfo1.ToJsonString()},è¿ååæ°ï¼{commandResult.ToJsonString()}"); |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸åé¦ä»»å¡å®æ", "ä»»å¡ä¿¡æ¯", $"ä»»å¡å·ï¼ã{taskId}ã", $"è°ååæ°ï¼ã{taskInfo1.ToJsonString()}ã\nè¿ååæ°ï¼{commandResult.ToJsonString()}ã"); |
| | | return commandResult; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | string resujos = $"WCSæ¥å£é误ï¼åå ï¼{ex.Message}"; |
| | | commandResult.result = resujos.ToJsonString(); |
| | | |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸åé¦ä»»å¡å®æ", "ä»»å¡ä¿¡æ¯", $"ä»»å¡å·ï¼{taskId}", $"éè¦ä¸ä¼ WMSä¿¡æ¯å
容ï¼{commandResult.ToJsonString()},WCSæ¥å£é误ï¼åå ï¼{ex.Message}"); |
| | | WriteLog.Write_Log("忥ç»ä¸æ¸¸åé¦ä»»å¡å®æ", "ä»»å¡ä¿¡æ¯", $"ä»»å¡å·ï¼ã{taskId}ã", $"éè¦ä¸ä¼ WMSä¿¡æ¯å
容ï¼ã{commandResult.ToJsonString()}ã\nWCSæ¥å£é误ï¼åå ï¼{ex.Message}"); |
| | | return commandResult; |
| | | } |
| | | |