コード例 #1
0
        //给MES添加空箱下料请求 3
        public Result PLC03NgNullAgvCallEvent(ActionArgs actionArgs)
        {
            RChargingState chargingState = new RChargingState()
            {
                LINE           = Constant.OrderLine,
                IS_READ        = 0,
                DISPATCH_STATE = 1,
                FLAG           = 1,
                NO_FROM        = "3"
            };

            actionArgs.RedisClientRemote.LPush("LD:A00:MDCI:CHARGING_STATE:Q", chargingState);
            Logger.Device.Info($" invoke PLC03NgNullAgvCallEvent 给MES添加空箱下料请求成功");
            return(Result.Success());
        }
コード例 #2
0
        //请求MES正常上料
        public Result CommAgvCallEvent(ActionArgs actionArgs)
        {
            RChargingState chargingState = new RChargingState()
            {
                LINE           = Constant.OrderLine,
                IS_READ        = 0,
                DISPATCH_STATE = 0,
                FLAG           = 1,
                NO_FROM        = "1"
            };

            actionArgs.RedisClientRemote.LPush("LD:A00:MDCI:CHARGING_STATE:Q", chargingState);
            Logger.Device.Info("invoke CommAgvCallEvent 请求正常上料成功");
            return(Result.Success());
        }
コード例 #3
0
        //换箱请求下料
        public Result PLC01AgvChangeEvent(ActionArgs actionArgs)
        {
            //换箱请求下料
            RChargingState chargingState = new RChargingState()
            {
                LINE           = Constant.OrderLine,
                IS_READ        = 0,
                DISPATCH_STATE = 1,
                FLAG           = 1,
                NO_FROM        = "1"
            };

            actionArgs.RedisClientRemote.Set("LD:A00:MDCI:CHARGING_STATE:Q", chargingState);
            Logger.Device.Info($" invoke PLC01AgvChangeEvent 换箱请求下料");
            return(Result.Success());
        }
コード例 #4
0
        //读取料箱信息,更新MES上下料信息表
        public Result PLC01ReadInfoDoneEvent(ActionArgs actionArgs)
        {
            //获取到P1Info
            byte[] bts = Encoding.ASCII.GetBytes(actionArgs.StepResult.Data.ToString());
            RfidStationInfoList list = ParseRfidStationInfoList(bts);

            curentRsInfoList = list;
            //更新上下料信息表
            RChargingState chargingState = new RChargingState()
            {
                LINE           = Constant.OrderLine,
                IS_READ        = 0,
                DISPATCH_STATE = 1,
                FLAG           = 2,
                NO_FROM        = "1",
                BTRAY_ID1      = list.RfidStationInfos[0].UID,
                BTRAY_ID2      = list.RfidStationInfos[1].UID,
                BTRAY_ID3      = list.RfidStationInfos[2].UID
            };

            actionArgs.RedisClientRemote.LPush("LD:A00:MDCI:CHARGING_STATE:Q", chargingState);
            Logger.Device.Info($" invoke UpCHARGING_STATEEvent 更新MES上下料信息表成功");
            return(Result.Success());
        }