Ejemplo n.º 1
0
        public void Update()
        {
            if (isconnect != arf.IsAlive())
            {
                ISConnect = arf.IsAlive();
            }

            if (!arf.IsAlive())
            {
                return;
            }

            if (actionsta != arf.ActionStatus())
            {
                actionsta    = arf.ActionStatus();
                ActionStatus = "";
            }

            if (devicesta != arf.DeviceStatus())
            {
                devicesta    = arf.DeviceStatus();
                DeviceStatus = "";
            }

            if (commandsta != arf.CommandStatus())
            {
                commandsta    = arf.CommandStatus();
                CommandStatus = "";
            }

            if (des_x_y_z != arf.Goods1site())
            {
                Des_X_Y_Z = arf.Goods1site();
            }

            if (now_task != arf.CurrentTask())
            {
                now_task = arf.CurrentTask();
                Now_Task = "";
            }

            if (now_x_y_z != arf.CurrentSite())
            {
                Now_X_Y_Z = arf.CurrentSite();
            }

            if (finish_task != arf.FinishTask())
            {
                finish_task = arf.FinishTask();
                Finish_Task = "";
            }

            if (loadstatus != arf.GoodsStatus())
            {
                loadstatus = arf.GoodsStatus();
                LoadStatus = "";
            }

            if (rollerstatus != arf.CurrentStatus())
            {
                rollerstatus = arf.CurrentStatus();
                RollerStatus = "";
            }

            if (rollerdirection != arf.RunDirection())
            {
                rollerdirection = arf.RunDirection();
                RollerDirection = "";
            }

            if (errormsg != arf.ErrorMessage())
            {
                errormsg = arf.ErrorMessage();
                ErrorMsg = "";
            }

            if (arf.GetUpdateTime(out string time))
            {
                if (datatime != time)
                {
                    DataTime = time;
                }
            }
        }