Пример #1
0
        public BeltSorterMerge(BeltSorterMergeInfo info) : base(info)
        {
            beltSorterMergeInfo = info;

            if (info.type == MergeType.PopUp)
            {
                arrow.Dispose();
            }

            StraightConveyorInfo divertSectionInfo = new StraightConveyorInfo()
            {
                Length    = info.mergeConveyorLength,
                thickness = info.thickness,
                Width     = info.width,
                Speed     = info.Speed,
                color     = info.color
            };

            mergeSection = new StraightConveyor(divertSectionInfo);
            mergeSection.endLine.Visible     = false;
            mergeSection.EndFixPoint.Enabled = false;
            mergeSection.EndFixPoint.Visible = false;

            Add(mergeSection);

            TransportSection.Route.InsertActionPoint(apStraight);
            mergeSection.TransportSection.Route.InsertActionPoint(apMerge, info.mergeConveyorLength);

            apMerge.OnEnter    += apMerge_OnEnter;
            apStraight.OnEnter += apStraight_OnEnter;

            mergeSection.StartFixPoint.OnSnapped   += MergeSectionStartFixPoint_OnSnapped;
            mergeSection.StartFixPoint.OnUnSnapped += MergeSectionStartFixPoint_OnUnSnapped;

            ControlType = info.ControlType;

            if (beltControl.LineReleasePhotocell != null)
            {
                beltControl.LineReleasePhotocell.Dispose();
            }

            //if (mergeSection.beltControl.LineReleasePhotocell != null)
            //{
            //    mergeSection.beltControl.LineReleasePhotocell.Dispose();
            //}

            MergeAngle          = info.mergeAngle;
            Length              = info.length;
            MergeConveyorOffset = info.mergeConveyorOffset;

            OffSetTimer.OnElapsed += OffSetTimer_OnElapsed;
            OffSetTimer.Timeout    = OffSetInductTime;

            UpdateConveyor();
        }
Пример #2
0
        private StraightConveyorInfo NewStraightInfo()
        {
            StraightConveyorInfo straightInfo = new StraightConveyorInfo();

            straightInfo.Length        = 2;
            straightInfo.Speed         = 0.7f;
            straightInfo.thickness     = 0.05f;
            straightInfo.color         = Core.Environment.Scene.DefaultColor;
            straightInfo.conveyorWidth = CaseConveyorWidth._500mm;
            return(straightInfo);
        }
Пример #3
0
        private StraightConveyorInfo NewStraightInfo(TransferInfo info)
        {
            StraightConveyorInfo straightInfo = new StraightConveyorInfo();

            straightInfo.Length = DHDMLength;
            //straightInfo.Speed                = info.speed;
            straightInfo.thickness     = convThickness;
            straightInfo.color         = info.color;
            straightInfo.conveyorWidth = CaseConveyorWidth._500mm;
            return(straightInfo);
        }
Пример #4
0
        private StraightConveyorInfo NewStraightInfo(PickDoubleLiftInfo info)
        {
            StraightConveyorInfo straightInfo = new StraightConveyorInfo();

            straightInfo.Length = 1.5f;
            //straightInfo.Speed                = info.speed;
            straightInfo.thickness     = 0.05f;
            straightInfo.color         = Color.DarkGray;
            straightInfo.conveyorWidth = CaseConveyorWidth._500mm;
            return(straightInfo);
        }
