How to read RS232 Data in Real Time on PC?

Don't see a specific place for your hardware question? This is the forum for you!

Moderators: mac_h8r1, Nemesis

How to read RS232 Data in Real Time on PC?

Postposted on Thu Mar 06, 2014 2:15 pm

I am using an instrument which sends a signal to a printer which continuously prints - exactly like an old school seismometer. This instrument was built in the 90s and has an RS232 output on the back. I do not have software, or documentation, but I would like to output the signal straight to a computer rather than the printer. Can I buy an RS232 to usb adapter and use some program to do this?

Any help would be hugely appreciated! Thanks
e4300 @ 3.0 ghz \ eVGA 8800 GT \ 4 gig
Gilligan
Gerbil Elite
 
Posts: 534
Joined: Fri Mar 07, 2003 5:06 pm

Re: How to read RS232 Data in Real Time on PC?

Postposted on Thu Mar 06, 2014 2:21 pm

Is your computer a laptop or a desktop? If it's a desktop, it may have a com header where all you need is a dongle and you can get native rs232. Not only would a dongle be cheaper, I've never had a good usb to serial adapter.
Ari Atari
Gerbil First Class
 
Posts: 110
Joined: Wed Jan 26, 2011 3:00 pm
Location: Earth

Re: How to read RS232 Data in Real Time on PC?

Postposted on Thu Mar 06, 2014 2:39 pm

Laptop without an Serial port. I was hoping of using one of those usb to serial adapters, and then ask you guys for a good program suggestion.

I just bought a Rasberry Pi for something else, would that work well perhaps?

Will
e4300 @ 3.0 ghz \ eVGA 8800 GT \ 4 gig
Gilligan
Gerbil Elite
 
Posts: 534
Joined: Fri Mar 07, 2003 5:06 pm

Re: How to read RS232 Data in Real Time on PC?

Postposted on Thu Mar 06, 2014 2:56 pm

If you've got a PC Card or ExpressCard slot you will get the best results from a "native" serial adapter. StarTech sells one that's expensive but our telecoms guy swears by it. Failing that FTDI makes the best USB->serial chips, you won't go far wrong if you get one with an FTDI chip inside.

http://www.usconverters.com/index.php?m ... page&id=62
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3131
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: How to read RS232 Data in Real Time on PC?

Postposted on Thu Mar 06, 2014 3:06 pm

FTDI does make the best adapter chips. I swear buy them. Go to digikey or mouser and look for some RS232 connectors there. Also, look into Realterm for initial starting and basic tasks if you are on a windows system. I use both of them at work all the time.
To Start Press Any Key'. Where's the ANY key?
If something's hard to do, then it's not worth doing
You know, boys, a nuclear reactor is a lot like a woman. You just have to read the manual and press the right buttons.
mmmmmdonuts21
Gerbil Elite
 
Posts: 590
Joined: Wed Jul 16, 2008 9:09 am

Re: How to read RS232 Data in Real Time on PC?

Postposted on Thu Mar 06, 2014 3:08 pm

You'll need an RS232 to USB adapter as everyone is mentioning.

For software, I did this once in Excel actually, if you know or are willing to learn a little VBA it's not too hard since there's a built-in serial port reader component. This was for an electronic scale we had that measured weight to several more digits than the display would allow. Excel has the added benefit of being able to graph/visualize the data in realtime as the VBA serial reader populates the spreadsheet.
Duct Tape Dude
Gerbil First Class
Gold subscriber
 
 
Posts: 116
Joined: Thu May 02, 2013 12:37 pm

Re: How to read RS232 Data in Real Time on PC?

Postposted on Thu Mar 06, 2014 4:24 pm

If you want to use the RPi
http://www.raspberrypi.org/phpBB3/viewt ... ?f=7&t=854

search on the Pi forums or ask a question.
Arvald
Gerbil XP
Silver subscriber
 
 
Posts: 336
Joined: Tue Sep 27, 2011 12:14 pm
Location: Gerbil-land, Canada

Re: How to read RS232 Data in Real Time on PC?

Postposted on Thu Mar 06, 2014 5:29 pm

Duct Tape Dude wrote:You'll need an RS232 to USB adapter as everyone is mentioning.

For software, I did this once in Excel actually, if you know or are willing to learn a little VBA it's not too hard since there's a built-in serial port reader component. This was for an electronic scale we had that measured weight to several more digits than the display would allow. Excel has the added benefit of being able to graph/visualize the data in realtime as the VBA serial reader populates the spreadsheet.


anymore info on this? i have a radioshack usb scale that i was wondering if i could do the same thing...i.e. read more digits. thanks!
ryko
Gerbil Team Leader
 
Posts: 231
Joined: Tue Feb 27, 2007 3:58 pm
Location: new york

Re: How to read RS232 Data in Real Time on PC?

Postposted on Fri Mar 07, 2014 8:56 am

ryko wrote:anymore info on this? i have a radioshack usb scale that i was wondering if i could do the same thing...i.e. read more digits. thanks!


If it's USB, I doubt you can just read the values using the built-in serial port reader control that VBA/.NET has. I looked up a RadioShack USB scale and it seems like it uses a proprietary interface/UI, so it sounds like you'll need more hackery to get the data from it. I could be wrong. But given that it's USB, you're looking at a different solution than OP/me. Sorry.
Duct Tape Dude
Gerbil First Class
Gold subscriber
 
 
Posts: 116
Joined: Thu May 02, 2013 12:37 pm

Re: How to read RS232 Data in Real Time on PC?

Postposted on Tue Mar 11, 2014 1:18 am

(I wrote a LONG reply to this and then it got unceremonially killed because it contained a URL. Great. :( )

Long story short:
- Use a FDTI RS232 to USB cable
- Run a RS232 to TCP/IP bridge server on your computer (see the examples directory of the pyserial Python library.)
- Write a data processing/gathering program that talks to the TCP/IP bridge instead of speaking RS232 directly.

This has a lot of advantage:
- much more code available that does TCP/IP
- you can run the bridge on your desktop but access the data over your network on your laptop etc
- the bridge software takes care of buffering and makes sure that no characters get dropped (the FIFOs in UARTs are extremely shallow and even a fast PC will sometimes drop characters for now good reason.)
MathMan
Gerbil In Training
Gold subscriber
 
 
Posts: 1
Joined: Mon Nov 10, 2008 11:34 am
Location: Sunnyvale, CA

Re: How to read RS232 Data in Real Time on PC?

Postposted on Tue Mar 11, 2014 1:39 am

At work I use Tera Term and a USB to serial adapter, but the baud rate and data format are known so that may not help you.
NovusBogus
Gerbil XP
 
Posts: 492
Joined: Sun Jan 06, 2013 12:37 am


Return to General Hardware

Who is online

Users browsing this forum: AdsBot [Google] and 4 guests