CalcKiwi
/Ingegneria e IT

Registri Modbus e IEEE 754

Decodifica 32 bit Float/Int, swap endianness (ABCD, CDAB, BADC, DCBA), offset PDU e CRC-16.

IEEE 754 Floating Point 32 bit & Registri

·····
0x
Dec: 17142 | Signed: 17142
0x
Dec: 59769 | Signed: -5767
0x
Dec: 0 | Signed: 0
0x
Dec: 0 | Signed: 0
Valori decodificati a 32 bit
IEEE 754 Float32
123.456001
Precisione singola (IEEE 754)
Signed Int32
1,123,477,881
Int16×2: 17142 / -5767
Unsigned UInt32
1,123,477,881
UInt16×2: 17142 / 59769
Esadecimale combinato a 32 bit
0x42F6E979
4 Bytes / 32 Bits
Rappresentazione binaria a 32 bit:
01000010 11110110 11101001 01111001
Interpretazione ASCII dei byte
B··y
Scomposizione campo bit IEEE 754
Segno (1 bit): 0 (+)
Esponente (8 bit): 133 (con bias 6)
Mantissa (23 bit): 0x76E979
Dettagli per registro
Reg1: 0x42F6 = 17142 / 17142 · 01000010 11110110
Reg2: 0xE979 = 59769 / -5767 · 11101001 01111001
Reg3: 0x0000 = 0 / 0 · 00000000 00000000
Reg4: 0x0000 = 0 / 0 · 00000000 00000000

Valori decodificati a 64 bit

Reg1–Reg4 · ABCD
IEEE 754 Float64
403072211746816
Doppia precisione (IEEE 754)
Signed Int64
4,825,300,756,674,379,776
−2⁶³ … 2⁶³−1
Unsigned UInt64
4,825,300,756,674,379,776
0 … 2⁶⁴−1
Hex a 64 bit combinato
0x42F6E97900000000
8 Bytes / 64 Bits
Rappresentazione binaria a 64 bit:
01000010 11110110 11101001 01111001 00000000 00000000 00000000 00000000

Codifica valore nei registri

Valore ingegneristico (raw × k + b)

Int32 × k + b
1123477881

Info su questo calcolatore

Decodifica registri Modbus: float IEEE 754, interi a 16/32/64 bit con ordini di byte ABCD/CDAB/BADC/DCBA, conversione degli indirizzi PLC, generatore di frame RTU con CRC-16 e parser di frame completo.

Domande frequenti

Che cos’è Modbus RTU?

Un protocollo seriale in cui un master legge e scrive registri sui dispositivi slave; ogni richiesta contiene ID slave, codice funzione, dati e CRC-16.

Perché il mio valore float è sbagliato?

Quasi sempre è l’ordine dei byte o delle word: prova CDAB (scambio di word, comune su Schneider/Modicon) o DCBA/BADC prima di dubitare dei dati.

Che cos’è un offset PDU?

L’indirizzo di protocollo che parte da 0; i produttori lo mostrano come indirizzi PLC in stile 40001, e questo strumento converte in entrambe le direzioni.