Connect with us

Python Rs232

Discussion in 'Microcontrollers, Programming and IoT' started by Rajinder, Dec 19, 2016.

Scroll to continue with content
  1. Rajinder


    Jan 30, 2016
    Hi all,
    I am using python to control a digital multimeter through rs232. I have mages to send the Meyer commands from real term, so I can read the I'd number, read the software version, measure current etc.
    This works fine.
    I want to expand this so I can read and measure from the Meyer nut use python.
    I want to save the results I.e. current measurements into a excel spreadsheet. I am using python v2.7
    My questions are
    1. I have to use pyserial is that correct
    2. How do I save results in excel
    3. Commands to the meter are for example *idn? (This returns the I'd value if the meter). How do I send this via python
    4. I want this to run from a gui, buttons to read I'd, button to measure current. I have no idea on this.
    I have a basic understanding of python but not an expert.
    I look forward to hearing from you.
    Best regards
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    1. That's one possibility, yes.
    2. Write data to a CSV file. This is a simple text format which can be imported into Excel rather easily.
    3. From pyserial use the write method.
    4. Get it running from the console first. Then find a framework you're comfortable with (e.g. tTinker) to write a GUI on top of the console program. A list of frameworks is here.

    This website shows how to use pyserial.
  3. Rajinder


    Jan 30, 2016
    Thanks. I have also cone across PyVisa, this I believe are a set of libraries for instrument control such as RS232, GBIP etc.
    Not sure if they have libraries for my multimeter.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day