| | |
| | | { |
| | | try |
| | | { |
| | | CommonConveyorLine? conveyorLine = null; |
| | | lock (Storage.Devices) |
| | | { |
| | | CommonConveyorLine? conveyorLine = null; |
| | | string deviceCode = Roadway == "C" ? "1004" : "1003"; |
| | | conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceCode == deviceCode) as CommonConveyorLine; |
| | | } |
| | | if (conveyorLine == null) return false; |
| | | |
| | | DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == NextAddress && x.DeviceProParamName == "StationNum"); |
| | |
| | | { |
| | | |
| | | CommonConveyorLine? conveyorLine = null; |
| | | lock (Storage.Devices) |
| | | { |
| | | string deviceCode = Roadway == "C" ? "1004" : "1003"; |
| | | conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceCode == deviceCode) as CommonConveyorLine; |
| | | } |
| | | if (conveyorLine == null) return false; |
| | | |
| | | DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == SourceAddress && x.DeviceProParamName == "StationNum"); |
| | |
| | | int StationNum = conveyorLine.Communicator.Read<ushort>(deviceProDTO.DeviceProAddress); |
| | | int HandShake = conveyorLine.Communicator.Read<ushort>(HandShakeprodto.DeviceProAddress); |
| | | WriteLog.Write_Log("å
¥åºåºå£ç¶æä¿¡æ¯", "å
¥åºåºå£ç¶æä¿¡æ¯", $"åºå£æ¯ã{SourceAddress}ãï¼ç³è¯·ç¶æå°åï¼ã{HandShakeprodto.DeviceProAddress}ã,读åçæ°æ®ï¼ã{HandShake}ã\nåºå£æ¯å¦æè´§ç¶æå°åï¼ã{deviceProDTO.DeviceProAddress}ãï¼è¯»åçæ°æ®ã{StationNum}ã"); |
| | | return (StationNum == 1 && HandShake == 0) ? true : false; |
| | | return StationNum == 1; |
| | | } |
| | | catch (Exception ex) |
| | | { |