Exemplo n.º 1
0
 void sensor_OnLeave2(DematicSensor sender, Load load)
 {
     if (infeedInProgress)
     {
         infeedRouteAvailableStatus.Available = AvailableStatus.Blocked;
     }
 }
Exemplo n.º 2
0
        public void sensor_OnEnter1(DematicSensor sender, Load load)
        {
            SetDropStationOccupiedStatus();

            Case_Load caseLoad = load as Case_Load;

            if (TransportSection.Route.Loads.Count == 2)
            {
                string id = TransportSection.Route.Loads.ToList()[0].Identification;
                if (id != load.Identification)
                {
                    ((Case_Load)load).UserData = id + "," + load.Identification;
                }
                else
                {
                    ((Case_Load)load).UserData = load.Identification + "," + id;
                }

                ParentMultishuttle.ArrivedAtDropStationConvPosB(new PickDropStationArrivalEventArgs(Location2.LocName, (Case_Load)load, Elevator, 2));
            }
            else
            {
                ParentMultishuttle.ArrivedAtDropStationConvPosB(new PickDropStationArrivalEventArgs(Location1.LocName, (Case_Load)load, Elevator, 1));
            }
        }
Exemplo n.º 3
0
 private void sensor_OnEnterB(DematicSensor sender, Load load)
 {
     if (RouteAvailable == RouteStatuses.Blocked)
     {
         return;
     }
     load.Stop();
     psTimeoutTimer.Start();
     //ParentMultiShuttle.ArrivedAtPickStationConvPosB(new PickDropStationArrivalEventArgs(LocationB.LocName, (Case_Load)load, Elevator));
 }
Exemplo n.º 4
0
 void sensor_OnLeave(DematicSensor sender, Load load)
 {
     if (Elevator.CurrentTask != null)
     {
         if (Elevator.ElevatorConveyor.Route.Loads.Count == 0 && (load.Identification == Elevator.CurrentTask.LoadA_ID || load.Identification == Elevator.CurrentTask.LoadB_ID))
         {
             Elevator.CurrentTask = null;
         }
     }
 }
