Exemple #1
0
 private void LocationLeft(PalletStraight palletStraight, IATCLoadType palletLoad)
 {
     if (AlwaysArrival || palletLoad.Location == palletLoad.Destination)
     {
         palletLoad.Location = palletStraight.Name;
         palletPLC.SendLocationLeftTelegram(palletLoad); // Should we not use the base IATCLoadType for this?
     }
 }
Exemple #2
0
        public MHEControl_PalletStraight(PalletStraightATCInfo info, PalletStraight palletStraightAssembly)
        {
            palletStraightATCInfo = info;
            Info           = info; // set this to save properties
            palletStraight = palletStraightAssembly;
            palletStraight.OnLoadArrived += PalletStraight_OnLoadArrived;
            palletStraight.OnLoadLeft    += PalletStraight_OnLoadLeft;


            palletPLC = palletStraight.Controller as MHEController_Pallet;
        }
Exemple #3
0
 private void LocationArrived(PalletStraight palletStraight, IATCLoadType palletLoad)
 {
     if (AlwaysArrival || palletLoad.Location == palletLoad.Destination)
     {
         palletLoad.Location = palletStraight.Name;
         palletPLC.SendLocationArrivedTelegram(palletLoad);
         if (LoadWait)
         {
             palletLoad.LoadWaitingForWCS = true;
         }
     }
 }
Exemple #4
0
        //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(PalletStraight palletStraight, IATCLoadType palletLoad)
        {
            if (AlwaysArrival || palletLoad.Location == palletLoad.Destination || string.IsNullOrEmpty(palletLoad.Destination))
            {
                palletLoad.Location = palletStraight.Name;
                palletPLC.SendTransportRequestTelegram(palletLoad);

                if (LoadWait)
                {
                    palletLoad.LoadWaitingForWCS = true;
                }
            }
        }
Exemple #5
0
        private void TransportRequestOrFinished(PalletStraight palletStraight, IATCLoadType palletLoad)
        {
            if (palletLoad.Location == palletLoad.Destination)
            {
                //Send TransportFinishedTelegram
                palletLoad.Location = palletStraight.Name;
                palletPLC.SendTransportFinishedTelegram(palletLoad);
            }
            else
            {
                //Send TransportRequestTelegram
                palletLoad.Location = palletStraight.Name;
                palletPLC.SendTransportRequestTelegram(palletLoad);
            }

            if (LoadWait)
            {
                palletLoad.LoadWaitingForWCS = true;
            }
        }
Exemple #6
0
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            List <string> photocells = new List <string>();

            try
            {
                if (context.Instance is BaseStraight)
                {
                    BaseStraight conveyor = context.Instance as BaseStraight;
                    foreach (Assembly assembly in conveyor.Assemblies)
                    {
                        if (assembly is PalletPhotocell)
                        {
                            photocells.Add(assembly.Name);
                        }
                    }
                }
                else if (context.Instance is PalletStraight)
                {
                    PalletStraight conveyor = context.Instance as PalletStraight;
                    foreach (Assembly assembly in conveyor.Assemblies)
                    {
                        if (assembly is PalletPhotocell)
                        {
                            photocells.Add(assembly.Name);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Core.Environment.Log.Write("PhotocellConverter combodropdown error", Color.Red);
                Core.Environment.Log.Write(ex.Message, Color.Red);
            }


            return(new StandardValuesCollection(photocells));
        }
Exemple #7
0
        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);
                }
            }
        }