예제 #1
0
        /// <summary>
        /// 启动老化
        /// </summary>
        /// <param name="startAddr"></param>
        /// <param name="status"></param>
        public bool SetRun(int addr, CwRunPara para, out string er)
        {
            er = string.Empty;

            try
            {
                if (!_Mon.ContainsKey(addr))
                {
                    er = "控制板地址[" + addr.ToString("D2") + "不存在";
                    return(false);
                }

                _Mon[addr].Para.RunPara = para.Clone();


                _Mon[addr].Para.RUN_OP = EOP.写入;

                return(true);
            }
            catch (Exception ex)
            {
                er = ex.ToString();
                return(false);
            }
            finally
            {
            }
        }
예제 #2
0
파일: CMON32.cs 프로젝트: GJSoftware/Tool
 /// <summary>
 /// 启动老化测试
 /// </summary>
 /// <param name="wAddr"></param>
 /// <param name="wPara"></param>
 /// <param name="er"></param>
 /// <returns></returns>
 public bool SetRunStart(int wAddr, CwRunPara wPara, out string er)
 {
     er = string.Empty;
     try
     {
         string wCmd  = string.Empty;
         string rData = string.Empty;
         string rVal  = string.Empty;
         wCmd += wPara.runTolTime.ToString("X4");
         wCmd += wPara.secMinCnt.ToString("X2");
         wCmd += wPara.runTypeFlag.ToString("X2");
         wCmd += wPara.startFlag.ToString("X2");
         wCmd += wPara.onoff_RunTime.ToString("X4");
         wCmd += wPara.onoff_YXDH.ToString("X2");
         wCmd += wPara.onoff_Cnt.ToString("X2");
         wCmd += wPara.onoff_Flag.ToString("X2");
         wCmd  = chkSOIEOI(wCmd);
         wCmd  = wAddr.ToString("X2") + "01" + "06" + "0E" + wCmd;
         wCmd  = SOI + wCmd + CalCheckSum(wCmd) + EOI;
         int rLen = 0;
         if (!com.send(wCmd, rLen, out rData, out er, _TimeOut))
         {
             return(false);
         }
         return(true);
     }
     catch (Exception e)
     {
         er = e.ToString();
         return(false);
     }
 }
예제 #3
0
        /// <summary>
        /// 复制
        /// </summary>
        /// <returns></returns>
        public CwRunPara Clone()
        {
            CwRunPara para = new CwRunPara();

            para.runTolTime    = this.runTolTime;
            para.secMinCnt     = this.secMinCnt;
            para.runTypeFlag   = this.runTypeFlag;
            para.startFlag     = this.startFlag;
            para.onoff_RunTime = this.onoff_RunTime;
            para.onoff_YXDH    = this.onoff_YXDH;
            para.onoff_Cnt     = this.onoff_Cnt;
            para.onoff_Flag    = this.onoff_Flag;
            return(para);
        }
예제 #4
0
파일: CMONCom.cs 프로젝트: GJSoftware/Tool
 /// <summary>
 /// 启动老化测试
 /// </summary>
 /// <param name="wAddr"></param>
 /// <param name="wPara"></param>
 /// <param name="er"></param>
 /// <returns></returns>
 public bool SetRunStart(int wAddr, CwRunPara wPara, out string er)
 {
     return(_devMon.SetRunStart(wAddr, wPara, out er));
 }