Example #1
0
 //设置循环泵压差设定
 public static byte[] Set_cycpumpvalue(byte address, xd100x.cycpumpvalue cv)
 {
     byte[] t1     = BitConverter.GetBytes(cv._pressure);
     byte[] t2     = BitConverter.GetBytes(0f);
     byte[] buffer = { 0, t1[0], t1[1], t1[2], t1[3], t2[0], t2[1], t2[2], t2[3] };
     return(DataInfo.SetData(address, 0x41, buffer));
 }
Example #2
0
 //解析压差设定
 public static xd100x.cycpumpvalue Read_cycpumpvalue(byte[] inByte)
 {
     xd100x.cycpumpvalue cv = new xd100x.cycpumpvalue();
     cv._pressure = (float)Math.Round(DataInfo.GetLongValue2(inByte, 3) / 100.0, 2);;
     return(cv);
 }
Example #3
0
 //设置压差设定
 public static byte[] Set_cycpumpvalue(byte address, xd100x.cycpumpvalue cv)
 {
     int[] buffer = { Convert.ToInt16(cv._pressure * 100) };
     return(DataInfo.ModbusSetData(address, 0x10, 159, buffer));
 }
Example #4
0
 //解析循环泵压差设定
 public static xd100x.cycpumpvalue Read_cycpumpvalue(byte[] inByte)
 {
     xd100x.cycpumpvalue cv = new xd100x.cycpumpvalue();
     cv._pressure = DataInfo.GetFloatValue(inByte, 8);
     return(cv);
 }