ModbusType.Rtu question
my code var comPort = GetComPort(); //COM5 var slaveAddress = GetSlaveAddress(); //3 //var registerAddresses = GetRegisterAddresses();
var _utility = new ModbusUtility(ModbusType.Rtu, comPort, slaveAddress, 0, Endian.BigEndianLsb); await _utility.ConnectAsync();
while (true) { object[] receivedBytes = (await _utility.GetDatasAsync("4X 0", new KeyValuePair<Type, int>(typeof(ushort), 2))).Datas;
}
question receivedBytes is always null and I am sure I get this data by serialPort 10 00 00 00 02 04 04 80 00 00 F8 CF
What am i doing wrong?
I didn't working on this for a long time… did u fixed it?
There are no "4X 0” or "40000" in Modbus.