示例#1
0
        public CChroma19020_4(int idNo = 0, string name = "Chroma19020")
        {
            this._idNo = idNo;
            this._name = name;
            com        = new CSerialPort(_idNo, _name, EDataType.ASCII格式);

            C_HPCode = new Dictionary <int, string>();
            C_HPCode.Add(112, "STOP");
            C_HPCode.Add(115, "TESTING");
            C_HPCode.Add(116, "PASS");
            C_HPCode.Add(33, "HIGH FAIL");
            C_HPCode.Add(49, "HIGH FAIL");
            C_HPCode.Add(65, "HIGH FAIL");
            C_HPCode.Add(34, "LOW FAIL");
            C_HPCode.Add(50, "LOW FAIL");
            C_HPCode.Add(66, "LOW FAIL");
            C_HPCode.Add(35, "ARC FAIL");
            C_HPCode.Add(51, "ARC FAIL");
            C_HPCode.Add(36, "OCP");
            C_HPCode.Add(52, "OCP");
            C_HPCode.Add(68, "OCP");
            C_HPCode.Add(100, "OCP");
            C_HPCode.Add(97, "SHORT FAIL");
            C_HPCode.Add(98, "OPEN FAIL");
        }
示例#2
0
文件: CAPF.cs 项目: GJSoftware/Tool
        /// <summary>
        /// 打开串口
        /// </summary>
        /// <param name="comName">115200,n,8,1</param>
        /// <param name="er"></param>
        /// <returns></returns>
        public bool Open(string comName, out string er, string setting = "57600,n,8,1")
        {
            er = string.Empty;

            try
            {
                if (com != null)
                {
                    com.close();
                    com = null;
                }

                com = new CSerialPort(idNo, name, EDataType.HEX格式);

                if (!com.open(comName, out er, setting))
                {
                    return(false);
                }

                _conStatus = true;

                return(true);
            }
            catch (Exception ex)
            {
                er = ex.ToString();
                return(false);
            }
        }
示例#3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="idNo"></param>
 /// <param name="name"></param>
 /// <param name="chanNum"></param>
 /// <param name="path"></param>
 public CExtech7440(int idNo = 0, string name = "CExtech7400")
 {
     this._idNo     = idNo;
     this._name     = name;
     this._failStop = "0";
     com            = new CSerialPort();
 }
示例#4
0
        public CChroma19032(int idNo, string name)
        {
            this._idNo = idNo;

            this._name = name;

            com = new CSerialPort(_idNo, _name, EDataType.ASCII格式);


            C_HPCode = new Dictionary <int, string>();
            C_HPCode.Add(112, "STOP");
            C_HPCode.Add(113, "USER STOP");
            C_HPCode.Add(114, "NO TEST");
            C_HPCode.Add(115, "TESTING");
            C_HPCode.Add(116, "PASS");
            C_HPCode.Add(17, "GB HIGH"); //GB
            C_HPCode.Add(33, "AC HIGH"); //AC
            C_HPCode.Add(49, "DC HIGH"); //DC
            C_HPCode.Add(65, "IR HIGH"); //IR
            C_HPCode.Add(18, "GB LOW");
            C_HPCode.Add(34, "AC LOW");
            C_HPCode.Add(50, "DC LOW");
            C_HPCode.Add(66, "IR LOW");
            C_HPCode.Add(35, "AC ARC");
            C_HPCode.Add(51, "DC ARC");
            C_HPCode.Add(36, "AC OCP");
            C_HPCode.Add(52, "DC OCP");
            C_HPCode.Add(68, "IR OCP");
            C_HPCode.Add(100, "OSC OCP");
            C_HPCode.Add(97, "SHORT FAIL");
            C_HPCode.Add(98, "OPEN FAIL");
            com = new COM.CSerialPort();
        }
示例#5
0
文件: CAPF.cs 项目: GJSoftware/Tool
 /// <summary>
 /// 关闭串口
 /// </summary>
 public void Close()
 {
     if (com == null)
     {
         return;
     }
     com.close();
     com        = null;
     _conStatus = false;
 }
示例#6
0
 /// <summary>
 /// 关闭串口
 /// </summary>
 public void Close()
 {
     try
     {
         if (com == null)
         {
             return;
         }
         com.close();
         com        = null;
         _conStatus = false;
     }
     catch (Exception)
     {
     }
 }
示例#7
0
 public CTH9010(int idNo = 0, string name = "TH9010")
 {
     this._idNo = idNo;
     this._name = name;
     com        = new CSerialPort(_idNo, _name, EDataType.ASCII格式);
 }
示例#8
0
 public COmron_COM(int idNo = 0, string name = "Omron_COM")
 {
     this._idNo = idNo;
     this._name = name;
     com        = new CSerialPort(_idNo, _name, EDataType.HEX格式);
 }