<?php
function read_registers($modbus, $start, $count) {
$result = $modbus->readMultipleRegisters(1, $start, $count);
$registers = array();
for ($i = 0; $i < $count; $i++) {
$registers[] = $result[$i];
}
return $registers;
}
?>
Comments