code: public Register[] readMultipleRegisters(int unitId, int ref, int count) throws ModbusException {
          checkTransaction();
          if (readMultipleRegistersRequest == null) {
              readMultipleRegistersRequest = new ReadMultipleRegistersRequest();
          }
          readMultipleRegistersRequest.setUnitID(unitId);
          readMultipleRegistersRequest.setReference(ref);
          readMultipleRegistersRequest.setWordCount(count);
          transaction.setRequest(readMultipleRegistersRequest);
          transaction.execute();
          return ((ReadMultipleRegistersResponse) getAndCheckResponse()).getRegisters();
      }
docs: Reads a given number of registers from the slave.
  
  Note that the number of registers returned (i.e. array length)
  will be according to the number received in the slave response.
  
  @param unitId the slave unit id.
  @param ref    the offset of the register to start reading from.
  @param count  the number of registers to be read.
  
  @return a <tt>Register[]</tt> holding the received registers.
  
  @throws ModbusException if an I/O error, a slave exception or
  a transaction error occurs.