//解析流量限定 public static xd100x.valvelimit Read_valvelimit(byte[] inByte) { xd100x.valvelimit vl = new xd100x.valvelimit(); vl._enable = DataInfo.GetLongValue2(inByte, 3); vl._limit = DataInfo.GetLongValue2(inByte, 5); return(vl); }
//设置调节阀流量限定 public static byte[] Set_valvelimit(byte address, xd100x.valvelimit vl) { int[] buffer = { vl._enable, vl._limit }; return(DataInfo.ModbusSetData(address, 0x10, 153, buffer)); }
//设置调节阀流量限定 public static byte[] Set_valvelimit(byte address, xd100x.valvelimit vl) { byte[] buffer = { Convert.ToByte(vl._enable), Convert.ToByte(vl._limit) }; return(buffer); }