示例#1
0
 private void CreateLoads()
 {
     foreach (var ap in Core.Routes.ActionPoint.Items.Values)
     {
         if (ap.Name == "AP1" || ap.Name == "AP2" || ap.Name == "AP3" || ap.Name == "AP4" || ap.Name == "AP5" || ap.Name == "AP6" || ap.Name == "AP7" || ap.Name == "AP8")
         {
             Core.Loads.Load load = Core.Loads.Load.CreateBox(0.6f, 0.4f, 0.6f, Color.OldLace);
             load.Switch(ap);
             load.Stop();
         }
     }
 }
示例#2
0
        private void Drop(Core.Loads.Load load, Core.Routes.ActionPoint ap)
        {
            float y = vertMover.Position.Y - leftframe.Height + horzMover.Height / 2;

            loadMover.UnAttach();
            load.Switch(ap);
            load.Stop();

            yMoverTimer.Start(new Microsoft.DirectX.Vector3(0, -y, 0), Math.Abs(y) * 2);

            Core.Timer.Action(() => Completed(load), Math.Abs(y) * 2 + 1);
        }
示例#3
0
        private void Lower2_OnEnter(ActionPoint sender, Core.Loads.Load load)
        {
            if ((string)load.UserData != "PICKED")
            {
                if (!upper2.Active)
                {
                    load.Stop();
                    load.Translate(() => load.Switch(upper2, true), new Microsoft.DirectX.Vector3(0, 0.5f, 0), 1.5f);
                }
                else
                {
                    Log.Write("There is a problem in the picking station, tell Barry he would love to fix it");
                    Pause();
                }
            }
            else //load has been picked and either lowered or picked at the first station
            {
                if (lastUpper2 == load)
                {
                    lowering2 = null;
                }

                if (NextRouteStatus.Available != Experior.Dematic.Base.RouteStatuses.Available)
                {
                    load.Stop();
                }
                else
                {
                    releaseLower2();
                }
            }

            //if the load has arrived from the
            if (lower1ToLower2 == load)
            {
                lower1ToLower2 = null;
                if (waitingToLower1 != null)
                {
                    StartLower1();
                }
                else
                {
                    InfeedCheck();
                }
            }
        }
示例#4
0
        private bool StartAP_OnEnter(Core.Loads.Load load, Side side, ActionPoint ap)
        {
            Side?s = load.UserData as Side?;

            if (s != null)
            {
                if (s == side)
                {
                    if (transferInfo.type == TransferType.TwoWay)
                    {
                        load.Yaw = -(float)(Math.PI / 180 * (90));
                    }

                    load.Switch(ap, true);
                    return(true);
                }
            }
            return(false);
        }
示例#5
0
        void apStraight_OnEnter(ActionPoint sender, Core.Loads.Load load)
        {
            if (OnDivertPointArrivedRoutingScript != null)
            {
                OnDivertPointArrivedRoutingScript(this, new BeltSorterDivertArgs(this, load, DivertRoute.None));
            }

            if (OnDivertPointArrivedControl != null)
            {
                OnDivertPointArrivedControl(this, new BeltSorterDivertArgs(this, load, DivertRoute.None));
            }

            if (Controller == null)
            {
                if (DefaultRoute == DivertRoute.Divert)
                {
                    bool keepOrienation = beltSorterDivertInfo.type == DivertType.Angled ? false : true;
                    load.Switch(apDivert, keepOrienation);
                }
            }
        }
示例#6
0
 void apStraight_OnEnter(ActionPoint sender, Core.Loads.Load load)
 {
     //Switch to divert point
     load.Switch(apDivert, true);
 }
示例#7
0
 void lhsEnd_OnEnter(ActionPoint sender, Core.Loads.Load load)
 {
     load.Switch(rhsEnd);
 }
