readWriteRegisters(0, 12288, 6, 12288, $data, $dataTypes); if(!$recData) { // Print error information if any echo "
Error:
" . $modbus->errstr . "
"; } // Print status information echo "
Status:
" . $modbus->status . "
"; // Print read data echo "
Data:
"; print_r($recData); echo "
"; ?>