/// <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 { } }
/// <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); } }
/// <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); }
/// <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)); }