Exemplo n.º 5
0
        //void sensor_OnLeave2(DematicSensor sender, Load load)
        //{
        //    if (infeedInProgress) //This doesn't do anything!
        //    {
        //        RouteAvailable = RouteStatuses.Blocked;
        //    }
        //}

        public void sensor_OnEnterA(DematicSensor sender, Load load)
        {
            if (TransportSection.Route.Loads.Count == 2)
            {
                load.Stop();

                psTimeoutTimer.Stop();
                psTimeoutTimer.Reset();
                RouteAvailable = RouteStatuses.Blocked;
                ParentMultiShuttle.ArrivedAtPickStationConvPosA(new PickDropStationArrivalEventArgs(LocationA.LocName, (Case_Load)load, Elevator, 2));
            }
            else
            {
                ParentMultiShuttle.ArrivedAtPickStationConvPosA(new PickDropStationArrivalEventArgs(LocationA.LocName, (Case_Load)load, Elevator, 1));
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// A single load has been dropped off by the elevator
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="load"></param>
        public void sensor_OnEnter2(DematicSensor sender, Load load)
        {
            Case_Load caseLoad = load as Case_Load;

            if (caseLoad != null)
            {
                caseLoad.Case_Data.CurrentPosition = "D" + Multishuttle.AisleNo + DropPositionGroupSide + Multishuttle.POS2OUTFEED + Level;
                if (Elevator.CurrentJobData.JobMode == MultishuttleElevatorJobData.JobModes.Unload1)
                {
                    Multishuttle.Control.ToteArrivedAtConvDropStation(this, Elevator, caseLoad, Multishuttle);
                }
                else if (Elevator.CurrentJobData.JobMode == MultishuttleElevatorJobData.JobModes.Unload2 && Location1.Active)
                {
                    Multishuttle.Control.ToteArrivedAtConvDropStation(this, Elevator, caseLoad, Multishuttle);
                    Location1.Release();
                }
            }
        }
Exemplo n.º 7
0
        private void sensor_OnEnterB(DematicSensor sender, Load load)
        {
            if (RouteAvailable == RouteStatuses.Blocked && TransportSection.Route.Loads.Count < 2 && !ElevatorPickOneOfTwo)
            {
                //This is the second load. Let it move to the elevator
                return;
            }

            if (RouteAvailable == RouteStatuses.Blocked && ElevatorPickOneOfTwo)
            {
                //RouteAvailable = RouteStatuses.Request;
                ElevatorPickOneOfTwo = false;
            }

            load.Stop();
            psTimeoutTimer.Start();
            //ParentMultiShuttle.ArrivedAtPickStationConvPosB(new PickDropStationArrivalEventArgs(LocationB.LocName, (Case_Load)load, Elevator));
        }
Exemplo n.º 8
0
        /// <summary>
        /// A load has arrived at the second drop station point (Location 1) and it is the first of 2
        /// we can therefore assume that both loads have left the elevator
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="load"></param>
        public void sensor_OnEnter1(DematicSensor sender, Load load)
        {
            Case_Load caseLoad = load as Case_Load;

            if (caseLoad != null && Elevator.CurrentJobData != null)
            {
                if (Elevator.CurrentJobData.JobMode == MultishuttleElevatorJobData.JobModes.Unload2)
                {
                    caseLoad.Case_Data.CurrentPosition = "D" + Multishuttle.AisleNo + DropPositionGroupSide + Multishuttle.POS1OUTFEED + Level;
                    if (TransportSection.Route.Loads.Count == 2) // this is the first load so there is another load behind
                    {
                        load.Stop();
                    }
                    if (Location2.Active)
                    {
                        Multishuttle.Control.ToteArrivedAtConvDropStation(this, Elevator, caseLoad, Multishuttle);
                    }
                }
            }
        }
Exemplo n.º 9
0
        void sensor_OnEnter(DematicSensor sender, Load load)
        {
            if (ClearTimeout != 0)
            {
                ClearTimer.Reset();
                ClearTimer.OnElapsed -= ClearTimer_OnElapsed;
            }

            if (BlockedTimeout != 0)
            {
                PhotocellStatus         = PhotocellState.LoadBlocked;
                BlockedTimer.OnElapsed += BlockedTimer_OnElapsed;
                BlockedTimer.Timeout    = BlockedTimeout;
                BlockedTimer.Start();
            }
            else
            {
                PhotocellStatus = PhotocellState.Blocked;
            }
        }
Exemplo n.º 10
0
        void sensor_OnLeave(DematicSensor sender, Load load)
        {
            if (BlockedTimeout != 0)
            {
                BlockedTimer.Reset();
                BlockedTimer.OnElapsed -= BlockedTimer_OnElapsed;
            }

            if (ClearTimeout != 0 && PhotocellStatus == PhotocellState.Blocked) // || PhotocellStatus == PhotocellState.LoadBlocked)) [BG]
            {
                PhotocellStatus       = PhotocellState.LoadClear;
                ClearTimer.OnElapsed += ClearTimer_OnElapsed;
                ClearTimer.Timeout    = ClearTimeout;
                ClearTimer.Start();
            }
            else
            {
                PhotocellStatus = PhotocellState.Clear;
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// A single load has been dropped off by the elevator
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="load"></param>
        public void sensor_OnEnter2(DematicSensor sender, Load load)
        {
            if (TransportSection.Route.Loads.Count == 2)
            {
                string id = TransportSection.Route.Loads.ToList()[0].Identification;
                if (id != load.Identification)
                {
                    ((Case_Load)load).UserData = id + "," + load.Identification;
                }
                else
                {
                    ((Case_Load)load).UserData = load.Identification + "," + id;
                }

                ParentMultishuttle.ArrivedAtDropStationConvPosA(new PickDropStationArrivalEventArgs(Location2.LocName, (Case_Load)load, Elevator, 2));
            }
            else
            {
                ParentMultishuttle.ArrivedAtDropStationConvPosA(new PickDropStationArrivalEventArgs(Location1.LocName, (Case_Load)load, Elevator, 1));
            }


            //ParentMultishuttle.ArrivedAtDropStationConvPosA(new PickDropStationArrivalEventArgs(Location2.LocName, (Case_Load)load, Elevator, 1));

            Case_Load caseLoad = load as Case_Load;

            if (caseLoad != null)
            {
                //caseLoad.Case_Data.CurrentPosition = "D" + ParentMultishuttle.AisleNo + DropPositionGroupSide + ParentMultishuttle.POS2OUTFEED + Level;
                //if (Elevator.CurrentJobData.JobMode == MultishuttleElevatorJobData.JobModes.Unload1)
                //{
                //    ParentMultishuttle.Control.ToteArrivedAtConvDropStation(this, Elevator, caseLoad, ParentMultishuttle);
                //}
                //else if (Elevator.CurrentJobData.JobMode == MultishuttleElevatorJobData.JobModes.Unload2 && Location1.Active)
                //{
                //    ParentMultishuttle.Control.ToteArrivedAtConvDropStation(this, Elevator, caseLoad, ParentMultishuttle);
                //    Location1.Release();
                //}
            }
        }
Exemplo n.º 12
0
        private void sensor_OnEnter2(DematicSensor sender, Load load)
        {
            if (load.UserData is MultishuttleElevatorJobData) //caseload is moving on to elevator. Ignore.
            {
                load.Release();
                return;
            }

            load.Stop();

            //InfeedPickStationConveyor ElevatorConveyor = sender.Parent.Parent.Parent as InfeedPickStationConveyor;

            if (!MultiShuttle.PickStationNameToActionPoint[infeedInfo.location1Name].Active) //No caseload on location 1. Wait...
            {
                load.WaitingTime             = MultiShuttle.PickStation2Timeout;             //Wait for tote number 2
                load.OnFinishedWaitingEvent += Tote_PickStation2TimeOut;
            }
            else
            {
                //A caseload waits on location 1
                Tote_PickStation2TimeOut(load);
            }
        }
Exemplo n.º 13
0
        public void sensor_OnEnter1(DematicSensor sender, Load load)
        {
            Core.Environment.Log.Write(load.ToString() + "sensor_OnEnter1");
            Case_Load caseload1 = load as Case_Load;

            if (caseload1 == null)
            {
                Core.Environment.Log.Write(Name + ": Error. Load is not a caseload " + load + " entering MS", Color.Red);
                Core.Environment.Scene.Pause();
                return;
            }

            if (string.IsNullOrWhiteSpace(caseload1.SSCCBarcode))
            {
                Core.Environment.Log.Write(Name + ": Error. Tote " + load + " entering MS has no SSCCBarcode!", Color.Red);
                Core.Environment.Scene.Pause();
            }

            if (MultiShuttle.caseloads.Contains(caseload1))
            {
                Core.Environment.Log.Write(Name + ": Error. Tote ULID: " + load + " enters MS, but ULID is already known by MS. Did MS recieve type 20?", Color.Red);
                return;

                Core.Environment.Scene.Pause();
            }
            else
            {
                MultiShuttle.caseloads.Add(caseload1);
            }

            load.UserDeletable = false;
            load.Deletable     = true;

            //InfeedPickStationConveyor ElevatorConveyor = sender.Parent.Parent.Parent as InfeedPickStationConveyor;
            Case_Load caseload2 = null;

            ActionPoint ap2 = location2;

            if (ap2 != null)
            {
                caseload2 = ap2.ActiveLoad as Case_Load;
            }

            //Reset wmswait in case BK10 forgot...
            caseload1.Case_Data.RoutingTableUpdateWait = false;
            caseload1.Case_Data.OriginalPosition       = "";
            caseload1.Case_Data.CurrentPosition        = "";
            caseload1.Case_Data.DestinationPosition    = "";
            caseload1.Case_Data.PLCName         = "";
            caseload1.Case_Data.MissionTelegram = null;

            caseload1.CurrentPosition = infeedInfo.location1Name; //Update current location

            if (caseload2 != null && caseload2.Waiting)           //A tote at location2 and waiting for this tote
            {
                load.Stop();
                caseload2.WaitingTime = 0;                        //Stop waiting. This triggers Tote_PickStation2TimeOut
                return;
            }

            if (Route.Loads.Count == 2 && caseload2 == null) //A caseload should arrive after this on location 2 or is being moved on to the elevator...
            {
                if (Route.Loads.Last.Value.Distance < MultiShuttle.PickStationNameToActionPoint[infeedInfo.location2Name].Distance)
                {
                    if (Route.Loads.Last.Value.UserData is MultishuttleElevatorJobData)//case is moving on to elevator. Let this one pass
                    {
                        return;
                    }

                    load.Stop();
                }
                return;
            }
            if (Route.Loads.Count > 2 && caseload2 == null)
            {
                load.Stop();
                return;
            }
            if (caseload2 != null && !caseload2.Waiting)                    //caseload2 has already sent 25 arrival telegram.
            {
                load.Stop();
            }
        }
Exemplo n.º 14
0
 void sensor_OnLeave(DematicSensor sender, Load load)
 {
     CheckAndDoNextElevatorOutFeedJob();
 }
Exemplo n.º 15
0
        protected void sensor_OnLeave(DematicSensor sender, Load load)
        {
            if (sender.PreviousActiveLoad == load)
            {
                BlockChargeCheck();
                return;
            }

            int result;

            if (int.TryParse(sender.Name, out result))
            {
                if (result == LineFullPosition - 1)
                {
                    sensors[result].cube.Color = Color.Blue;
                }
                else if (PickPosition != 0 && result == PickPosition - 1)
                {
                    sensors[result].cube.Color = Color.DarkGreen;
                }
                else if (result < (Positions - InfeedBlockChargePositions))
                {
                    sensors[result].cube.Color = Color.Yellow;
                }
                else
                {
                    sensors[result].cube.Color = Color.Orange;
                }

                if (InfeedBlockChargePositions == 0 || result < (Positions - InfeedBlockChargePositions)) //Normal position (not block charge)
                {
                    //If there is a sensor behind you and it has a load and this sensor has been cleared then release the one behind
                    if (sensors.Count > (result + 1) && sensors[result + 1].sensor.Active)
                    {
                        if ((result + 1) != (PickPosition - 1) || ReleasePickLoad) // Also check if the position has stopped due to picking operation
                        {
                            ((Case_Load)sensors[result + 1].sensor.ActiveLoad).ReleaseLoad();
                            if (ReleasePickLoad) //Added by BG but shouldn't make any difference but it might
                            {
                                ReleasePickLoad = false;
                            }
                        }
                    }
                }
                else //Block Charge Position
                {
                    //Check all the positions behind and release the load if active
                    for (int i = result + 1; i < Positions; i++)
                    {
                        if (i != (PickPosition - 1) || ReleasePickLoad) // Also check if the position has stopped due to picking operation
                        {
                            sensors[i].sensor.ReleaseActiveCaseLoads();
                        }
                    }
                }

                if (result == 0) //Load has cleared front photocell
                {
                    if (sensors[0].sensor.ActiveLoad != null)
                    {
                        SetLoadWaiting(false, sensors[0].sensor.ActiveLoad.StartDisposing, load);
                    }
                    else
                    {
                        SetLoadWaiting(false, false, load);
                    }
                }

                //Set the route available status or start the timer
                if (LineFullPosition != 0 && result == LineFullPosition - 1)
                {
                    if (BlockedTimer != null)
                    {
                        BlockedTimer.Stop();
                        BlockedTimer.Reset();
                    }
                    if (LineAvailableTimeout == 0)
                    {
                        RouteAvailable = RouteStatuses.Available;
                    }
                    else
                    {
                        ClearTimer.Start();
                    }
                }
            }
        }
Exemplo n.º 16
0
        public void sensor_OnEnter(DematicSensor sender, Load load)
        {
            if (sender.PreviousActive)
            {
                BlockChargeCheck();
                return;
            }

            int result;

            if (int.TryParse(sender.Name, out result))
            {
                sensors[result].cube.Color = Color.Red;

                //Check if the location is a picking position
                if (result == (PickPosition - 1))
                {
                    load.Stop();
                    if (OnArrivedAtPickingPosition != null)
                    {
                        OnArrivedAtPickingPosition(this, new ManualPickArrivalArgs(load));
                    }
                }

                if (result != 0) // photocells are named 0 to n with 0 being the front photocell
                {
                    //bool stopLoad = false;
                    if (InfeedBlockChargePositions == 0 || result < (Positions - InfeedBlockChargePositions + 1))
                    {
                        //Normal Position
                        if (sensors[result - 1].sensor.Active) //Active means that there is a load on the sensor
                        {
                            //stopLoad = true;
                            load.Stop();
                        }
                    }
                    if (result >= (Positions - InfeedBlockChargePositions))
                    {
                        //Block Position
                        BlockChargeCheck();
                    }
                }
                else //Load has arrived at front (zeroth) photocell
                {
                    SetLoadWaiting(true, false, load);
                    if (NextRouteStatus == null || NextRouteStatus.Available != RouteStatuses.Available)
                    {
                        ((Case_Load)load).StopLoad_PLCControl();
                        //load.Stop();
                    }
                }

                if (InfeedBlockChargePositions == 0 || result < (Positions - InfeedBlockChargePositions)) //Normal positions
                {
                    //Stops the load behind if it's active to create a gap
                    if (sensors.Count > (result + 1) && sensors[result + 1].sensor.Active)
                    {
                        sensors[result + 1].sensor.StopActiveLoads();
                    }
                }

                //Set the route available status or start the timer
                if (LineFullPosition != 0 && result == LineFullPosition - 1)
                {
                    if (ClearTimer != null)
                    {
                        ClearTimer.Stop();
                        ClearTimer.Reset();
                    }
                    if (BlockedTimeout == 0)
                    {
                        RouteAvailable = RouteStatuses.Blocked;
                    }
                    else
                    {
                        BlockedTimer.Start();
                    }
                }
            }
        }