helongyang
昨天 cb25acc46bf41863e068b6f968f1592b7a14d1c9
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸ÉĤ²Ö/ConveyorLineJob_GM.cs
@@ -17,6 +17,7 @@
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.ConveyorLine.Enum;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
@@ -239,6 +240,50 @@
                    {
                        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 == "7003") {
                        if (conveyorLineSignalRead1.STB && conveyorLineStatus1.Online && conveyorLineStatus1.Goods && !conveyorLineStatus1.Alarm && !conveyorLineSignalWrite1.ACK)
                        {
                            StackerCraneJob_GM.gMReadData.R_GM_Boxcode = device.Communicator.Read<string>("DB900.478.0");
                        }
                        StackerCraneJob_GM.gMReadData.R_GM_HandShake3 = conveyorLineStatus1.HandShake;
                        StackerCraneJob_GM.gMReadData.R_GM_Online3 = conveyorLineStatus1.Online;
                        StackerCraneJob_GM.gMReadData.R_GM_Free3 = conveyorLineStatus1.Free;
                        StackerCraneJob_GM.gMReadData.R_GM_Goods3 = conveyorLineStatus1.Goods;
                        StackerCraneJob_GM.gMReadData.R_GM_Alarm3 = conveyorLineStatus1.Alarm;
                        StackerCraneJob_GM.gMReadData.R_GM_STB3 = conveyorLineSignalRead1.STB;
                        StackerCraneJob_GM.gMReadData.R_GM_ACK3 = conveyorLineSignalRead1.ACK;
                        StackerCraneJob_GM.gMReadData.W_GM_STB3 = conveyorLineSignalWrite1.STB;
                        StackerCraneJob_GM.gMReadData.W_GM_ACK3 = conveyorLineSignalWrite1.ACK;
                    }
                    else if(item.StationCode == "7004")
                    {
                        StackerCraneJob_GM.gMReadData.R_GM_HandShake4 = conveyorLineStatus1.HandShake;
                        StackerCraneJob_GM.gMReadData.R_GM_Online4 = conveyorLineStatus1.Online;
                        StackerCraneJob_GM.gMReadData.R_GM_Free4 = conveyorLineStatus1.Free;
                        StackerCraneJob_GM.gMReadData.R_GM_Goods4 = conveyorLineStatus1.Goods;
                        StackerCraneJob_GM.gMReadData.R_GM_Alarm4 = conveyorLineStatus1.Alarm;
                        StackerCraneJob_GM.gMReadData.R_GM_STB4 = conveyorLineSignalRead1.STB;
                        StackerCraneJob_GM.gMReadData.R_GM_ACK4 = conveyorLineSignalRead1.ACK;
                        StackerCraneJob_GM.gMReadData.W_GM_STB4 = conveyorLineSignalWrite1.STB;
                        StackerCraneJob_GM.gMReadData.W_GM_ACK4 = conveyorLineSignalWrite1.ACK;
                    }
                    else if (item.StationCode == "7005")
                    {
                        StackerCraneJob_GM.gMReadData.R_GM_HandShake5 = conveyorLineStatus1.HandShake;
                        StackerCraneJob_GM.gMReadData.R_GM_Online5 = conveyorLineStatus1.Online;
                        StackerCraneJob_GM.gMReadData.R_GM_Free5 = conveyorLineStatus1.Free;
                        StackerCraneJob_GM.gMReadData.R_GM_Goods5 = conveyorLineStatus1.Goods;
                        StackerCraneJob_GM.gMReadData.R_GM_Alarm5 = conveyorLineStatus1.Alarm;
                        StackerCraneJob_GM.gMReadData.R_GM_STB5 = conveyorLineSignalRead1.STB;
                        StackerCraneJob_GM.gMReadData.R_GM_ACK5 = conveyorLineSignalRead1.ACK;
                        StackerCraneJob_GM.gMReadData.W_GM_STB5 = conveyorLineSignalWrite1.STB;
                        StackerCraneJob_GM.gMReadData.W_GM_ACK5 = conveyorLineSignalWrite1.ACK;
                    }
                }
            }