/// <summary> /// 关闭温控器,欧姆龙温控器会关闭IO /// </summary> /// <returns></returns> private bool StopController() { if (this.HeaterControllable is ThermostatOmron == false) { return(true); } if (this.Key == 0) { DO o = DOMgr.Instance.FindByName("胶枪加热1"); if (o == null) { return(false); } int result = o.Set(false); if (result != 0) { return(false); } } else if (this.Key == 1) { DO o = DOMgr.Instance.FindByName("胶枪加热2"); if (o == null) { return(false); } int result = o.Set(false); if (result != 0) { return(false); } } return(true); }
public static short Set(this DoType d, bool b) { DO o = DOMgr.Instance.FindBy((int)d); if (o == null) { return(-1); } return(o.Set(b)); }