示例#8
0
 void rightToLeftEndAP_OnEnter(ActionPoint sender, Core.Loads.Load load)
 {
     load.Switch(lhsEndAP, true);
     //load.Yaw = 0;
     DivertedLeft(load);
 }
示例#9
0
 void leftToRightEndAP_OnEnter(ActionPoint sender, Core.Loads.Load load)
 {
     load.Switch(rhsEndAP, true);
     //load.Yaw = 0;
     DivertedRight(load);
 }
示例#10
0
 void Leaving_OnEnter(ActionPoint sender, Core.Loads.Load load)
 {
     load.Switch(Elevator.ElevatorConveyor.Entering);
 }
示例#11
0
            /// <summary>
            /// Controls switching the load back to the correct StraightThrough conveyor
            /// </summary>
            void endAP_OnEnter(ActionPoint sender, Core.Loads.Load load)
            {
                ThreeWayRoutes? exitRoute = null;
                StraightThrough thisConv  = load.UserData as StraightThrough;

                if (thisConv != null)
                {
                    exitRoute = thisConv.convPosition;
                }

                //if (threeWaySwitch.ControlType == ControlTypes.Local)
                //{
                //    if (straightThrough.convPosition == ThreeWayRoutes.Right)
                //    {
                //        if (threeWaySwitch.RightDefaultDirection == ThreeWayRoutes.Left)
                //        {
                //            load.Switch(threeWaySwitch.LeftConv.endAP);
                //        }
                //        else if (threeWaySwitch.RightDefaultDirection == ThreeWayRoutes.Center)
                //        {
                //            load.Switch(threeWaySwitch.CenterConv.endAP);
                //        }
                //    }
                //    else if (straightThrough.convPosition == ThreeWayRoutes.Left)
                //    {
                //        if (threeWaySwitch.LeftDefaultDirection == ThreeWayRoutes.Right)
                //        {
                //            load.Switch(threeWaySwitch.RightConv.endAP);
                //        }
                //        else if (threeWaySwitch.LeftDefaultDirection == ThreeWayRoutes.Center)
                //        {
                //            load.Switch(threeWaySwitch.CenterConv.endAP);
                //        }
                //    }
                //    else if (straightThrough.convPosition == ThreeWayRoutes.Center)
                //    {
                //        if (threeWaySwitch.CenterDefaultDirection == ThreeWayRoutes.Right)
                //        {
                //            load.Switch(threeWaySwitch.RightConv.endAP);
                //        }
                //        else if (threeWaySwitch.CenterDefaultDirection == ThreeWayRoutes.Left)
                //        {
                //            load.Switch(threeWaySwitch.LeftConv.endAP);
                //        }
                //    }
                //}
                //else if (threeWaySwitch.ControlType == ControlTypes.Controller)
                //{
                if (straightThrough.convPosition == ThreeWayRoutes.Right)
                {
                    if (exitRoute == ThreeWayRoutes.Left)
                    {
                        load.Switch(threeWaySwitch.LeftConv.endAP);
                    }
                    else if (exitRoute == ThreeWayRoutes.Center)
                    {
                        load.Switch(threeWaySwitch.CenterConv.endAP);
                    }
                }
                else if (straightThrough.convPosition == ThreeWayRoutes.Left)
                {
                    if (exitRoute == ThreeWayRoutes.Right)
                    {
                        load.Switch(threeWaySwitch.RightConv.endAP);
                    }
                    else if (exitRoute == ThreeWayRoutes.Center)
                    {
                        load.Switch(threeWaySwitch.CenterConv.endAP);
                    }
                }
                else if (straightThrough.convPosition == ThreeWayRoutes.Center)
                {
                    if (exitRoute == ThreeWayRoutes.Right)
                    {
                        load.Switch(threeWaySwitch.RightConv.endAP);
                    }
                    else if (exitRoute == ThreeWayRoutes.Left)
                    {
                        load.Switch(threeWaySwitch.LeftConv.endAP);
                    }
                }
                //}
            }