Using Raspberry Pi for collecting measurements from a multimeter

Keysight U1401B is a process calibrator and multimeter in one device. It can source currents ±25 mA and voltages till ±15 V. And at the same time measure as a multimeter. We can use also Escort 2030 with the same behavior. See device description.

We want to follow measured values of voltage an current also on display of a notebook. It is possible, however, also evaluate the data and make some decisions, or write them in a file.

Communication schema used in this application

U1401B              U5481B           Raspberry Pi 2B                        Notebook
IR <---------------infrared-------------->USB 1          USB                  Win 8
multimeter        serial-USB              USB 2<--- >WiFi dongle   ((()))     Wifi
calibrator      cable adapter        Raspbian, SSH       <->                  PuTTY (+WinSCP)
SCPI commands        <->             SCPI, Python                        display, keyboard

U1401B returns lines ended with CRLF ('\r\n') (hex:0D,0A). Therefore reading with readline().
Rpi measure arrangement                   (  (  (   )  )  )                   Rpi measure arrangement

Python2 display output current & input voltage in given intervals

# read voltage and gives also current
# used SCPI commands: CONF?, READ?, CURR?.
import serial
import time
dmm=serial.Serial(port='/dev/ttyUSB0', baudrate=9600, bytesize=7,
except Exception as e:
    print ('problem opening port: ' + str(e))
print ("--------------------------------------------------")
print ('dm1: read voltage and gives also current')
conf = dmm.readline()
print ('Configuration: ' + conf[:-2])
print ("--------------------------------------------------")
sec = input('time interval between meas.(sec): ')
while True:
  data1 = dmm.readline()
  n1 = str(round(float(data1),5))
  print 'inp: ' + n1 + ' V',
  data2 = dmm.readline()
  n2 = str(round(float(data2)*1000,5))
  print ('   out: ' + n2 + ' mA')