示例#1
0
 public void GetVoltage(DevicePort product, ref HardwareStructure.MyComputer _data, int which)
 {
     try
     {
         MyProtocolBytesTransfer.SetReadBytes(this._setReadBytes, 132, 0);
         MySerialPortProcess.ReadWriteCommand(this._setReadBytes, product, this._readReply);
         _data.get_GridFanHub()[which].set_DCVoltage(MyProtocolBytesTransfer.SetReplyVoltageCurrentBytes(this._readReply));
     }
     catch
     {
     }
 }
示例#2
0
 public void GetAllRPM(DevicePort product, ref HardwareStructure.MyComputer _data, int which)
 {
     try
     {
         for (int i = 1; i < 7; i++)
         {
             MyProtocolBytesTransfer.SetReadBytes(this._setReadBytes, 138, (byte)i);
             MySerialPortProcess.ReadWriteCommand(this._setReadBytes, product, this._readReply);
             _data.get_GridFanHub()[which].get_RPM()[i] = MyProtocolBytesTransfer.SetReplyRpmBytes(this._readReply);
         }
     }
     catch
     {
     }
 }
示例#3
0
 public void GetAllCurrent(DevicePort product, ref HardwareStructure.MyComputer _data, int which)
 {
     try
     {
         _data.get_GridFanHub()[which].get_DCAmpere()[0] = 0.0;
         for (int i = 1; i < 7; i++)
         {
             MyProtocolBytesTransfer.SetReadBytes(this._setReadBytes, 133, (byte)i);
             MySerialPortProcess.ReadWriteCommand(this._setReadBytes, product, this._readReply);
             _data.get_GridFanHub()[which].get_DCAmpere()[i]  = MyProtocolBytesTransfer.SetReplyVoltageCurrentBytes(this._readReply);
             _data.get_GridFanHub()[which].get_DCAmpere()[0] += _data.get_GridFanHub()[which].get_DCAmpere()[i];
         }
     }
     catch
     {
     }
 }
示例#4
0
 public void SetGridPlusVoltageByChannel(DevicePort product, double voltage, int channel)
 {
     MyProtocolBytesTransfer.SetWriteVoltageCurrentBytes(this._setWriteBytes, 68, (byte)channel, voltage);
     MySerialPortProcess.ReadWriteCommand(this._setWriteBytes, product, this._writeReply);
 }