Пример #5
0
        public StraightConveyor(StraightConveyorInfo info) : base(info)
        {
            try
            {
                straightinfo = info;
                TransportSection.Route.DragDropLoad = false;
                Entering          = TransportSection.Route.InsertActionPoint(0);
                Leaving           = TransportSection.Route.InsertActionPoint(TransportSection.Route.Length);
                Entering.OnEnter += entering_OnEnter;
                // Leaving.OnEnter += leaving_OnEnter;
                Core.Environment.Scene.OnLoaded += Scene_OnLoaded;

                Intersectable = false;

                if (TransportSection.Route.Arrow != null)
                {
                    TransportSection.Route.Arrow.Visible = false;
                }

                //Length does not update when dragging so disabled for now (Update on length is required to ensure that photocells are positioned correctly)
                StartFixPoint.Dragable = false;
                EndFixPoint.Dragable   = false;

                arrow = new DematicArrow(this, Width);

                startLine = new Cube(Color.Black, Width + 0.005f, 0.055f, 0.004f);
                Add(startLine);
                startLine.LocalPosition = new Vector3(Length / 2 + 0.002f, 0, 0);
                startLine.Yaw           = (float)Math.PI / 2;

                endLine = new Cube(Color.Black, Width + 0.005f, 0.055f, 0.004f);
                Add(endLine);
                endLine.LocalPosition = new Vector3(-Length / 2 - 0.002f, 0, 0);
                endLine.Yaw           = (float)Math.PI / 2;

                EndFixPoint.OnUnSnapped += EndFixPoint_OnUnSnapped;
                EndFixPoint.OnSnapped   += EndFixPoint_OnSnapped;

                StartFixPoint.OnUnSnapped += StartFixPoint_OnUnSnapped;
                StartFixPoint.OnSnapped   += StartFixPoint_OnSnapped;

                ThisRouteStatus.OnRouteStatusChanged            += ThisRouteStatus_OnAvailableChanged;
                TransportSection.Route.Motor.OnDirectionChanged += Motor_OnDirectionChanged;
            }
            catch (Exception ex)
            {
                Core.Environment.Log.Write(ex.Message);
            }
        }
Пример #6
0
        public AngledMerge(AngledMergeInfo info) : base(info)
        {
            angledMergeInfo = info;

            StraightConveyorInfo divertSectionInfo = new StraightConveyorInfo()
            {
                Length    = info.mergeConveyorLength,
                thickness = info.thickness,
                Width     = info.width,
                Speed     = info.Speed,
                color     = info.color
            };

            mergeSection = new StraightConveyor(divertSectionInfo);
            mergeSection.endLine.Visible     = false;
            mergeSection.EndFixPoint.Enabled = false;
            mergeSection.EndFixPoint.Visible = false;

            Add(mergeSection);

            TransportSection.Route.InsertActionPoint(apStraight);
            TransportSection.Route.InsertActionPoint(apEnd, Length);
            apEnd.Edge = ActionPoint.Edges.Trailing;
            mergeSection.TransportSection.Route.InsertActionPoint(apMerge, info.mergeConveyorLength);

            apMerge.OnEnter    += apMerge_OnEnter;
            apStraight.OnEnter += apStraight_OnEnter;
            apEnd.OnEnter      += apEnd_OnEnter;

            mergeSection.StartFixPoint.OnSnapped   += MergeSectionStartFixPoint_OnSnapped;
            mergeSection.StartFixPoint.OnUnSnapped += MergeSectionStartFixPoint_OnUnSnapped;

            MergeAngle          = info.mergeAngle;
            Length              = info.length;
            MergeConveyorOffset = info.mergeConveyorOffset;
            MergeWidth          = info.mergeWidth;
            //ReleaseTimer.OnElapsed += ReleaseTimer_OnElapsed;

            TransportSection.Route.OnLoadRemoved += Route_OnLoadRemoved;
            mergeSection.TransportSection.Route.OnLoadRemoved += Route_OnLoadRemoved;

            UpdateConveyor();
        }
