private void SendLocationLeftTelegram(Experior.Dematic.Base.EuroPallet palletLoad, string Location) { IATCLoadType atcLoad = palletLoad as IATCLoadType; atcLoad.Location = Location; palletPLC.SendLocationLeftTelegram(palletLoad as IATCLoadType); }
public void Pallet_Load_PalletLoadDisposed(Experior.Dematic.Base.EuroPallet Palletload) { if (TransportSection.Route.Loads.Contains(Palletload)) { // OnConveyorExitLoad(new ConveyorExitLoadEventArgs(Palletload as Load)); } }
bool divertArrival(Load load) { IATCPalletLoadType atcLoad = load as IATCPalletLoadType; if (LoadDestination && liftTableConveyor.Name == atcLoad.Destination && !atcLoad.LoadWaitingForWCS) { atcLoad.Stop(); atcLoad.LoadWaitingForWCS = true; atcLoad.Location = liftTableConveyor.Name; palletPLC.SendTransportFinishedTelegram(atcLoad); return(true); //Send a message to WMS and wait for the routing } List <Direction> validRoutes = new List <Direction>(); Experior.Dematic.Base.EuroPallet caseload = load as Experior.Dematic.Base.EuroPallet; if (atcLoad.Destination != null && liftTableConveyor.LeftMode == Modes.Divert && LeftRoutes != null && LeftRoutes.Contains(atcLoad.Destination)) { validRoutes.Add(Direction.Left); } if (atcLoad.Destination != null && liftTableConveyor.RightMode == Modes.Divert && RightRoutes != null && RightRoutes.Contains(atcLoad.Destination)) { validRoutes.Add(Direction.Right); } if (atcLoad.Destination != null && liftTableConveyor.StraightMode == Modes.Divert && StraightRoutes != null && StraightRoutes.Contains(atcLoad.Destination)) { validRoutes.Add(Direction.Straight); } if (validRoutes.Count == 0 && liftTableConveyor.DefaultRouting == Direction.None) { if (liftTableConveyor.StraightMode == Modes.Divert) { validRoutes.Add(Direction.Straight); } if (liftTableConveyor.RightMode == Modes.Divert) { validRoutes.Add(Direction.Right); } if (liftTableConveyor.LeftMode == Modes.Divert) { validRoutes.Add(Direction.Left); } } //Check if the load has the priority bit set bool priority = false; if (atcLoad.Destination != null && PriorityRoutes != null && PriorityRoutes.Contains(atcLoad.Destination)) { priority = true; } liftTableConveyor.RouteLoad(load, validRoutes, priority); return(true); //returns true if handled by this controller }
private Experior.Dematic.Base.EuroPallet GetLiftLoad(PalletStraight straight) { Experior.Dematic.Base.EuroPallet palletLoad = null; if (straight.TransportSection.Route.Loads.Count > 0) { palletLoad = (Experior.Dematic.Base.EuroPallet)straight.TransportSection.Route.Loads.First(); } return(palletLoad); }
bool loadRoutedFailedToDivert(Experior.Dematic.Base.EuroPallet caseLoad) { //if (liftTableConveyor.failedToDivertLoad == caseLoad && FailedToDivertLocation != null) //Load has been routed to Default route so send failed to divert location //{ // SendTransportFinishedTelegram(caseLoad, FailedToDivertLocation, FailedToDivertStatus); // return true; //} //else return(false); }
bool releasedRight(Load load) { Experior.Dematic.Base.EuroPallet palletLoad = load as Experior.Dematic.Base.EuroPallet; //if (!loadRoutedFailedToDivert(palletLoad) && !string.IsNullOrEmpty(RightRoutingLocation)) if (!string.IsNullOrEmpty(RightRoutingLocation)) { SendLocationLeftTelegram(palletLoad, RightRoutingLocation); } loadReleasedComplete(palletLoad); return(true); }
public static EuroPallet FeedEuroPallet(ITransportSection transportSection, float distance, BasePalletData palletData, PalletStatus palletStatus) { EuroPallet PalletLoad; IEmulationController controller = Core.Assemblies.Assembly.Items.Values.ToList().FirstOrDefault(x => x is IEmulationController) as IEmulationController; if (controller != null) { PalletLoad = controller.GetEuroPallet(transportSection.Route, 0, palletStatus); if (PalletLoad != null) //It is not necesary to implement this just return null Pallet load from the controller and a standard load will be created { return(PalletLoad); } } try { EuroPalletInfo palletInfo = new EuroPalletInfo(); palletInfo.color = Color.Peru; palletInfo.Status = palletStatus; palletInfo.filename = EuroPallet.Mesh; //LoadHeight includes the height of the pallet (145mm) palletInfo.LoadHeight = 2.2f; palletInfo.LoadWidth = 0.9f; palletInfo.LoadLength = 1.3f; //Set the dimensions of a EuroPallet (This is the standard size) palletInfo.length = 1.2f; palletInfo.width = 0.8f; palletInfo.height = 0.14f; // Actual size is 0.144f but reduced so visible space can be added in stack (0.005f space) EuroPallet palletLoad = new EuroPallet(palletInfo); //palletLoad.Part = (RigidLoadPart)new PalletPart(0.008f, palletInfo.color, palletInfo.length, palletInfo.height, palletInfo.width, true, palletInfo.density, Pallet_Load.Size(PalletType.EuroPallet), palletInfo.rigid); palletLoad.Pallet_Data = palletData; palletLoad.Pallet_Data.Weight = 60.0f; transportSection.Route.Add(palletLoad, distance); Load.Items.Add(palletLoad); string SSCCBarcode = GetSSCCBarcode(); if (SSCCBarcode != "") { palletLoad.SSCCBarcode = SSCCBarcode; palletLoad.Identification = SSCCBarcode; } return(palletLoad); } catch (Exception se) { Core.Environment.Log.Write(se); Core.Environment.Scene.Pause(); return(null); } }
public override void NextRouteStatus_OnAvailableChanged(object sender, RouteStatusChangedEventArgs e) { Experior.Dematic.Base.EuroPallet load = (Experior.Dematic.Base.EuroPallet)LineReleasePhotocell.OccupiedLoad; if (e._available == RouteStatuses.Available && ThisRouteStatus.Available == RouteStatuses.Blocked) //Move into next position { if (load != null && !load.LoadWaitingForWCS) { ThisRouteStatus.Available = RouteStatuses.Request; } } else if (e._available == RouteStatuses.Blocked && ThisRouteStatus.Available != RouteStatuses.Blocked) //Load has arrived at next position { ThisRouteStatus.Available = RouteStatuses.Available; } }
/// <summary> /// Raised when the platform has reached the desired level /// </summary> /// <param name="sender"></param> /// <param name="load"></param> private void LiftStopPoint_OnEnter(ActionPoint sender, Load load) { lift.Route.Motor.Stop(); if (Raised) { if (ControlType == ControlTypes.Local) { // Add delay then lower the lift delayTimer.OnElapsed += LowerLift_OnElapsed; delayTimer.Start(); } else if (ControlType == ControlTypes.Project_Script) { OnLiftRaisedStatic?.Invoke(this, load); } else if (ControlType == ControlTypes.Controller) { if (Controller != null) { OnLiftRaised?.Invoke(this, load); } } } else { Experior.Dematic.Base.EuroPallet pallet = GetLiftLoad(LiftConveyor); if (pallet != null && !pallet.LoadWaitingForWCS) { LiftConveyor.SetLoadWaiting(true, false, null); if (LiftConveyor.NextRouteStatus.Available == RouteStatuses.Available && LiftConveyor.ThisRouteStatus.Available == RouteStatuses.Blocked) { LiftConveyor.ThisRouteStatus.Available = RouteStatuses.Request; } } } }
private void StackPallet() { var createdloads = 1; var loadYaw = Trigonometry.PI(Trigonometry.Angle2Rad(Angle)); IEmulationController controller = Core.Assemblies.Assembly.Items.Values.ToList().FirstOrDefault(x => x is IEmulationController) as IEmulationController; EuroPallet load; while (createdloads < palletStacks) { if (controller != null) { load = controller.GetEuroPallet(null, 0, PalletStatus.Empty); } else { EuroPalletInfo info = new EuroPalletInfo { length = Length, height = Height, width = Width, color = Color.Peru, InStack = true, Status = PalletStatus.Empty, filename = Mesh, }; load = new EuroPallet(info); } //EuroPallet load = new EuroPallet(info); load.UserDeletable = false; load.Yaw = loadYaw; load.OnSelecting += palletLoad_OnSelecting; var stackY = (Height + 0.005f) * createdloads; // create empty space between loads Group(load, new Vector3(0, stackY, 0)); createdloads++; stackedPallets.Add(load); } }
private void StartTransportTelegramReceived(string[] telegramFields) { Experior.Dematic.Base.EuroPallet euroPallet = Experior.Dematic.Base.EuroPallet.GetPalletFromIdentification(telegramFields.GetFieldValue(TelegramFields.tuIdent)); IATCPalletLoadType palletLoad = (IATCPalletLoadType)euroPallet; if (palletLoad != null) //The load has been found so some attributes need to be changed (Cannot change the dimensions of the load however) { // Basic properties euroPallet.LoadColor = LoadColor(telegramFields.GetFieldValue(TelegramFields.color)); // Controller specific properties palletLoad.TUType = telegramFields.GetFieldValue(TelegramFields.tuType); palletLoad.Source = telegramFields.GetFieldValue(TelegramFields.source); palletLoad.Destination = telegramFields.GetFieldValue(TelegramFields.destination); palletLoad.PresetStateCode = telegramFields.GetFieldValue(TelegramFields.presetStateCode); float weight; float.TryParse(telegramFields.GetFieldValue(TelegramFields.weight), out weight); palletLoad.PalletWeight = weight / 1000; //Deal with additional project specific fields foreach (string field in ProjectFields) { string fieldValue = telegramFields.GetFieldValue(field); if (fieldValue != null) { if (palletLoad.ProjectFields.ContainsKey(field)) { palletLoad.ProjectFields[field] = fieldValue; } else { palletLoad.ProjectFields.Add(field, fieldValue); } } } //The load may be at a request location and the load will need to be released if (palletLoad.LoadWaitingForWCS) { //Load may be waiting on a straight conveyor so call the straightConveyor if (palletLoad.Route.Parent.Parent is PalletStraight) { palletLoad.LoadWaitingForWCS = false; PalletStraight palletStraight = palletLoad.Route.Parent.Parent as PalletStraight; palletStraight.ReleaseLoad((Load)palletLoad); } else if (palletLoad.Route.Parent.Parent is SingleDropStation) { palletLoad.LoadWaitingForWCS = false; SingleDropStation dropStation = palletLoad.Route.Parent.Parent as SingleDropStation; SendLocationLeftTelegram(palletLoad); dropStation.RouteLoadStraight((Load)palletLoad); //palletLoad.ReleaseLoad_WCSControl(); } } } else //The load has not been found but should one be created? Normally created through the Emulation Control Telegrams { if (Core.Assemblies.Assembly.Items.ContainsKey(telegramFields.GetFieldValue(TelegramFields.source)) && Core.Assemblies.Assembly.Items[telegramFields.GetFieldValue(TelegramFields.source)] is BaseStraight) { palletLoad = CreateEuroPallet(TelegramTypes.StartTransportTelegram, telegramFields); BaseStraight sourceConv = Core.Assemblies.Assembly.Items[telegramFields.GetFieldValue(TelegramFields.source)] as BaseStraight; palletLoad.SetYaw(sourceConv.ConveyorType); float position = 0; if (palletLoad.Yaw == 0) { position = position + (palletLoad.Length / 2); } else { position = position + (palletLoad.Width / 2); } sourceConv.TransportSection.Route.Add((Load)palletLoad, position); } else { Log.Write(string.Format("ATC Error {0}: Cannot create load at location from StartTransportTelegram, location {1} does not exist, message ignored", Name, telegramFields.GetFieldValue(TelegramFields.source)), Color.Red); } } }
void loadReleasedComplete(Experior.Dematic.Base.EuroPallet caseLoad) { }