Exemplo n.º 1
0
        private void btnConc_Click(object sender, EventArgs e)
        {
            string ip      = txtIp.Text;
            string port    = txtPort.Text;
            string timeout = txtTimeOut.Text;
            int    ret     = Fanuc.cnc_allclibhndl3(ip, Convert.ToUInt16(port), Convert.ToInt32(timeout), out Fanuc.h);

            if (ret == Fanuc.EW_OK)
            {
                MessageBox.Show("连接成功!");
            }
            else
            {
                MessageBox.Show(ret + "");
            }
        }