예제 #1
0
        void aController_telegramReceived(object sender, ControllerTelegramReceivedEventArgs e)
        {
            if (e._telegram.GetTelegramType() == TelegramTypes.TransportRequestTelegram)
            {
                string location        = e._telegram.GetFieldValue(TelegramFields.location);
                string tuIdent         = e._telegram.GetFieldValue(TelegramFields.tuIdent);
                Match  matchCCPA00LU00 = regexCCPA00LU00.Match(location);
                Match  matchCCDE00WS00 = regexCCDE00WS00.Match(location);

                if (matchCCPA00LU00.Success)
                {
                    string aisle    = location.Substring(5, 1);
                    string position = location.Substring(9, 1);
                    if (e._telegram.GetFieldValue(TelegramFields.dropIndex) == "" || e._telegram.GetFieldValue(TelegramFields.dropIndex) == "0000")
                    {
                        ATCStartTransport stack = vfc.AllRoutings[string.Format("CCPA0{0}LU0{1}_STACK", aisle, position)] as ATCStartTransport;
                        stack.triggerRouting(e._telegram);
                    }
                    else
                    {
                        string destination = string.Format("CCPA0{0}WS01", aisle, position);
                        string pallet;
                        string group;
                        string sortInfo;
                        if (position == "1")
                        {
                            Left(aisle, out pallet, out group, out sortInfo);
                        }
                        else
                        {
                            Right(aisle, out pallet, out group, out sortInfo);
                        }
                        SendSortTransportTelegram(e._telegram, destination, pallet, group, sortInfo);
                    }
                }
                else if (matchCCDE00WS00.Success && !EnableDepal)
                {
                    DepalMemory.Add(e._telegram);
                }
            }
        }
예제 #2
0
        private void MSC_telegramReceived(object sender, ControllerTelegramReceivedEventArgs e)
        {
            if (e._telegram.GetTelegramType() == TelegramTypes.MultishuttleTransportFinishedTelegram)
            {
                string dest      = e._telegram.GetFieldValue(TelegramFields.destination);
                string dropIndex = e._telegram.GetFieldValue(TelegramFields.dropIndex);
                string tuIdent   = e._telegram.GetFieldValue(TelegramFields.tuIdent);

                if (dest.Contains("DS10"))
                {
                    string aisle     = dest.Substring(4, 2);
                    string side      = dest.Substring(7, 1) == "R" ? "01" : "02"; //L or R; This will define the pusher R=LU01 and L=LU02
                    string commPoint = string.Format("CCPA{0}LU{1}", aisle, side);

                    //if the drop index to the last one has changed then the LastIdent is added to the list
                    if (dropIndex != LastDropIndex[commPoint])
                    {
                        LastOfSidePallet[commPoint].Add(LastIdent[commPoint]);
                    }
                    LastIdent[commPoint]     = tuIdent;
                    LastDropIndex[commPoint] = dropIndex;
                }
            }
        }