Python Rs232

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

  1. Rajinder

    Rajinder

    Joined:
    Jan 30, 2016
    Messages:
    150
    Likes Received:
    1
    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
    Raj
     
    Rajinder, Dec 19, 2016
    #1
    1. Advertisements

  2. Rajinder

    Harald Kapp Moderator Moderator

    Joined:
    Nov 17, 2011
    Messages:
    7,196
    Likes Received:
    1,188
    Location:
    Germany-Europe-Earth-Sol System-Milky Way-Laniakea
    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.
     
    Harald Kapp, Dec 20, 2016
    #2
    1. Advertisements

  3. Rajinder

    Rajinder

    Joined:
    Jan 30, 2016
    Messages:
    150
    Likes Received:
    1
    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.
     
    Rajinder, Dec 20, 2016
    #3
    1. Advertisements

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.
Similar Threads
  1. amnw14545

    RS485 -> RS232 -> V34 -> RS232 -> RS485

    amnw14545, Nov 11, 2005, in forum: Electronic Design
    Replies:
    9
    Views:
    1,516
    amnw14545
    Nov 14, 2005
  2. Torsten Bronger

    ANN: PyVISA 1.0 -- GPIB, USB, RS232 instrument control with Python

    Torsten Bronger, Jan 24, 2006, in forum: Electronic Equipment
    Replies:
    0
    Views:
    890
    Torsten Bronger
    Jan 24, 2006
  3. Martin Griffith

    Matlab> Python

    Martin Griffith, May 13, 2008, in forum: Electronic Design
    Replies:
    6
    Views:
    681
    Martin Griffith
    May 17, 2008
  4. Lisa

    Python 1500hf remote programming? TIA

    Lisa, Mar 26, 2007, in forum: Security Alarms
    Replies:
    0
    Views:
    935
  5. chopnhack

    Question on use of Python language

    chopnhack, Jan 12, 2015, in forum: Microcontrollers and Programming
    Replies:
    12
    Views:
    935
    chopnhack
    Jan 13, 2015
  6. chopnhack

    Python programming course help

    chopnhack, Jan 21, 2015, in forum: Electronics Homework Help
    Replies:
    24
    Views:
    2,129
    KrisBlueNZ
    Jan 28, 2015
  7. chopnhack

    Incrementing Slice in Python?

    chopnhack, Feb 8, 2015, in forum: Electronics Homework Help
    Replies:
    7
    Views:
    636
    chopnhack
    Feb 13, 2015
  8. frazelle09

    Need help with some python debugging

    frazelle09, Feb 4, 2016, in forum: Microcontrollers and Programming
    Replies:
    4
    Views:
    278
    Harald Kapp
    Feb 11, 2016
Loading...