Exemplo n.º 1
0
        public void GetRobotAndCarrierSlotStatus()
        {
            LocalPackage.MainFlowHandler.UpdateLoadingAndCSTID();

            var loadUnloadData = LocalPackage.MainFlowHandler.localData.LoadUnloadData;

            OnUpdateRobotStatusEvent?.Invoke(this, new RobotStatus()
            {
                EnumRobotState = GetEnumRobotStateFrom(loadUnloadData),
                IsHome         = loadUnloadData.Loading
            });

            OnUpdateCarrierSlotStatusEvent?.Invoke(this, new CarrierSlotStatus()
            {
                CarrierId            = loadUnloadData.CstID,
                EnumCarrierSlotState = GetEnumCarrierSlotStateFrom(loadUnloadData),
                ManualDeleteCST      = string.IsNullOrEmpty(loadUnloadData.CstID.Trim())
            });
        }
Exemplo n.º 2
0
        public void DoRobotCommandFor(RobotCommand robotCommand)
        {
            Task.Run(() =>
            {
                if (robotCommand.GetTransferStepType() == EnumTransferStepType.Load)
                {
                    RobotStatus = new RobotStatus()
                    {
                        EnumRobotState = EnumRobotState.Busy, IsHome = false
                    };

                    OnUpdateRobotStatusEvent?.Invoke(this, RobotStatus);

                    System.Threading.Thread.Sleep(2000);

                    CarrierSlotStatus = new CarrierSlotStatus()
                    {
                        CarrierId = robotCommand.CassetteId, EnumCarrierSlotState = EnumCarrierSlotState.Loading, SlotNumber = robotCommand.SlotNumber
                    };

                    OnUpdateCarrierSlotStatusEvent?.Invoke(this, CarrierSlotStatus);

                    System.Threading.Thread.Sleep(2000);

                    RobotStatus = new RobotStatus()
                    {
                        EnumRobotState = EnumRobotState.Idle, IsHome = true
                    };

                    OnUpdateRobotStatusEvent?.Invoke(this, RobotStatus);

                    OnRobotEndEvent?.Invoke(this, EnumRobotEndType.Finished);
                }
                else if (robotCommand.GetTransferStepType() == EnumTransferStepType.Unload)
                {
                    RobotStatus = new RobotStatus()
                    {
                        EnumRobotState = EnumRobotState.Busy, IsHome = false
                    };

                    OnUpdateRobotStatusEvent?.Invoke(this, RobotStatus);

                    System.Threading.Thread.Sleep(2000);

                    CarrierSlotStatus = new CarrierSlotStatus()
                    {
                        CarrierId = "", EnumCarrierSlotState = EnumCarrierSlotState.Empty, SlotNumber = robotCommand.SlotNumber
                    };

                    OnUpdateCarrierSlotStatusEvent?.Invoke(this, CarrierSlotStatus);

                    System.Threading.Thread.Sleep(2000);

                    RobotStatus = new RobotStatus()
                    {
                        EnumRobotState = EnumRobotState.Idle, IsHome = true
                    };

                    OnUpdateRobotStatusEvent?.Invoke(this, RobotStatus);

                    OnRobotEndEvent?.Invoke(this, EnumRobotEndType.Finished);
                }
            });
        }
Exemplo n.º 3
0
 public void GetRobotAndCarrierSlotStatus()
 {
     OnUpdateRobotStatusEvent?.Invoke(this, RobotStatus);
     OnUpdateCarrierSlotStatusEvent?.Invoke(this, CarrierSlotStatus);
 }