public void readerSingnal(string ip, string adr) { var m_FanucRobotDevice = new FanucRobotModbus(ip); var ret = m_FanucRobotDevice.Read(new FanucRobotDataConfig() { DataType = FanucRobotDataTypeEnum.DO, DataAdr = adr }); Clients.Client(Context.ConnectionId).getSignalrRes(ret); }
/// <summary> /// 获得订单允许下发信号状态 /// </summary> /// <param name="allow">false→true 上升沿时下发订单; 其他:等待</param> /// <returns>true:读取正常; false:读取异常</returns> public bool GetOrderAllow(ref bool allow) { var ret = m_FanucRobotDevice.Read(m_OrderAllowConfig); if (ret.IsSuccess == false) { return(false); } bool temp = false; var pret = bool.TryParse(ret.Content, out temp); if (pret == false) { return(false); } allow = temp; return(true); }
/// <summary> /// 获得原料输入请求 /// </summary> /// <param name="raw_in">false→true:请求生效</param> /// <returns>true:读取正常; false:读取异常</returns> public bool GetRawInRequireState(ref bool raw_in) { var ret = m_FanucRobotDevice.Read(m_RawInRequireStateConfig); if (ret.IsSuccess == false) { return(false); } bool temp = false; var pret = bool.TryParse(ret.Content, out temp); if (pret == false) { return(false); } raw_in = temp; return(true); }