| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 夿3个å®å
¨é¨ç¶æ |
| | | /// 夿3个ç«å° |
| | | /// </summary> |
| | | public static bool AQMStatus(List<AGVStation> aGVStatList) |
| | | { |
| | |
| | | } |
| | | |
| | | public static List<string> StationareaList = new List<string>() { "RGV111", "RGV116", "RGV110", "RGV112", "RGV114", "RGV115","RGV118" }; |
| | | public static List<string> InStationareaList = new List<string>() { "RGV101", "RGV103", "RGV105", "RGV108", "RGV109", "RGV104","RGV107" }; |
| | | |
| | | public static bool OutbounMotherChildCartbool(string DeviceChildCode) |
| | | { |
| | |
| | | /// </summary> |
| | | public static bool OutRGVStatice() |
| | | { |
| | | bool rgvbool=false; |
| | | bool rgvbool=true; |
| | | foreach (string AGVStation in StationareaList) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == AGVStation); |
| | | if (device == null) return false; |
| | | if (device == null) continue; |
| | | SpeStackerCrane Commonstacker = (SpeStackerCrane)device; |
| | | |
| | | DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == AGVStation && x.DeviceProParamName == "RgvCraneAutoStatus" && x.DeviceProParamType == "RgvCraneAutoStatus"); |
| | | int RGVState = GetDeviceAddress.RGVGetLine(Commonstacker, deviceProDTO.DeviceProAddress); |
| | | if (RGVState == 0) |
| | | if (RGVState == 1) |
| | | { |
| | | rgvbool= true; |
| | | return false; |
| | | } |
| | | } |
| | | return rgvbool; |
| | | } |
| | | |
| | | public static bool InRGVStatice() |
| | | { |
| | | bool rgvbool = true; |
| | | foreach (string AGVStation in InStationareaList) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == AGVStation); |
| | | if (device == null) continue; |
| | | SpeStackerCrane Commonstacker = (SpeStackerCrane)device; |
| | | |
| | | DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == AGVStation && x.DeviceProParamName == "RgvCraneAutoStatus" && x.DeviceProParamType == "RgvCraneAutoStatus"); |
| | | int RGVState = GetDeviceAddress.RGVGetLine(Commonstacker, deviceProDTO.DeviceProAddress); |
| | | if (RGVState == 1) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | return rgvbool; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åºåºï¼è¯»åRGVæ¯å¦ä¸ºç©ºé² |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static bool OutRGVRGVStepprocess() |
| | | { |
| | | bool rgvbool = true; |
| | | foreach (string AGVStation in StationareaList) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == AGVStation); |
| | | if (device == null) continue; |
| | | SpeStackerCrane Commonstacker = (SpeStackerCrane)device; |
| | | |
| | | DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == AGVStation && x.DeviceProParamName == "RGVStepprocess" && x.DeviceProParamType == "RGVStepprocess"); |
| | | int RGVState = GetDeviceAddress.RGVGetLine(Commonstacker, deviceProDTO.DeviceProAddress); |
| | | if (RGVState != 0) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | return rgvbool; |
| | | } |
| | | |
| | | public static bool InRGVRGVStepprocess() |
| | | { |
| | | bool rgvbool = true; |
| | | foreach (string AGVStation in InStationareaList) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == AGVStation); |
| | | if (device == null) continue; |
| | | SpeStackerCrane Commonstacker = (SpeStackerCrane)device; |
| | | |
| | | DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == AGVStation && x.DeviceProParamName == "RGVStepprocess" && x.DeviceProParamType == "RGVStepprocess"); |
| | | int RGVState = GetDeviceAddress.RGVGetLine(Commonstacker, deviceProDTO.DeviceProAddress); |
| | | if (RGVState != 0) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | return rgvbool; |
| | |
| | | { |
| | | try |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == DeviceCode); |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "HCJ2000"); |
| | | if (device == null) return false; |
| | | CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device; |
| | | DeviceProDTO? deviceProDTO = commonConveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == DeviceCode && x.DeviceProParamName == WriteType && x.DeviceProParamType == "DeviceCommand"); |
| | | return commonConveyorLine.Communicator.Write<short>(deviceProDTO.DeviceProDataBlock, (short)Writevalue); |
| | | return commonConveyorLine.Communicator.Write<short>(deviceProDTO.DeviceProAddress, (short)Writevalue); |
| | | } |
| | | catch (Exception) |
| | | { |