| | |
| | | using System.Xml.Linq; |
| | | using SixLabors.ImageSharp; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; |
| | | |
| | | namespace WIDESEAWCS_Tasks.StackerCraneJob |
| | | { |
| | |
| | | /// <param name="Platformnumber">ç«å°ç¼å·</param> |
| | | public static bool HCJIsstock(string Platformnumber) |
| | | { |
| | | return true; |
| | | //è·åéè¦åºåæ¯å¦å»å
¥åºä¸å»ä¸åæ ¼è½½è´§å°ä»»å¡ |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "HCJ2000"); |
| | | CommonConveyorLine Commonstacker = (CommonConveyorLine)device; |
| | |
| | | |
| | | } |
| | | |
| | | public static List<string> StationareaList = new List<string>() { "RGV111", "RGV116", "RGV110", "RGV112", "RGV114", "RGV115" }; |
| | | public static List<string> StationareaList = new List<string>() { "RGV111", "RGV116", "RGV110", "RGV112", "RGV114", "RGV115","RGV118" }; |
| | | |
| | | public static bool OutbounMotherChildCartbool(string DeviceChildCode) |
| | | { |
| | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读å忝å¦ä¸ºæå¨ |
| | | /// </summary> |
| | | public static bool OutRGVStatice() |
| | | { |
| | | bool rgvbool=false; |
| | | foreach (string AGVStation in StationareaList) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == AGVStation); |
| | | if (device == null) return false; |
| | | 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) |
| | | { |
| | | rgvbool= true; |
| | | } |
| | | } |
| | | return rgvbool; |
| | | } |
| | | |
| | | public static bool WriteSecurityDoorpolice(string DeviceCode,string WriteType,int Writevalue) |
| | | { |
| | | try |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == DeviceCode); |
| | | 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); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | return false; |
| | | throw; |
| | | } |
| | | } |
| | | |
| | | |
| | | public static List<string> AQMListdata = new List<string>() { "AQM001", "AQM002"}; |
| | | /// <summary> |
| | | /// 夿å®å
¨é¨ç¶æ |
| | | /// </summary> |
| | | /// <param name="aqmtype">1为åºåºå®å
¨é¨3å·ï¼2为å
¥åºå®å
¨é¨å¤æ</param> |
| | | /// <returns></returns> |
| | | public static bool ReadAqmDecicStice(int aqmtype) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "HCJ2000"); |
| | | 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); |
| | | 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); |
| | | if (AQMldeng == 2) return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |