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(); } } }
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); }
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(); } } }
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); }
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); } } }
void apStraight_OnEnter(ActionPoint sender, Core.Loads.Load load) { //Switch to divert point load.Switch(apDivert, true); }
void lhsEnd_OnEnter(ActionPoint sender, Core.Loads.Load load) { load.Switch(rhsEnd); }
void rightToLeftEndAP_OnEnter(ActionPoint sender, Core.Loads.Load load) { load.Switch(lhsEndAP, true); //load.Yaw = 0; DivertedLeft(load); }
void leftToRightEndAP_OnEnter(ActionPoint sender, Core.Loads.Load load) { load.Switch(rhsEndAP, true); //load.Yaw = 0; DivertedRight(load); }
void Leaving_OnEnter(ActionPoint sender, Core.Loads.Load load) { load.Switch(Elevator.ElevatorConveyor.Entering); }
/// <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); } } //} }