From a8756c3526832332db4ef5685348d9b188c2bf2b Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期六, 13 九月 2025 08:36:44 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/ConveyorLineJob_PP.cs | 31 ++++++++++++++++++++++--------- 1 files changed, 22 insertions(+), 9 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs" index 485a7ae..348a55c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs" @@ -77,20 +77,12 @@ if (!string.IsNullOrEmpty(boxcode)) { - string sc = device.Communicator.Read<string>("DB900.580.0"); + string sc = device.Communicator.Read<string>("DB900.578.0"); WriteError(device.DeviceName, $"璇诲彇鍊硷細{boxcode},瀵规瘮{sc}"); string boxEndCode = ""; if (boxcode.LastIndexOf(",PO:") >= 0) { boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",PO:")) + sc.Substring(sc.IndexOf(",PO:")).Replace("\0", ""); - } - else if (boxcode.LastIndexOf(",PO") > 0) - { - boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",PO")) + sc.Substring(sc.IndexOf("PO:")).Replace("\0", ""); - } - else if (boxcode.LastIndexOf(",P") > 0) - { - boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",P")) + sc.Substring(sc.IndexOf("PO:")).Replace("\0", ""); } //鍏ュ簱鐢宠浠诲姟 @@ -233,6 +225,27 @@ { WriteInfo(device.DeviceName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�"); } + R_ConveyorLineInfo conveyorLineInfoRead1 = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(deviceProRead.DeviceProAddress); + W_ConveyorLineInfo conveyorLineInfoWrite1 = device.Communicator.ReadCustomer<W_ConveyorLineInfo>(deviceProWrite.DeviceProAddress); + R_ConveyorLineStatus conveyorLineStatus1 = conveyorLineInfoRead1.Status.ByteToBoolObject<R_ConveyorLineStatus>(); + ConveyorLineSignal conveyorLineSignalRead1 = conveyorLineInfoRead1.Signal.ByteToBoolObject<ConveyorLineSignal>(); + ConveyorLineSignal conveyorLineSignalWrite1 = conveyorLineInfoWrite1.Signal.ByteToBoolObject<ConveyorLineSignal>(); + if (item.StationCode == "2004") + { + if (conveyorLineSignalRead1.STB && conveyorLineStatus1.Online && conveyorLineStatus1.Goods && !conveyorLineStatus1.Alarm && !conveyorLineSignalWrite1.ACK) + { + StackerCraneJob_PP.pPReadData.R_PP_Boxcode = device.Communicator.Read<string>("DB900.578.0"); + } + StackerCraneJob_PP.pPReadData.R_PP_HandShake4 = conveyorLineStatus1.HandShake; + StackerCraneJob_PP.pPReadData.R_PP_Online4 = conveyorLineStatus1.Online; + StackerCraneJob_PP.pPReadData.R_PP_Free4 = conveyorLineStatus1.Free; + StackerCraneJob_PP.pPReadData.R_PP_Goods4 = conveyorLineStatus1.Goods; + StackerCraneJob_PP.pPReadData.R_PP_Alarm4 = conveyorLineStatus1.Alarm; + StackerCraneJob_PP.pPReadData.R_PP_STB4 = conveyorLineSignalRead1.STB; + StackerCraneJob_PP.pPReadData.R_PP_ACK4 = conveyorLineSignalRead1.ACK; + StackerCraneJob_PP.pPReadData.W_PP_STB4 = conveyorLineSignalWrite1.STB; + StackerCraneJob_PP.pPReadData.W_PP_ACK4 = conveyorLineSignalWrite1.ACK; + } } } -- Gitblit v1.9.3