public void ap_Enter(DematicCommunicationPoint sender, Load load) { IATCPalletLoadType palletLoad = load as IATCPalletLoadType; if (palletLoad == null) { return; } palletLoad.Location = commPoint.Name; //Update the palletLoad location switch (CommPointType) { case PalletCommPointATCInfo.PalletCommPointATCTypes.None: break; case PalletCommPointATCInfo.PalletCommPointATCTypes.LocationArrived: LocationArrived(CommPoint, palletLoad); break; case PalletCommPointATCInfo.PalletCommPointATCTypes.LocationLeft: LocationLeft(commPoint, palletLoad); break; case PalletCommPointATCInfo.PalletCommPointATCTypes.TransportRequest: TransportRequest(commPoint, palletLoad); break; case PalletCommPointATCInfo.PalletCommPointATCTypes.TransportFinished: TransportFinished(commPoint, palletLoad); break; case PalletCommPointATCInfo.PalletCommPointATCTypes.TransportRequestOrFinished: TransportRequestOrFinished(commPoint, palletLoad); break; default: break; } }
bool divertArrival(Load load) { IATCPalletLoadType atcLoad = load as IATCPalletLoadType; atcLoad.StopLoad_WCSControl(); return(true); //returns true if handled by this controller }
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 void LocationLeft(PalletCommunicationPoint commPoint, IATCPalletLoadType palletLoad) { if (AlwaysArrival || palletLoad.Location == palletLoad.Destination) { palletLoad.Location = commPoint.Name; //palletLoad.MTS = commPoint.ControllerName; casePLC.SendLocationLeftTelegram(palletLoad as IATCPalletLoadType); } }
private void TransportFinished(PalletCommunicationPoint commPoint, IATCPalletLoadType palletLoad) { if (AlwaysArrival || palletLoad.Location == palletLoad.Destination) { palletLoad.Location = commPoint.Name; casePLC.SendTransportFinishedTelegram(palletLoad); if (LoadWait) { palletLoad.LoadWaitingForWCS = true; palletLoad.Stop(); } } }
//TODO: For the loads that are stopping on the case conveyor at these communication points it //has to be placed in the correct position otherwise its can be an issue (I have found that placing //them in exactly the correct place compaired to a accumulation sensor is a good position as all atction point are triggered private void TransportRequest(PalletCommunicationPoint commPoint, IATCPalletLoadType palletLoad) { if (AlwaysArrival || palletLoad.Location == palletLoad.Destination || string.IsNullOrEmpty(palletLoad.Destination)) { palletLoad.Location = commPoint.Name; //palletLoad.MTS = commPoint.ControllerName; casePLC.SendTransportRequestTelegram(palletLoad); if (LoadWait) { //[BG] Not happy with this, if this is used then it needs to be understood what the issues are with it //(Like stopping on a belt is bad and you need to put the Comm Point in the right place on accumulation conveyor) palletLoad.LoadWaitingForWCS = true; palletLoad.Stop(); } } }
private void TransportRequestOrFinished(PalletCommunicationPoint commPoint, IATCPalletLoadType palletLoad) { if (palletLoad.Location == palletLoad.Destination) { //Send TransportFinishedTelegram palletLoad.Location = commPoint.Name; casePLC.SendTransportFinishedTelegram(palletLoad); } else { //Send TransportRequestTelegram palletLoad.Location = commPoint.Name; casePLC.SendTransportRequestTelegram(palletLoad); } if (LoadWait) { palletLoad.LoadWaitingForWCS = true; palletLoad.Stop(); } }
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); } } }