Python Rs232

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
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
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
14,273
Joined
Nov 17, 2011
Messages
14,273
  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.
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
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.
 
Top