示例#1
0
        //读取快照值
        #region 读取实时数据库标签的当前值(快照值、即时值):public List<PValue> GetActValues(string[] tagnames)
        /// <summary>
        /// 读取数据库标签的当前值(快照值、即时值)
        /// </summary>
        /// <returns>当前值PValue</returns>
        public List <PValue> GetRawValues(string[] tagnames)
        {
            List <PValue> pvalues = new List <PValue>();

            rtdbHelper.Logon();
            pvalues = rtdbHelper.GetActValues(tagnames);
            rtdbHelper.Logoff();        //golden3.0采用连接池,每次使用完毕,使用logoff释放连接资源
            return(pvalues);
        }
示例#2
0
        //读取快照值
        #region 读取实时数据库标签的当前值(快照值、即时值):public List<PValue> GetActValues(string[] tagnames)
        /// <summary>
        /// 读取数据库标签的当前值(快照值、即时值)
        /// </summary>
        /// <returns>当前值PValue</returns>
        public List <PValue> GetRawValues(string[] tagnames)
        {
            List <PValue> pvalues = new List <PValue>();

            //System.Windows.Forms.MessageBox.Show(rtdbHelper.isLogOn.ToString());
            if (rtdbHelper.isLogOn == false)
            {
                rtdbHelper.Logon();
            }
            //System.Windows.Forms.MessageBox.Show(rtdbHelper.isLogOn.ToString());
            pvalues = rtdbHelper.GetActValues(tagnames);
            //rtdbHelper.Logoff();        //在PGIMSpecial下,使用长连接
            return(pvalues);
        }