Пример #7
0
        DivertRoute SelectedRoute; //used to rember the last route that a load was sent to when using local control

        public AngledDivert(AngledDivertInfo info) : base(info)
        {
            angledDivertInfo = info;
            StraightConveyorInfo divertSectionInfo = new StraightConveyorInfo()
            {
                Length    = info.DivertConveyorLength,
                thickness = info.thickness,
                Width     = info.width,
                Speed     = info.divertSpeed,
                color     = info.color
            };

            divertSection = new StraightConveyor(divertSectionInfo);
            divertSection.startLine.Visible        = false;
            divertSection.StartFixPoint.Visible    = false;
            divertSection.StartFixPoint.Enabled    = false;
            divertSection.EndFixPoint.OnSnapped   += DivertSectionEndFixPoint_OnSnapped;
            divertSection.EndFixPoint.OnUnSnapped += DivertSectionEndFixPoint_OnUnSnapped;

            Add(divertSection);
            DivertAngle = info.divertAngle;

            TransportSection.Route.InsertActionPoint(apStraight);
            divertSection.TransportSection.Route.InsertActionPoint(apDivert, 0);

            apStraight.OnEnter          += apStraight_OnEnter;
            ReleaseDelayTimer.OnElapsed += ReleaseDelayTimer_OnElapsed;

            RouteAvailable = RouteStatuses.Request;

            DivertConveyorOffset = info.DivertConveyorOffset;

            if (beltControl.LineReleasePhotocell != null)
            {
                beltControl.LineReleasePhotocell.Dispose();
            }

            UpdateConveyor();
        }
Пример #8
0
        public DivertTransferPlate(DivertTransferPlateInfo info) : base(info)
        {
            divertTransferPlateInfo = info;
            arrow.Visible           = false; //Don't show the straight arrow
            EndFixPoint.Visible     = false; //Loads can only transfer, they cannot go straight
            endLine.Visible         = false;

            StraightConveyorInfo divertSectionInfo = new StraightConveyorInfo()
            {
                Length    = Width / 2,
                thickness = info.thickness,
                Width     = info.width,
                Speed     = info.Speed
            };

            divertSection = new StraightConveyor(divertSectionInfo);
            divertSection.startLine.Visible     = false;
            divertSection.StartFixPoint.Visible = false;
            divertSection.StartFixPoint.Enabled = false;
            divertSection.Color = Core.Environment.Scene.DefaultColor;
            divertSection.EndFixPoint.Visible = false;
            divertSection.EndFixPoint.Enabled = false;

            DivertEndFixPoint = new FixPoint(FixPoint.Types.End, this);
            Add(DivertEndFixPoint);
            DivertEndFixPoint.Route        = divertSection.TransportSection.Route;
            DivertEndFixPoint.OnSnapped   += DivertSection_EndFixPoint_OnSnapped;
            DivertEndFixPoint.OnUnSnapped += DivertSection_EndFixPoint_OnUnSnapped;

            Add(divertSection);

            TransportSection.Route.InsertActionPoint(apStraight);
            divertSection.TransportSection.Route.InsertActionPoint(apDivert, 0);

            apStraight.OnEnter += apStraight_OnEnter;

            UpdateConveyor();
        }
Пример #9
0
        public MiniloadPickStation(MiniloadPickStationInfo info) : base(info)
        {
            miniloadPickStationInfo = info;

            StraightConveyorInfo feedSectionInfo = new StraightConveyorInfo()
            {
                Length    = Width / 2,
                thickness = info.thickness,
                Width     = info.width,
                Speed     = info.Speed
            };

            feedSection = new StraightConveyor(feedSectionInfo);
            feedSection.endLine.Visible     = false;
            feedSection.EndFixPoint.Enabled = false;
            feedSection.EndFixPoint.Visible = false;
            feedSection.Color = this.Color;
            feedSection.TransportSection.Visible = false;

            StraightConveyorInfo reverseSectionInfo = new StraightConveyorInfo()
            {
                Length    = Width / 2,
                thickness = info.thickness,
                Width     = info.width,
                Speed     = info.Speed
            };

            reverseSection = new StraightConveyor(reverseSectionInfo);
            reverseSection.endLine.Visible       = false;
            reverseSection.startLine.Visible     = false;
            reverseSection.EndFixPoint.Enabled   = false;
            reverseSection.EndFixPoint.Visible   = false;
            reverseSection.StartFixPoint.Enabled = false;
            reverseSection.StartFixPoint.Visible = false;
            reverseSection.Color = this.Color;
            reverseSection.TransportSection.Visible = false;
            reverseSection.arrow.Visible            = false;

            Add(feedSection);
            Add(reverseSection);

            TransportSection.Route.InsertActionPoint(apEnter);
            TransportSection.Route.InsertActionPoint(apHold, 0);

            feedSection.TransportSection.Route.InsertActionPoint(apFeed, feedSection.Length);
            reverseSection.TransportSection.Route.InsertActionPoint(apRevStart, 0);
            reverseSection.TransportSection.Route.InsertActionPoint(apRevEnd, reverseSection.Length);

            apFeed.OnEnter   += apFeed_OnEnter;
            apEnter.OnEnter  += apEnter_OnEnter;
            apHold.OnEnter   += apHold_OnEnter;
            apRevEnd.OnEnter += apRevEnd_OnEnter;

            feedSection.StartFixPoint.OnSnapped   += FeedSectionStartFixPoint_OnSnapped;
            feedSection.StartFixPoint.OnUnSnapped += FeedSectionStartFixPoint_OnUnSnapped;

            Length               = info.length;
            feedSection.Width    = (float)info.feedWidth / 1000;
            Speed                = info.conveyorSpeed;
            reverseSection.Speed = info.conveyorSpeed;

            SingleTimer            = new Timer(info.singleTimeout);
            SingleTimer.OnElapsed += SingleTimer_OnElapsed;

            UpdateConveyor();
        }
