tp4000zc digital multimeter python module

Python module for reading from the serial interface on the TekPower TP4000ZC multimeter and probably many others (supposedly this is the same as the VC820 module in QtDMM). This provides a very easy way to write software to take readings off the meter (and just running it will provide useful data).

This module requires the PySerial module.

Download or view tp4000zc.py

Example Code:

    # load the module
    import tp4000zc
    
    # the port that we're going to use.  This can be a number or device name.
    # on linux or posix systems this will look like /dev/tty2 or /dev/ttyUSB0
    # on windows this will look something like COM3
    port = '/dev/ttyUSB0'

    # get an instance of the class
    dmm = tp4000zc.Dmm(port)

    # read a value
    val = dmm.read()
    
    print val.text       # print the text representation of the value
                         # something like: -4.9 millivolts DC
    print val.numericVal # and the numeric value
                         # ie: -0.0048

    # recycle the serial port
    dmm.close()
    

The module itself has full documentation. The protocol is described in the module but is taken from this image.