| | |
| | | if (Stations.Station_material == (int)RGVEquipment.AQMexit) |
| | | { |
| | | |
| | | bool Security = SecurityDoorEquipment(conveyorLine, Stations); |
| | | bool Security = SecurityDoorEquipment(conveyorLine, Stations); //å®å
¨é¨ |
| | | if (Security) continue; |
| | | |
| | | } |
| | | else |
| | | { |
| | | bool HCJPlat=PlatformEquipmentInformation(conveyorLine, Stations); |
| | | bool HCJPlat=PlatformEquipmentInformation(conveyorLine, Stations); //å¼å¸¸ç«å°ï¼åºåºç«å° |
| | | if (HCJPlat) continue; |
| | | } |
| | | |
| | |
| | | //å¤çå®å
¨é¨çé»è¾ |
| | | private void HandleDoorRequest(AQMReturnnormal aQMConveyor, AGVStation aGVStation,int tasktype) //1ï¼å
¥åº 2ï¼åºåº |
| | | { |
| | | if (_gvOperationService.AQMReadAlarminform(tasktype) && _equipmentStatusService.GetSCstatus()) |
| | | /*bool RGValarm = _gvOperationService.AQMReadAlarminform(tasktype); |
| | | bool SCstatus = _equipmentStatusService.GetSCstatus(); |
| | | if (RGValarm || SCstatus) |
| | | { |
| | | //åå
¥æ¥è¦ |
| | | GetDeviceAddress.WriteSecurityDoorpolice(aGVStation.ChildPosiDeviceCode, "AlarmSummary", 1); |
| | | _gvOperationService.WriteOutbuttonpause(null); |
| | | } |
| | | |
| | | bool RGVRGV_DWorkingmode = tasktype == 1 ? _gvOperationService.InWriteOutbuttonpause(null).Status : _gvOperationService.WriteOutbuttonpause(null).Status; |
| | | }*/ |
| | | |
| | | if (aQMConveyor.DoorRequest == 1 && aQMConveyor.IndicatorStatus == (int)SafetyDoorStatus.YellowBlink2Hz) |
| | | { |
| | |
| | | // æ ¹æ®ä»»å¡ç±»åéæ©å¤ççç¥ |
| | | if (Stations.Station_tasktype == (int)RGVTasktype.Outbound) |
| | | { |
| | | if (aQMConveyor.EmergencyStopStatus == 0) _gvOperationService.WriteOutbuttonpause(null); |
| | | if (aQMConveyor.EmergencyStopStatus == 0 || aQMConveyor.SafetyLockStatus==0) _gvOperationService.WriteOutbuttonpause(null); |
| | | HandleDoorRequest(aQMConveyor, Stations, 2); |
| | | } |
| | | else |
| | | { |
| | | if (aQMConveyor.EmergencyStopStatus == 0) _gvOperationService.InWriteOutbuttonpause(null); |
| | | if (aQMConveyor.EmergencyStopStatus == 0 || aQMConveyor.SafetyLockStatus == 0) _gvOperationService.InWriteOutbuttonpause(null); |
| | | HandleDoorRequest(aQMConveyor, Stations, 1); |
| | | } |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | PlatformStatus aQMConveyor = StoticCommand(conveyorLine, Stations.ChildPosiDeviceCode); |
| | | if (aQMConveyor != null) |
| | | if (StoticCommand(conveyorLine, Stations.HCJStorageaddress.ToString())) //å¯è¿è¡æ¾è´§ |
| | | { |
| | | if (aQMConveyor.HCJ_GoodsStatus == 0) //å¯è¿è¡æ¾è´§ |
| | | WebResponseContent webResponseContent = new WebResponseContent(); |
| | | //æ ¹æ®ç±»åæ¥æ¾ä»»å¡ |
| | | if (Stations.Station_material == (int)RGVEquipment.AbnormalOutbound) |
| | | { |
| | | WebResponseContent webResponseContent = new WebResponseContent(); |
| | | //æ ¹æ®ç±»åæ¥æ¾ä»»å¡ |
| | | if (Stations.Station_material == (int)RGVEquipment.AbnormalOutbound) |
| | | { |
| | | //æ¥æ¾æ¯å¦æå¼å¸¸æ¬è¿ä»»å¡ |
| | | webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 1); //è¿éè¦ä¼ å
¥å°å |
| | | } |
| | | else |
| | | { |
| | | //åºåºç«å°çä»»å¡ |
| | | webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 2); |
| | | } |
| | | //æ¥æ¾æ¯å¦æå¼å¸¸æ¬è¿ä»»å¡ |
| | | webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 1); //è¿éè¦ä¼ å
¥å°å |
| | | } |
| | | else |
| | | { |
| | | //åºåºç«å°çä»»å¡ |
| | | webResponseContent = _taskService.UpdateDeliveryAddress(Stations.HCJStorageaddress.ToString(), 2); |
| | | } |
| | | } |
| | | |
| | | |
| | | return false; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | |
| | | //ç«å°ä¿¡å· |
| | | public PlatformStatus StoticCommand(CommonConveyorLine conveyorLine, string kladder) |
| | | public bool StoticCommand(CommonConveyorLine conveyorLine, string kladder) |
| | | { |
| | | PlatformStatus conveyorRgvCommand = new PlatformStatus(); |
| | | List<DeviceProDTO> deviceProDTO6 = conveyorLine.DeviceProDTOs |
| | | .Where(x => x.DeviceChildCode == kladder |
| | | && x.DeviceProParamName== "HCJ_GoodsStatus" |
| | | && x.DeviceProParamType == "ReadDeviceCommand") |
| | | .ToList(); |
| | | foreach (var item in deviceProDTO6) |
| | | { |
| | | var paramName = item.DeviceProParamName; |
| | | var propertyInfo = typeof(PlatformStatus).GetProperty(paramName); |
| | | DeviceProDTO? deviceProDTO6 = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == kladder |
| | | && x.DeviceProParamName == "HCJ_GoodsStatus" |
| | | && x.DeviceProParamType == "ReadDeviceCommand"); |
| | | if(deviceProDTO6 == null) { return false; } |
| | | |
| | | if (propertyInfo != null) |
| | | { |
| | | if (item.DeviceDataType == "short") |
| | | { |
| | | var value = conveyorLine.Communicator.Read<short>(item.DeviceProAddress); |
| | | propertyInfo.SetValue(conveyorRgvCommand, value); |
| | | } |
| | | } |
| | | } |
| | | return conveyorRgvCommand; |
| | | var value = conveyorLine.Communicator.Read<short>(deviceProDTO6.DeviceProAddress); |
| | | if (value == 0) { return true; } |
| | | return false; |
| | | } |
| | | |
| | | |