private string ReadFeedrateHandle(ref ushort flib, string para) { string message = null; var res = new ReadFeedrateResultModel(); var ret = new FeedrateHelper().ReadFeedrate(flib, ref res); if (ret.Item1 == -16) { var ret_conn = ConnectHelper.BuildConnect(ref flib, m_ip, m_port, m_timeout); if (ret_conn == 0) { ret = new FeedrateHelper().ReadFeedrate(flib, ref res); } } if (ret.Item1 != 0) { message = ret.Item2; } GetResultEvent?.Invoke(new BaseCNCResultModel <ReadFeedrateResultModel>() { Value = new List <ReadFeedrateResultModel>() { res }, Id = para }); return(message); }
public Tuple <short, string> ReadFeedrate(ushort flib, ref ReadFeedrateResultModel data) { Focas1.ODBACT buf = new Focas1.ODBACT(); var ret = Focas1.cnc_actf(flib, buf); if (ret == 0) { data.Value = buf.data; return(new Tuple <short, string>(0, null)); } else { return(new Tuple <short, string>(ret, $"读取进给F信息错误,返回:{ret}")); } }