Пример #10
0
        public MiniloadDropStation(MiniloadDropStationInfo info) : base(info)
        {
            miniloadDropStationInfo = info;

            StraightConveyorInfo receiveSectionInfo = new StraightConveyorInfo()
            {
                Length    = Width / 2,
                thickness = info.thickness,
                Width     = info.width,
                Speed     = info.Speed
            };

            releaseSection = new StraightConveyor(receiveSectionInfo);
            releaseSection.startLine.Visible     = false;
            releaseSection.StartFixPoint.Enabled = false;
            releaseSection.StartFixPoint.Visible = false;
            releaseSection.Color = this.Color;
            releaseSection.TransportSection.Visible = false;

            StraightConveyorInfo reverseSectionInfo = new StraightConveyorInfo()
            {
                Length    = Width / 2,
                thickness = info.thickness,
                Width     = info.width,
                Speed     = info.Speed
            };

            reverseSection = new StraightConveyor(reverseSectionInfo);
            reverseSection.endLine.Visible       = false;
            reverseSection.startLine.Visible     = false;
            reverseSection.EndFixPoint.Enabled   = false;
            reverseSection.EndFixPoint.Visible   = false;
            reverseSection.StartFixPoint.Enabled = false;
            reverseSection.StartFixPoint.Visible = false;
            reverseSection.Color = this.Color;
            reverseSection.TransportSection.Visible = false;
            reverseSection.arrow.Visible            = false;

            Add(releaseSection);
            Add(reverseSection);

            TransportSection.Route.InsertActionPoint(apEnter);
            TransportSection.Route.InsertActionPoint(apHold, 0);

            releaseSection.TransportSection.Route.InsertActionPoint(apRelStart, 0);
            releaseSection.TransportSection.Route.InsertActionPoint(apRelEnd, releaseSection.Length);
            reverseSection.TransportSection.Route.InsertActionPoint(apRevStart, 0);
            reverseSection.TransportSection.Route.InsertActionPoint(apRevEnd, reverseSection.Length);

            apRelEnd.Edge = ActionPoint.Edges.Trailing;

            apRelStart.OnEnter += apRelStart_OnEnter;
            apRelEnd.OnEnter   += apRelEnd_OnEnter;
            apEnter.OnEnter    += apEnter_OnEnter;
            apHold.OnEnter     += apHold_OnEnter;
            apRevEnd.OnEnter   += apRevEnd_OnEnter;

            releaseSection.EndFixPoint.OnSnapped   += ReleaseSectionStartFixPoint_OnSnapped;
            releaseSection.EndFixPoint.OnUnSnapped += ReleaseSectionStartFixPoint_OnUnSnapped;

            Length = info.length;
            releaseSection.Width = (float)info.receiveWidth / 1000;
            Speed = info.conveyorSpeed;
            reverseSection.Speed = info.conveyorSpeed;

            UpdateConveyor();
        }