コード例 #1
0
        public void Setup()
        {
            LaserSensorGlueLine  = new LaserSensor("COM4", 9600, 2);
            LaserSensorGluePoint = new LaserSensor("COM3", 9600, 1);

            PressureSensorGlueLine  = new PressureSensor("COM6", 9600, 2);
            PressureSensorGluePoint = new PressureSensor("COM5", 9600, 1);

            LaserSensorGluePoint.Start();
            LaserSensorGlueLine.Start();
            PressureSensorGluePoint.Start();
            PressureSensorGlueLine.Start();

            Mc = new MotionController();
            Mc.Connect();
            Mc.Setup();
            Mc.ZeroAllPositions();

            Vision = new VisionServer(Mc);

            WorkTable = new RoundTable(Mc);
            WorkTable.Setup();

            UVLight = new UVLight(Mc, WorkTable);

            LoadCapturePositions();
            LoadUserOffsets();
            LoadDevelopPoints();
            LoadGlueParameters();

            LoadUserSettings();
            SettingManager = new SettingManager(this);

            LRobot = new LStation(Mc, Vision, WorkTable, CapturePositions, UserOffsets);
            LRobot.Setup();

            VLoadStation = new VLoadTrayStation(Mc);
            VLoadStation.Setup();
            VUnloadStation = new VUnloadTrayStation(Mc);
            VUnloadStation.Setup();
            LLoadStation = new LLoadTrayStation(Mc);
            LLoadStation.Setup();
            LUnloadStation = new LUnloadTrayStation(Mc);
            LUnloadStation.Setup();

            VRobot = new VStation(Mc, Vision, WorkTable, VLoadStation, VUnloadStation,
                                  CapturePositions, UserOffsets);
            VRobot.Setup();

            GlueLineRobot = new GlueLineStation(Mc, Vision, WorkTable, CoordinateId.GlueLine,
                                                GlueParameters, CapturePositions, UserOffsets,
                                                PressureSensorGlueLine, LaserSensorGlueLine);
            GlueLineRobot.Setup();

            GluePointRobot = new GluePointStation(Mc, Vision, WorkTable, CoordinateId.GluePoint,
                                                  GlueParameters, CapturePositions, UserOffsets,
                                                  PressureSensorGluePoint, LaserSensorGluePoint);
            GluePointRobot.Setup();

            VRobot.CheckVacuumValue = _checkVacuum;
            LRobot.CheckVacuumValue = _checkVacuum;
        }