title: Retrieving pyModbus Data into a list
body: <p>I'm using pymodbus to read the data from my equipment.</p>
  
  <p>Here's the code I use and it works!</p>
  
  <pre><code>import pymodbus
  import serial
  from pymodbus.pdu import ModbusRequest
  from pymodbus.client.sync import ModbusSerialClient as ModbusClient     #initialize a serial RTU client instance
  from pymodbus.transaction import ModbusRtuFramer
  
  import logging
  logging.basicConfig()
  log = logging.getLogger()
  log.setLevel(logging.DEBUG)
  
  #count= the number of registers to read
  #unit= the slave unit this request is targeting
  #address= the starting address to read from
  
  client= ModbusClient(method = "rtu", port="/dev/ttyUSB0",stopbits = 1, bytesize = 8, parity = 'N', baudrate= 9600)
  
  #Connect to the serial modbus server
  connection = client.connect()
  #print connection
  
  #Starting add, num of reg to read, slave unit.
  result= client.read_input_registers(0x00,10,unit= 0x01).registers
  
  print(result)
  
  #Closes the underlying socket connection
  client.close()
  </code></pre>
  
  <p>And result:</p>
  
  <pre><code>pi@raspberrypi:~ $ python pyserial2.py
  DEBUG:pymodbus.transaction:Current transaction state - IDLE
  DEBUG:pymodbus.transaction:Running transaction 1
  DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0x0 0x0 0xa 0x70 0xd
  DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
  DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
  DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
  DEBUG:pymodbus.transaction:RECV: 0x1 0x4 0x14 0x1 0x52 0x3 0x12 0x0 0xfa 0x3 0x20 0x0 0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x0 0x1 0xab 0xd6
  DEBUG:pymodbus.framer.rtu_framer:Getting Frame - 0x4 0x14 0x1 0x52 0x3 0x12 0x0 0xfa 0x3 0x20 0x0 0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x0 0x1
  DEBUG:pymodbus.factory:Factory Response[ReadInputRegistersResponse: 4]
  DEBUG:pymodbus.framer.rtu_framer:Frame advanced, resetting header!!
  DEBUG:pymodbus.transaction:Adding transaction 1
  DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
  [338, 786, 250, 800, 0, 65535, 65535, 65535, 65535, 1]
  </code></pre>
  
  <p>The result showed with ".registers".
  But I don't know how to make the value into a list.</p>