Exemplo n.º 1
0
        public bool RStageConnect(string port)
        {
            try
            {
                connect = (MessageBasedSession)ResourceManager.GetLocalManager().Open("COM" + port);
                connect.SetAttributeInt32(NationalInstruments.VisaNS.AttributeType.AsrlBaud, 38400);
                connect.Timeout = 1000;
                Thread.Sleep(100);

                //connect = new SerialCom();
                //connect.OpenSession( port );
                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                return(false);
            }
        }