| | |
| | | public static bool ReadAqmDecicStice(int aqmtype) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "HCJ2000"); |
| | | if (device == null) return false; |
| | | CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device; |
| | | if (aqmtype == 1) |
| | | { |
| | | DeviceProDTO? deviceProDTO = commonConveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == "AQM003" && x.DeviceProParamName == "IndicatorStatus" && x.DeviceProParamType == "ReadDeviceCommand"); |
| | | short AQMldeng = commonConveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProDataBlock); |
| | | short AQMldeng = commonConveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProAddress); |
| | | if (AQMldeng == 2) return false; |
| | | } |
| | | else |
| | |
| | | foreach (string aqmname in AQMListdata) |
| | | { |
| | | DeviceProDTO? deviceProDTO = commonConveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == aqmname && x.DeviceProParamName == "IndicatorStatus" && x.DeviceProParamType == "ReadDeviceCommand"); |
| | | short AQMldeng = commonConveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProDataBlock); |
| | | short AQMldeng = commonConveyorLine.Communicator.Read<short>(deviceProDTO.DeviceProAddress); |
| | | if (AQMldeng == 2) return false; |
| | | } |
| | | } |