Пример #1
0
        public MachineSeq(HalconVision cam, RobotVision hWnd3, SerailComMgr SeRobot, Panasonic_PLCMgr pana_plc, TcpseriveComMgr robotmgr, A162ClientComMgr A162commgr, mainWindow MWin)
        {
            camera3      = cam;
            hWndCtrl3    = hWnd3;
            SerailRobot  = SeRobot;
            MianWin      = MWin;
            PanaPLC      = pana_plc;
            Myrobotmgr   = robotmgr;
            MyA162comMgr = A162commgr;

            robotSeq = new WorkerThread("RobotSeq ", MWin);

            Myrobotmgr.TcpserList[0].EventCommu += Operition;
        }
Пример #2
0
        public mainWindow()
        {
            InitializeComponent();
            this.mainTC.Region = new Region(new RectangleF(this.HomeTP.Left, this.HomeTP.Top, this.HomeTP.Width, this.HomeTP.Height));//Hide Tabcontrol

            VersionLbl.Text = Para.SWVersion;

            mchSettingsFilePath = exePath + mchSetFileName;

            Para.MchConfigFileName = mchSettingsFilePath;
            camera3   = new HalconVision("robot", Mpanel1, HalconWin3);
            hWndCtrl3 = new RobotVision(HalconWin3, camera3);
            SerailMgr = new SerailComMgr();
            SerailMgr.SerailComListAdd("LightSourceCom");
            PanaMgr = new Panasonic_PLCMgr();
            PanaMgr.PanaAdd("Panan1");

            RobotMgr = new TcpseriveComMgr();
            RobotMgr.TcpseriveComMgr_Add("Robot1");
            RobotMgr.TcpserList[0].EventConState += UpdateRobotCountStatusLbl;

            A162ComMgr = new A162ClientComMgr();
            A162ComMgr.AddRobotCom("ToA162");
            A162ComMgr.A162ClientComList[0].OnSendAndRec += UpdateA162CountStatusLbl;

            SeqMgr = new MachineSeq(camera3, hWndCtrl3, SerailMgr, PanaMgr, RobotMgr, A162ComMgr, this);

            HalconWin3.Parent = panel1;

            camera3.OnImageReadyFunction += OnImgReadyCam3;


            //DateTime dtime = DateTime.Now;
            //TimeSpan tsp;
            //Thread.Sleep(1000);
            //tsp = DateTime.Now - dtime;
            //MessageBox.Show(tsp.TotalMilliseconds.ToString());
        }