Yeni: Yapay zekâ güvenlik duvarı tüm platformu izliyor ve her olayı sade bir dille açıklıyor. Nasıl çalıştığını görün

Reply To: Reading a panel meter over Modbus RTU: how do 43 66 99 9A become 230.6 V?

Then the 2 registers are one 32-bit float. Splitting your reply:

01          slave address
03          function (read holding registers)
04          byte count, 4 bytes follow
43 66 99 9A data: register 0 = 0x4366, register 1 = 0x999A
3A 1E       CRC

Put the four data bytes together as 0x4366999A and read them as an IEEE 754 float: sign 0, exponent gives 2^7 = 128, mantissa about 1.8016, and 128 x 1.8016 = 230.6. So Wilson’s 0x4366 is the first half of the float, which is why dividing never comes out right.

On the Uno the bytes arrive most significant first but the AVR is little endian, so reverse them before copying into a float:

uint8_t b[4] = { rx[6], rx[5], rx[4], rx[3] };   // 9A 99 66 43
float v;
memcpy(&v, b, 4);
Serial.print("{"l1.voltage":");
Serial.print(v, 1);
Serial.println("}");

Some meters send the two registers the other way round (word swapped). If you ever get something like 1.2e-23 instead of a voltage, swap rx[3..4] with rx[5..6]. Check the CRC before trusting a reply too.

Timestamps in UTC or it didn't happen.
Kabul edilen çözüm♥ 6