| | |
| | | using Microsoft.AspNetCore.Components.Routing; |
| | | using Microsoft.AspNetCore.Hosting; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using Quartz; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_QuartzJob.Models; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | |
| | | CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams"); |
| | | if (commonStackerCrane != null) |
| | | { |
| | | //Signalinteraction(commonStackerCrane); //åºåºä¿¡å·äº¤äº |
| | | Siganlinteraction2(commonStackerCrane); //å
¥åºä¿¡å·äº¤äº |
| | | if (!commonStackerCrane.IsEventSubscribed) |
| | | { |
| | | commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//订é
ä»»å¡å®æäºä»¶ |
| | |
| | | |
| | | if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal) |
| | | { |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams"); |
| | | Signalinteraction(conveyorLine, commonStackerCrane); |
| | | |
| | | |
| | | commonStackerCrane.CheckStackerCraneTaskCompleted();//鲿¢ä»»å¡å®æäºä»¶çæµè¶
æ¶ï¼åæå¨è§¦å䏿¬¡ |
| | | |
| | | if (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby) |
| | |
| | | /// <returns>妿æªè¢«å ç¨ï¼è¿åä¼ å
¥çä»»å¡ä¿¡æ¯ï¼å¦åï¼è¿ånull</returns> |
| | | private Dt_Task? OutTaskStationIsOccupied([NotNull] Dt_Task task) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1002"); |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceProDTOs.Exists(x => x.DeviceChildCode == task.TargetAddress)); |
| | | if (device != null) |
| | | { |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)device; |
| | | if (conveyorLine.IsOccupied(task.TargetAddress))//åºåºç«å°æªè¢«å ç¨ |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO(conveyorLine, task.TargetAddress, "R_Event"); //æ ¹æ®å åæºå°åï¼å°ååç§°æ¾åè®® |
| | | if (deviceProDTO != null) |
| | | { |
| | | int B_Event_Test = GetLine(conveyorLine, deviceProDTO.DeviceProDataBlock); //夿è¾é线æ¯å¦å
许æ¾è´§ä¿¡å· |
| | | if (B_Event_Test == 0) |
| | | { |
| | | return task; |
| | | } |
| | | } |
| | | } |
| | | else |
| | |
| | | return null; |
| | | } |
| | | |
| | | public void Signalinteraction(CommonConveyorLine conveyorLine, CommonStackerCrane commonStackerCrane) |
| | | public void Signalinteraction(CommonStackerCrane commonStackerCrane) |
| | | { |
| | | //å
¥åºä¿¡å·äº¤äº |
| | | int B_Event = conveyorLine.Communicator.Read<int>("PLC_WCS_B.01_EVENT"); |
| | | int B_Event2 = conveyorLine.Communicator.Read<int>("PLC_WCS_C.03_EVENT"); |
| | | if (B_Event == 1 || B_Event2 == 1) |
| | | if (Applyrelease(commonStackerCrane)) //读åå åæºæ¾è´§ç³è¯· |
| | | { |
| | | Stackerstatic(conveyorLine,commonStackerCrane); |
| | | Dt_Task task = _taskService.IngStackerCraneTask(commonStackerCrane.DeviceCode); |
| | | if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceProDTOs.Exists(x => x.DeviceChildCode == task.TargetAddress)); |
| | | if (device != null) |
| | | { |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)device; |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO(conveyorLine, task.TargetAddress, "R_Event"); //æ ¹æ®å åæºå°åï¼å°ååç§°æ¾åè®® |
| | | if (deviceProDTO != null) |
| | | { |
| | | int B_Event_Test = GetLine(conveyorLine, deviceProDTO.DeviceProDataBlock); //夿è¾é线æ¯å¦å
许æ¾è´§ä¿¡å· |
| | | if (B_Event_Test == 0) |
| | | { |
| | | if (Releasespermitted(commonStackerCrane, task.TargetAddress)) //åå
¥å åæºå
许æ¾è´§ä¿¡ |
| | | { |
| | | LogSignalStatus("åå
¥å åæºå
许æ¾è´§ä¿¡å·å¤±è´¥", task.TargetAddress); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("æªè¯»åå°è¾é线å
许æ¾è´§ä¿¡å·", task.TargetAddress); |
| | | } |
| | | } |
| | | |
| | | //åºåºä¿¡å·äº¤äº |
| | | //Stackerstatic2(conveyorLine, commonStackerCrane); |
| | | if (Completesignal(commonStackerCrane, task.TargetAddress)) //读åå°æ¾è´§å®æä¿¡å· |
| | | { |
| | | if(PLCSignal(conveyorLine, task.TargetAddress, task.PalletCode, (byte)task.PalletCodequantity)) //åå
¥è¾é线 å åæºæ¾è´§ æçæ¡ç ï¼å±æ°ï¼ç±»å |
| | | { |
| | | //读åè¾é线åé¦ å åæºæ¾ä¸ä¿¡å· |
| | | DeviceProDTO? deviceProDTO2 = GetDeviceProDTO(conveyorLine, task.SourceAddress, "R_StackerCraneLowered"); //è¾é线åè®®æ¾è¯»åä¿¡å· |
| | | if (deviceProDTO != null) |
| | | { |
| | | int B_TAKE = GetLine(conveyorLine, deviceProDTO.DeviceProDataBlock); //读åè¾é线ç å åæºæ¾ä¸ ä¿¡å· |
| | | if (B_TAKE == 1) |
| | | { |
| | | //åå
¥ç»å åæºï¼è¾é线ç å åæºæ¾ä¸ç¡®è®¤ ä¿¡å· |
| | | if (Releasespermitted4(commonStackerCrane, task.SourceAddress)) |
| | | { |
| | | LogSignalStatus("åå
¥å åæºæ¾ä¸ä¿¡å·æå", task.SourceAddress); |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("åå
¥å åæºæ¾ä¸ä¿¡å·å¤±è´¥", task.SourceAddress); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("æªè¯»åè¾é线çå åæºæ¾ä¸ä¿¡å·", task.SourceAddress); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("åå
¥è¾é线å åæºæ¾è´§ æçæ¡ç ï¼å±æ°ï¼ç±»å失败", task.TargetAddress); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("æªè¯»åå°å åæºæ¾è´§å®æä¿¡å·", task.TargetAddress); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void Siganlinteraction2(CommonStackerCrane commonStackerCrane) |
| | | { |
| | | Dt_Task task = _taskService.IngStackerCraneTask(commonStackerCrane.DeviceCode); |
| | | if (task != null && task.TaskType == (int)TaskInboundTypeEnum.Inbound) |
| | | { |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceProDTOs.Exists(x => x.DeviceChildCode == task.SourceAddress)); |
| | | if (device != null) |
| | | { |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)device; |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO(conveyorLine, task.SourceAddress, "R_Event"); //æ ¹æ®å åæºå°åï¼å°ååç§°æ¾åè®® |
| | | if (deviceProDTO != null) |
| | | { |
| | | int B_Event_Test = GetLine(conveyorLine, deviceProDTO.DeviceProDataBlock); //夿è¾é线æ¯å¦å
许åè´§ä¿¡å· |
| | | if (B_Event_Test == 1) |
| | | { |
| | | if (Releasespermitted2(commonStackerCrane, task.SourceAddress)) //åå
¥å åæºå
许åè´§ä¿¡å· |
| | | { |
| | | LogSignalStatus("åå
¥å åæºå
许åè´§ä¿¡å·å¤±è´¥", task.SourceAddress); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("æªè¯»åå°è¾é线å
许åè´§ä¿¡å·", task.SourceAddress); |
| | | } |
| | | } |
| | | |
| | | if (Completesignal2(commonStackerCrane, task.SourceAddress)) //读åå åæºåè´§å®æä¿¡å· |
| | | { |
| | | if(PLCSignal2(conveyorLine, task.SourceAddress, "W_StackerCranePicked")) //åå
¥è¾é线åè´§å®æä¿¡å· |
| | | { |
| | | DeviceProDTO? deviceProDTO2 = GetDeviceProDTO(conveyorLine, task.SourceAddress, "R_StackerCranePicked"); //è¾é线åè®®æ¾è¯»åä¿¡å· |
| | | if (deviceProDTO != null) |
| | | { |
| | | int B_TAKE = GetLine(conveyorLine, deviceProDTO.DeviceProDataBlock); //读åè¾é线ç å åæºåèµ° ä¿¡å· |
| | | if (B_TAKE == 1) |
| | | { |
| | | //åå
¥ç»å åæºï¼è¾é线ç å åæºåèµ° ä¿¡å· |
| | | if(Releasespermitted3(commonStackerCrane, task.SourceAddress)) |
| | | { |
| | | LogSignalStatus("åå
¥å åæºåèµ°ä¿¡å·æå", task.SourceAddress); |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("åå
¥å åæºåèµ°ä¿¡å·å¤±è´¥", task.SourceAddress); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("æªè¯»åè¾é线çå åæºåèµ°ä¿¡å·", task.SourceAddress); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("æªè¯»åå°å åæºæ¾è´§å®æä¿¡å·", task.SourceAddress); |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | //è·åè¾é线å®ä¾ |
| | | public DeviceProDTO? GetDeviceProDTO(CommonConveyorLine conveyorLine,string SCAddress,string Interactivet) |
| | | { |
| | | return conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == SCAddress && x.DeviceProParamName == Interactivet); |
| | | } |
| | | |
| | | //è·åå åæºä¾ |
| | | public DeviceProDTO? GetDeviceProDTO2(CommonStackerCrane commonStackerCrane, string DeviceName, string Interactivet) |
| | | { |
| | | return commonStackerCrane.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == DeviceName && x.DeviceProParamName == Interactivet); |
| | | } |
| | | |
| | | //读åå åæºç³è¯·æ¾è´§ä¿¡å· |
| | | public bool Applyrelease(CommonStackerCrane commonStackerCrane) |
| | | { |
| | | if (commonStackerCrane.DeviceCode == "SC02") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryRequest_Bout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | DeviceProDTO? deviceProDTO2 = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryRequest_Dout"); |
| | | if (deviceProDTO2 != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO2.DeviceProAddress); |
| | | } |
| | | } |
| | | |
| | | if (commonStackerCrane.DeviceCode == "SC01") |
| | | { |
| | | DeviceProDTO? deviceProDTO3 = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryRequest_Dout"); |
| | | if (deviceProDTO3 != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO3.DeviceProAddress); |
| | | } |
| | | DeviceProDTO? deviceProDTO4 = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryRequest_Cout"); |
| | | if (deviceProDTO4 != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO4.DeviceProAddress); |
| | | } |
| | | DeviceProDTO? deviceProDTO5 = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryRequest_Aout"); |
| | | if (deviceProDTO5 != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO5.DeviceProAddress); |
| | | } |
| | | } |
| | | return false; |
| | | |
| | | } |
| | | |
| | | //åå
¥å åæºå
许æ¾è´§ä¿¡å· |
| | | public bool Releasespermitted(CommonStackerCrane commonStackerCrane, string Destinationaddress) |
| | | { |
| | | if (Destinationaddress == "R02-002-027-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryPermission_Bout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R02-002-027-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryPermission_Dout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | //1å· |
| | | if (Destinationaddress == "R01-002-041-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryPermission_Cout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R01-003-041-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryPermission_Dout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | |
| | | if (Destinationaddress == "R01-002-044-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryPermission_Aout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | //读åå åæºçæ¾è´§å®æä¿¡å· |
| | | public bool Completesignal(CommonStackerCrane commonStackerCrane,string Destinationaddress) |
| | | { |
| | | if (Destinationaddress == "R02-002-027-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompleted_Bout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R02-002-027-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompleted_Dout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | //1å· |
| | | if (Destinationaddress == "R01-002-041-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompleted_Cout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R01-002-041-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompleted_Dout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | |
| | | if (Destinationaddress == "R01-002-044-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompleted_Aout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | |
| | | } |
| | | |
| | | //åå
¥å åæºæ¾è´§ç¡®è®¤ä¿¡å· |
| | | public bool Releasespermitted4(CommonStackerCrane commonStackerCrane, string Destinationaddress) |
| | | { |
| | | if (Destinationaddress == "R02-002-027-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompletion_Bout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R02-002-027-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompletion_Din"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | //1å· |
| | | if (Destinationaddress == "R01-002-041-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompletion_Cout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R01-002-041-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompletion_Dout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R01-002-043-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompletion_Aout"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | //åå
¥å åæºå
许åè´§ä¿¡å· |
| | | public bool Releasespermitted2(CommonStackerCrane commonStackerCrane, string Destinationaddress) |
| | | { |
| | | if (Destinationaddress == "R02-003-027-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupRequest_Bin"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R02-003-027-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupRequest_Din"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | //1å· |
| | | if (Destinationaddress == "R01-003-041-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupRequest_Cin"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R01-003-041-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupRequest_Din"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | |
| | | if (Destinationaddress == "R01-002-042-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupRequest_Ain"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R01-002-043-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupRequest_A2in"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | //读åå åæºåè´§å®æä¿¡å· |
| | | public bool Completesignal2(CommonStackerCrane commonStackerCrane, string Destinationaddress) |
| | | { |
| | | if (Destinationaddress == "R02-003-027-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompleted_Bin"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R02-003-027-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompleted_Din"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | //1å· |
| | | if (Destinationaddress == "R01-003-041-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompleted_Cin"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R01-003-041-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompleted_Din"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | |
| | | if (Destinationaddress == "R01-002-042-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompleted_Ain"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | |
| | | if (Destinationaddress == "R01-002-043-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompleted_A2in"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress); |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | |
| | | } |
| | | |
| | | //åå
¥å åæºåè´§ç¡®è®¤ä¿¡å· |
| | | public bool Releasespermitted3(CommonStackerCrane commonStackerCrane, string Destinationaddress) |
| | | { |
| | | if (Destinationaddress == "R02-003-027-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompletion_Bin"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R02-003-027-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompletion_Din"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | //1å· |
| | | if (Destinationaddress == "R01-003-041-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompletion_Cin"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R01-003-041-011-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompletion_Din"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | |
| | | if (Destinationaddress == "R01-002-042-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompletion_Ain"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | if (Destinationaddress == "R01-002-043-001-01") |
| | | { |
| | | DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "PickupCompletion_A2in"); |
| | | if (deviceProDTO != null) |
| | | { |
| | | return SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, true); |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | //åå
¥è¾é线æ¾è´§å®æä¿¡å·ï¼æ¡ç ï¼å±æ°ï¼ç±»å |
| | | public bool PLCSignal(CommonConveyorLine conveyorLine,string TargetAddress,string PalletCode,byte PalletLayers) |
| | | { |
| | | byte PalletType = 2; |
| | | if (TargetAddress == "R02-002-027-001-01" || TargetAddress == "R01-002-041-001-01") |
| | | { |
| | | PalletType = 1; |
| | | } |
| | | |
| | | //å¤çåºåºæ¾æå®æåé»è¾ |
| | | try |
| | | { |
| | | DeviceProDTO? deviceProDTO2 = GetDeviceProDTO(conveyorLine, TargetAddress, "W_StackerCraneLowered"); //æ¾è´§å®æä¿¡å· |
| | | DeviceProDTO? deviceProDTO3 = GetDeviceProDTO(conveyorLine, TargetAddress, "W_PalletBarcode"); //åå
¥æ¡ç |
| | | DeviceProDTO? deviceProDTO4 = GetDeviceProDTO(conveyorLine, TargetAddress, "W_PalletLayers"); //屿° |
| | | DeviceProDTO? deviceProDTO5 = GetDeviceProDTO(conveyorLine, TargetAddress, "W_PalletType"); //ç±»å |
| | | if(deviceProDTO2 !=null && deviceProDTO3 != null && deviceProDTO4 != null && deviceProDTO5 != null) |
| | | { |
| | | if(SetLine(conveyorLine, deviceProDTO2.DeviceProDataBlock, 1) && SetLinestring(conveyorLine, deviceProDTO3.DeviceProDataBlock,PalletCode) && SetLine(conveyorLine, deviceProDTO2.DeviceProDataBlock, PalletLayers) && SetLine(conveyorLine, deviceProDTO2.DeviceProDataBlock, PalletType)) |
| | | { |
| | | |
| | | LogSignalStatus($"åå
¥æ¾è´§å®æä¿¡æ¯ï¼æçæ¡ç ï¼å±æ°ï¼ç±»åä¿¡æ¯æå", TargetAddress); |
| | | return true; |
| | | |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus($"åå
¥æ¾è´§å®æä¿¡æ¯ï¼æçæ¡ç ï¼å±æ°ï¼ç±»åä¿¡æ¯å¤±è´¥", TargetAddress); |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus($"æªæ¾å°è¾é线å议信æ¯", TargetAddress); |
| | | |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogSignalStatus($"åå
¥å¤±è´¥ï¼é误信æ¯ï¼{ex.Message}", TargetAddress); |
| | | throw; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | //åå
¥è¾é线 å åæºåè´§å®æä¿¡å· |
| | | public bool PLCSignal2(CommonConveyorLine conveyorLine, string SourceAddress,string DeviceProParamName) |
| | | { |
| | | DeviceProDTO? deviceProDTO2 = GetDeviceProDTO(conveyorLine, SourceAddress, DeviceProParamName); //åè´§å®æä¿¡å· |
| | | if (deviceProDTO2 != null) |
| | | { |
| | | return SetLine(conveyorLine, deviceProDTO2.DeviceProDataBlock, 1); |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus($"æªæ¾å°è¾é线å议信æ¯", SourceAddress); |
| | | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åè®®ï¼å°åï¼å¼ï¼åå
¥è¾é线信æ¯, |
| | | /// </summary> |
| | | /// <param name="conveyorLine"></param> |
| | | /// <param name="DeviceProDataBlock"></param> |
| | | /// <param name="Pali"></param> |
| | | /// <returns></returns> |
| | | public bool SetLine(CommonConveyorLine conveyorLine,string DeviceProDataBlock,byte Pali) |
| | | { |
| | | return conveyorLine.Communicator.Write(DeviceProDataBlock, Pali); |
| | | } |
| | | public bool SetLinestring(CommonConveyorLine conveyorLine, string DeviceProDataBlock, string Pali) |
| | | { |
| | | return conveyorLine.Communicator.Write(DeviceProDataBlock, Pali); |
| | | } |
| | | /// <summary> |
| | | /// æ ¹å°å读åè¾éçº¿ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="conveyorLine"></param> |
| | | /// <param name="DeviceProDataBlock"></param> |
| | | /// <returns></returns> |
| | | public int GetLine(CommonConveyorLine conveyorLine, string DeviceProDataBlock) |
| | | { |
| | | return conveyorLine.Communicator.Read<byte>(DeviceProDataBlock); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读åå åæºå°å |
| | | /// </summary> |
| | | /// <param name="conveyorLine"></param> |
| | | /// <param name="DeviceProDataBlock"></param> |
| | | /// <returns></returns> |
| | | public bool GetStacker(CommonStackerCrane commonStackerCrane,string DeviceProDataBlock) |
| | | { |
| | | return commonStackerCrane.Communicator.Read<bool>(DeviceProDataBlock); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åå
¥å åæºä¿¡å· |
| | | /// </summary> |
| | | /// <param name="conveyorLine"></param> |
| | | /// <param name="DeviceProDataBlock"></param> |
| | | /// <returns></returns> |
| | | public bool SetStacker(CommonStackerCrane commonStackerCrane, string DeviceProDataBlock,bool Pali) |
| | | { |
| | | return commonStackerCrane.Communicator.Write(DeviceProDataBlock, Pali); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å®ä½è½¬æ¢æå½ä»¤Model |
| | | /// </summary> |
| | |
| | | string[] targetCodest = task.SourceAddress.Split("-"); |
| | | if (targetCodest.Length == 5) |
| | | { |
| | | stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodest[1]); |
| | | stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodest[2]); |
| | | stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodest[3]); |
| | | stackerCraneTaskCommand.StartRow = Convert.ToInt16(targetCodest[1]); |
| | | stackerCraneTaskCommand.StartColumn = Convert.ToInt16(targetCodest[2]); |
| | | stackerCraneTaskCommand.StartLayer = Convert.ToInt16(targetCodest[3]); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | return stackerCraneTaskCommand; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ç«å°åç§°åå
¥ |
| | | /// </summary> |
| | | /// <param name="commonStackerCrane"></param> |
| | | /// <param name="platform"></param> |
| | | public void Stackerstatic(CommonConveyorLine conveyorLine,CommonStackerCrane commonStackerCrane) |
| | | { |
| | | // è°ç¨æ¹æ³å¤çä¸å SourceAddress çä»»å¡ |
| | | Dt_Task task = _taskService.IngStackerCraneTask(commonStackerCrane.DeviceName); |
| | | |
| | | if (task.SourceAddress == "R01-003-027-001-01") |
| | | { |
| | | HandleStackerCraneTask(conveyorLine,commonStackerCrane,task, StackerCraneDBName.Requestpickup.ToString(), StackerCraneDBName.toRequestpickup.ToString(), "WCS_PLC_B.01_WCS_TAKE"); |
| | | } |
| | | else if (task.SourceAddress == "R01-003-041-001-01") |
| | | { |
| | | HandleStackerCraneTask(conveyorLine, commonStackerCrane,task, StackerCraneDBName.Requestpickuptwo.ToString(), StackerCraneDBName.toRequestpickuptwo.ToString(), "WCS_PLC_C.03_WCS_TAKE"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åºåºä¿¡æ¯äº¤äº |
| | | /// </summary> |
| | | /// <param name="commonStackerCrane"></param> |
| | | /// <param name="platform"></param> |
| | | public void Stackerstatic2(CommonConveyorLine conveyorLine, CommonStackerCrane commonStackerCrane) |
| | | { |
| | | //读åå åæºä¸¤ä¸ªç«å°æ¯å¦ææ¾è´§ç³è¯· |
| | | // æ£æ¥å åæºæ¯å¦è¯·æ±æ¾è´§ä¿¡å· |
| | | if (commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.Requestpickupout)) |
| | | { |
| | | LogSignalStatus("读åå°å åæºç³è¯·æ¾è´§ä¿¡å·", "R01-002-027-001-01"); |
| | | Dt_Task? task = _taskService.IngStackerCraneTask(commonStackerCrane.DeviceName); |
| | | WriteLogAndHandleConveyorSignal(conveyorLine, commonStackerCrane, task, StackerCraneDBName.toRequestpickupout, "R01-002-027-001-01"); |
| | | } |
| | | |
| | | |
| | | |
| | | // 夿ä¸åçç«å° |
| | | /*if (task.SourceAddress == "R01-002-027-001-01") |
| | | { |
| | | HandleStackerCraneForAddress027001(conveyorLine, commonStackerCrane, task); |
| | | } |
| | | else if (task.SourceAddress == "R01-002-041-001-01") |
| | | { |
| | | HandleStackerCraneForAddress041001(conveyorLine, commonStackerCrane, task); |
| | | }*/ |
| | | } |
| | | |
| | | // å°è£
å
¥åºç«å° |
| | | // å®ä¹ä¸ä¸ªæ¹æ³æ¥å¤çéå¤çå åæºä¸PLCäº¤äºæä½ |
| | | private void HandleStackerCraneTask(CommonConveyorLine conveyorLine, CommonStackerCrane commonStackerCrane,Dt_Task task, string requestSignal, string completionSignal, string writeAddress) |
| | | { |
| | | // å° completionSignal 转æ¢ä¸º StackerCraneDBName æä¸¾å¼ |
| | | if (Enum.TryParse(completionSignal, out StackerCraneDBName completionEnum)) |
| | | { |
| | | // è·åå åæºå®æä¿¡å· |
| | | if (commonStackerCrane.GetValue<StackerCraneDBName, bool>(completionEnum)) |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"读åå°å åæºå®æä¿¡å·ä¸º trueï¼ç«å°ç¼å·ï¼{task.SourceAddress}", "ç«å°ä¿¡æ¯"); |
| | | |
| | | // åè¾é线åå
¥åè´§å®æä¿¡å· |
| | | if (conveyorLine.Communicator.Write(writeAddress, 1)) |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"åå
¥è¾é线åè´§å®æä¿¡å·æåï¼1ï¼ç«å°ç¼å·ï¼{task.SourceAddress}", "ç«å°ä¿¡æ¯"); |
| | | } |
| | | else |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"åå
¥è¾é线åè´§å®æä¿¡å·å¤±è´¥ï¼ç«å°ç¼å·ï¼{task.SourceAddress}", "ç«å°ä¿¡æ¯"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"读åå°å åæºå®æä¿¡å·ä¸º falseï¼ç«å°ç¼å·ï¼{task.SourceAddress}", "ç«å°ä¿¡æ¯"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"æ æ³å°completionSignalå符串{completionSignal}转æ¢ä¸ºææçæä¸¾å¼", "ç«å°ä¿¡æ¯"); |
| | | } |
| | | |
| | | if(Enum.TryParse(requestSignal, out StackerCraneDBName completionEnum2)){ |
| | | // åå
¥è¯·æ±ä¿¡å· |
| | | if (commonStackerCrane.SetValue(completionEnum2, true)) |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"åå
¥ä¿¡å·æåï¼{requestSignal}", "ç«å°ä¿¡æ¯"); |
| | | } |
| | | else |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"åå
¥ä¿¡å·å¤±è´¥ï¼{requestSignal}", "ç«å°ä¿¡æ¯"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"æ æ³å°completionSignalå符串{completionSignal}转æ¢ä¸ºææçæä¸¾å¼", "ç«å°ä¿¡æ¯"); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void HandleStackerCraneForAddress027001(CommonConveyorLine conveyorLine, CommonStackerCrane commonStackerCrane, Dt_Task task) |
| | | { |
| | | // æ£æ¥å åæºæ¯å¦è¯·æ±æ¾è´§ä¿¡å· |
| | | if (commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.Requestpickupout)) |
| | | { |
| | | WriteLogAndHandleConveyorSignal(conveyorLine, commonStackerCrane, task, StackerCraneDBName.toRequestpickupout, "R01-002-027-001-01"); |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("æªè¯»åå°å åæºç³è¯·æ¾è´§ä¿¡å·", task.SourceAddress); |
| | | } |
| | | |
| | | // æ£æ¥å åæºå®æä¿¡å· |
| | | if (commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.toRequestpickup)) |
| | | { |
| | | WriteLogAndHandleConveyorSignal(conveyorLine, commonStackerCrane, task, StackerCraneDBName.toRequestpickup, "R01-002-027-001-01"); |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("读åå°å åæºå®æä¿¡å·ä¸ºï¼false", task.SourceAddress); |
| | | } |
| | | } |
| | | |
| | | private void HandleStackerCraneForAddress041001(CommonConveyorLine conveyorLine, CommonStackerCrane commonStackerCrane, Dt_Task task) |
| | | { |
| | | if (commonStackerCrane.SetValue(StackerCraneDBName.Requestpickuptwo, true)) |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"åå
¥ä¿¡å·æåï¼Requestpickup", "ç«å°ä¿¡æ¯"); |
| | | } |
| | | else |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"åå
¥ä¿¡å·å¤±è´¥ï¼Requestpickup", "ç«å°ä¿¡æ¯"); |
| | | } |
| | | |
| | | // æ£æ¥å åæºå®æä¿¡å· |
| | | if (commonStackerCrane.GetValue<StackerCraneDBName, bool>(StackerCraneDBName.toRequestpickuptwo)) |
| | | { |
| | | WriteLogAndHandleConveyorSignal(conveyorLine, commonStackerCrane, task, StackerCraneDBName.toRequestpickuptwo, "R01-002-041-001-01"); |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus("读åå°å åæºå®æä¿¡å·ä¸ºï¼false", task.SourceAddress); |
| | | } |
| | | } |
| | | |
| | | private void WriteLogAndHandleConveyorSignal(CommonConveyorLine conveyorLine, CommonStackerCrane commonStackerCrane, Dt_Task task, StackerCraneDBName signalType, string sourceAddress) |
| | | { |
| | | // 读åè¾éçº¿ä¿¡å· |
| | | int events = conveyorLine.Communicator.Read<int>("PLC_WCS_B.01_EVENT"); |
| | | if (events == 0) |
| | | { |
| | | LogSignalStatus("读åå°è¾é线å
许æ¾è´§ä¿¡å·", sourceAddress); |
| | | |
| | | // åå
¥å åæºä¿¡å· |
| | | if (commonStackerCrane.SetValue(signalType, true)) |
| | | { |
| | | LogSignalStatus($"åå
¥å åæºå
许æ¾è´§ä¿¡å·", sourceAddress); |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus($"æªåå
¥å åæºå
许æ¾è´§ä¿¡å·", sourceAddress); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus($"æªè¯»åå°è¾é线å
许æ¾è´§ä¿¡å·", sourceAddress); |
| | | } |
| | | |
| | | // åå
¥åè´§å®æä¿¡å· |
| | | if (conveyorLine.Communicator.Write("WCS_PLC_B.01_WCS_TAKE", 1)) |
| | | { |
| | | LogSignalStatus($"åå
¥è¾é线åè´§å®æä¿¡å·æå", sourceAddress); |
| | | } |
| | | else |
| | | { |
| | | LogSignalStatus($"åå
¥è¾é线åè´§å®æä¿¡å·å¤±è´¥", sourceAddress); |
| | | } |
| | | } |
| | | |
| | | private void LogSignalStatus(string message, string sourceAddress) |
| | | { |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"{message}ï¼ç«å°ç¼å·ï¼{sourceAddress}", "ç«å°ä¿¡æ¯"); |
| | | WriteLog.GetLog("å åæºä¸plc交äºä¿¡å·").Write($"ç«å°ç¼å·ï¼{sourceAddress},ä¿¡æ¯ï¼{message}", $"{sourceAddress}"); |
| | | } |
| | | } |
| | | } |