master
CZ 3 months ago
parent 4f6c558b66
commit a9fc83e172

@ -23,13 +23,13 @@ public class FireClient: ModbusTcpMaster
{
bool resul = Connected;
var bytes01 = master.Read("x=3;1", 80).Content;
var bytes02 = master.Read("x=3;1", 80).Content;
var bytes02 = master.Read("x=3;32768", 80).Content;
if (bytes01 != null)
{
FireMgr.DataValidityTime = DateTime.Now;
ModbusDecoder.Decode<FireMsg>(bytes02, FireMgr.FireMsg, EndingConst.ByteSeq.AB,
ModbusDecoder.Decode<FireMsg>(bytes01, FireMgr.FireMsg, EndingConst.ByteSeq.AB,
EndingConst.WordSeq.DC);
}
@ -37,8 +37,8 @@ public class FireClient: ModbusTcpMaster
{
FireMgr.DataValidityTime = DateTime.Now;
//ModbusDecoder.Decode<UpsRemoteComm>(bytes02, UpsMgr.UpsRemoteComm, EndingConst.ByteSeq.AB,
// EndingConst.WordSeq.DC);
ModbusDecoder.Decode<FaultMsg>(bytes02, FireMgr.FaultMsg, EndingConst.ByteSeq.AB,
EndingConst.WordSeq.DC);
}
}
}
Loading…
Cancel
Save