I have Problem with conversion 4 bytes to float value. I would like to read voltage.
As you can see in first 4 values I have:
67, 93, 135, 197
I think, that values 67 and 93 it's integer.
$recData = $modbus->readMultipleRegisters(1, 1, 6);
$Spannung1 = ($recData[3]<<24) + ($recData[2]<<16) +($recData[1]<<8) + $recData[0];
I don't know but value - $Spannung1 amount always other value for example one time -98098450 or 2092129347.
In reality voltage has 221V or 222V
please help