Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            bool connected = false;

            GalilWidgets.GalilWidget wi; //for casting to Widget Interface
            wi = (GalilWidgets.GalilWidget)gwTerm1; gwComs1.GWRegisterWidget(ref wi);
            wi = (GalilWidgets.GalilWidget)gwDatRec1; gwComs1.GWRegisterWidget(ref wi);
            wi = (GalilWidgets.GalilWidget)gwDatRec2; gwComs1.GWRegisterWidget(ref wi);
            wi = (GalilWidgets.GalilWidget)gwPoll1; gwComs1.GWRegisterWidget(ref wi);
            wi = (GalilWidgets.GalilWidget)gwSettings1; gwComs1.GWRegisterWidget(ref wi);
            string gi      = GalilWidgets.LibraryPath.GclibDllPath_; gi = "C:\\Program Files (x86)\\Galil\\gclib\\dll\\x64\\gclib.dll";
            string xmlPath = "C:\\Users\\cbracamontes\\Downloads\\galilwidgets_15\\xml\\4000\\";

            gwPoll1.GWLoadFile(xmlPath + "GWPoll_Revised.xml");
            gwDatRec2.GWLoadFile(xmlPath + "GWDatRec_IO.xml"); //assuming #2 is upper right
            gwDatRec1.GWLoadFile(xmlPath + "GWDatRec_Axis_A_Revised.xml");
            gwSettings1.GWLoadFile(xmlPath + "GWSettings_Revised.xml");
            connected  = gwComs1.GWOpen("172.18.114.194"); //put the correct connection address here
            controller = new MotionController(gwComs1);
            profilometer.GetSerialPorts(cboBaudRate, cboPorts, cboDataBits, cboStopBits,
                                        cboParity, cboHandShaking, portsButtonClicked);
            cboBaudRate.Hide();
            cboDataBits.Hide();
            cboHandShaking.Hide();
            cboParity.Hide();
            cboPorts.Hide();
            cboStopBits.Hide();
            btnPorts.Hide();
            btnPortState.Hide();
            btnHello.Hide();
        }