title: Modbus RTU meter DDS024MR
body: <p>Last week I connected single-phase meter sdm120 to Raspberry pi. The code below worked find.</p>
  <p>However, when I try connecting to the DDS024MR meter now, it shows no communication at all. I tried changing ports, etc. What did I do wrong? please help me.</p>
  <pre class="lang-py prettyprint-override"><code>#!/usr/bin/env python3
  
  import time
  import minimalmodbus
  
  rs485 = minimalmodbus.Instrument('/dev/ttyUSB0', 1)
  rs485.serial.baudrate = 1800
  rs485.serial.bytesize = 8
  rs485.serial.parity = minimalmodbus.serial.PARITY_EVEN
  rs485.serial.stopbits = 1
  rs485.serial.timeout = 1
  rs485.debug = False
  rs485.mode = minimalmodbus.MODE_RTU
  print (rs485)
  
  Volts_A = rs485.read_float(0, functioncode=4, number_of_registers=4)
  #Volts_B = rs485.read_float(2, functioncode=4, number_of_registers=2)
  #Volts_C = rs485.read_float(4, `functioncode`=4, number_of_registers=2)
  #Current_A = rs485.read_float(8, functioncode=4, number_of_registers=2)
  #Current_B = rs485.read_float(0A, functioncode=10, number_of_registers=2)
  #Current_C = rs485.read_float(0C, functioncode=10, number_of_registers=2)
  #Active_PowerA = rs485.read_float(10, functioncode=10, number_of_registers=2)
  #Reactive_PowerA = rs485.read_float(1A, functioncode=10, number_of_registers=2)
  #Power_Factor = rs485.read_float(2A, functioncode=10, number_of_registers=2)
  #Frequency = rs485.read_float(36, functioncode=4, number_of_registers=4)
  #Total_Active_Energy = rs485.read_float(00, functioncode=10, number_of_registers=2)
  #Total_Reactive_Energy = rs485.read_float(00, functioncode=10, number_of_registers=2)
  
  print ('Voltage: {0:.1f} Volts'.format(Volts_A))
  #print ('Voltage: {0:.1f} Volts'.format(Volts_B))
  #print ('Voltage: {0:.1f} Volts'.format(Volts_C))
  #print ('Current: {0:.1f} Amps'.format(Current_A))
  #print ('Current: {0:.1f} Amps'.format(Current_B))
  #print ('Current: {0:.1f} Amps'.format(Current_C))
  #print ('Active power: {0:.1f} Watts'.format(Active_Power))
  #print ('Reactive power: {0:.1f} VAr'.format(Reactive_Power))
  #print ('Power factor: {0:.1f}'.format(Power_Factor))
  #print ('Frequency: {0:.1f} Hz'.format(Frequency))
  #print ('Total active energy: {0:.3f} kwh'.format(Total_Active_Energy))
  #print ('Total reactive energy: {0:.3f} kvarh'.format(Total_Reactive_Energy))
  #print ('Current Yield (V*A): {0:.1f} Watt'.format(Volts * Current))
  </code></pre>