| | |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEA_Common.Log; |
| | | using System.Xml.Linq; |
| | | using SixLabors.ImageSharp; |
| | | |
| | | namespace WIDESEAWCS_Tasks.StackerCraneJob |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="ChildPosiDeviceCode">设å¤</param> |
| | | /// <returns></returns> |
| | | public static int GetEquipmentlocation(string ChildPosiDeviceCode) |
| | | public static int GetEquipmentlocation(string ChildPosiDeviceCode) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == ChildPosiDeviceCode); |
| | | CommonStackerCrane Commonstacker = (CommonStackerCrane)device; |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO(Commonstacker, ChildPosiDeviceCode, "RGVCurrentlocation"); |
| | | int HCJGStatus = GetLine(Commonstacker, deviceProDTO.DeviceProAddress); |
| | | return HCJGStatus; |
| | | SpeStackerCrane speStackerCrane = (SpeStackerCrane)device; |
| | | GetStackerObject getStackerObject = new GetStackerObject(speStackerCrane); |
| | | return getStackerObject.RGVCurrentlocation; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¼ å
¥è®¾å¤ï¼è¿åå½å设å¤ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="ChildPosiDeviceCode">设å¤</param> |
| | | /// <returns></returns> |
| | | public static int GetEquipmentInformation(string ChildPosiDeviceCode) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == ChildPosiDeviceCode); |
| | | SpeStackerCrane speStackerCrane = (SpeStackerCrane)device; |
| | | GetStackerObject getStackerObject = new GetStackerObject(speStackerCrane); |
| | | if (getStackerObject.RgvCraneAutoStatusValue == RgvCraneAutoStatus.Automatic && |
| | | getStackerObject.StaclerkJobJobStatusValue == RgvJobCraneStatus.Ready && getStackerObject.RgvCraneWorkStatusValue == RGVStepprocess.NoAction) |
| | | { |
| | | return getStackerObject.RGVCurrentlocation; |
| | | } |
| | | else |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¼ å
¥è®¾å¤ï¼è¿åå½å设å¤ä¿¡æ¯ï¼å
¥åºæ¯è½¦ï¼éè¦å å
¥æ¯å¦æè´§å¤æ) |
| | | /// </summary> |
| | | /// <param name="ChildPosiDeviceCode">设å¤</param> |
| | | /// <returns></returns> |
| | | public static int GetEquipmentInMuche(string ChildPosiDeviceCode) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == ChildPosiDeviceCode); |
| | | SpeStackerCrane speStackerCrane = (SpeStackerCrane)device; |
| | | GetStackerObject getStackerObject = new GetStackerObject(speStackerCrane); |
| | | if (getStackerObject.RgvCraneAutoStatusValue == RgvCraneAutoStatus.Automatic && |
| | | getStackerObject.StaclerkJobJobStatusValue == RgvJobCraneStatus.Ready && getStackerObject.RgvCraneWorkStatusValue == RGVStepprocess.NoAction && getStackerObject.RgvCraneStatusValue == RgvEquipmentStatus.NoCargo) |
| | | { |
| | | return getStackerObject.RGVCurrentlocation; |
| | | } |
| | | else |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢å
·ä½å°å |
| | | /// ä¼ å
¥è®¾å¤ç¼å·ï¼å¤æè®¾å¤ç¶ææ¯å¦å¯è¿å
¥ |
| | | /// </summary> |
| | | /// <param name="ChildPosiDeviceCode"></param> |
| | | /// <returns></returns> |
| | | public static bool ReturnCurrentStatus(string ChildPosiDeviceCode) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == ChildPosiDeviceCode); |
| | | SpeStackerCrane speStackerCrane = (SpeStackerCrane)device; |
| | | GetStackerObject getStackerObject = new GetStackerObject(speStackerCrane); |
| | | if (getStackerObject.RgvCraneAutoStatusValue == RgvCraneAutoStatus.Automatic && |
| | | getStackerObject.StaclerkJobJobStatusValue == RgvJobCraneStatus.Ready && getStackerObject.RgvCraneWorkStatusValue == RGVStepprocess.NoAction) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢HCJç«å°è®¾å¤ |
| | | /// </summary> |
| | | /// <param name="Commonstacker"></param> |
| | | /// <param name="SCAddress"></param> |
| | |
| | | return Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == SCAddress && x.DeviceProParamName == Interactivet && x.DeviceProParamType == "ReadDeviceCommand"); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢RGVè®¾å¤ |
| | | /// </summary> |
| | | /// <param name="Commonstacker"></param> |
| | | /// <param name="SCAddress"></param> |
| | | /// <param name="Interactivet"></param> |
| | | /// <returns></returns> |
| | | public static DeviceProDTO? GetRGVDeviceProDTO(SpeStackerCrane Commonstacker, string SCAddress, string Interactivet) |
| | | { |
| | | return Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == SCAddress && x.DeviceProParamName == Interactivet && x.DeviceProParamType == "ReadDeviceCommand"); |
| | | } |
| | | /// <summary> |
| | | /// 读å设å¤ä¿¡æ¯ |
| | | /// </summary> |
| | |
| | | /// <param name="DeviceProDataBlock"></param> |
| | | /// <returns></returns> |
| | | public static int GetLine(CommonStackerCrane Commonstacker, string DeviceProDataBlock) |
| | | { |
| | | return Commonstacker.Communicator.Read<short>(DeviceProDataBlock); |
| | | } |
| | | |
| | | public static int RGVGetLine(SpeStackerCrane Commonstacker, string DeviceProDataBlock) |
| | | { |
| | | return Commonstacker.Communicator.Read<short>(DeviceProDataBlock); |
| | | } |
| | |
| | | { |
| | | WriteLog.Write_Log(SCLLinStack, Filename, Logtype, new { ä¿¡æ¯ = Magessadd }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¼ å
¥ç«å°ç¼å·ï¼å¤ææ¯å¦æè´§ |
| | | /// </summary> |
| | | /// <param name="Platformnumber">ç«å°ç¼å·</param> |
| | | public static bool HCJIsstock(string Platformnumber) |
| | | { |
| | | //è·åéè¦åºåæ¯å¦å»å
¥åºä¸å»ä¸åæ ¼è½½è´§å°ä»»å¡ |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "HCJ2000"); |
| | | CommonStackerCrane Commonstacker = (CommonStackerCrane)device; |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO(Commonstacker, Platformnumber.ToString(), "HCJ_GoodsStatus"); |
| | | int HCJGStatus = GetLine(Commonstacker, deviceProDTO.DeviceProAddress); |
| | | if (HCJGStatus == 0) //为æ è´§ |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |