Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How can i read from RS232 using a macro (VB)?

i would like to write a macro (Excel) in vb that would enable me to read from
rs232 port, but i don't know how to do it. can anyone help me please.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default How can i read from RS232 using a macro (VB)?


"Freds" wrote in message
...
i would like to write a macro (Excel) in vb that would enable me to read

from
rs232 port, but i don't know how to do it. can anyone help me please.


You need an add-in to to this:
http://www.windmill.co.uk/rs232.html
http://www.ozgrid.com/Services/excel-COM-RS232C.htm

/Fredrik


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How can i read from RS232 using a macro (VB)?

the first one says it is free, the second is $59 or $59.85 (it says both. )

You also might look at the mscomm control. Seach this newsgroup for mscomm

--
Regards,
Tom Ogilvy


"Fredrik Wahlgren" wrote in message
...

"Freds" wrote in message
...
i would like to write a macro (Excel) in vb that would enable me to read

from
rs232 port, but i don't know how to do it. can anyone help me please.


You need an add-in to to this:
http://www.windmill.co.uk/rs232.html
http://www.ozgrid.com/Services/excel-COM-RS232C.htm

/Fredrik




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can i read from RS232 using a macro (VB)?

You might also try the "rsapi.dll" which was coded by H.-J. Berndt
) for the book "Measurement and control using Word &
Excel - VBA macros for the serial interface".

http://home.t-online.de/home/H.Kainka/rsapidll.zip

The zip file contains the rsapi.dll for 16- and 32-bit windows systems from
the book:

"H.-J. Berndt / B. Kainka
Messen, Steuern und Regeln mit Word und Excel
VBA-Makros f?r die serielle Schnittstelle, 2., neubearb. und erw. Aufl.
Franzis-Verlag GmbH, 85586 Poing, 1999 ISBN 3-7723-4093-8"

You probably also need the updated dll which fixes some issues under
windows 2000 and xp: http://www.hjberndt.de/soft/rsapitest.zip

Example usage:

Declare Function OPENCOM Lib "RSAPI.DLL" (ByVal Parameter$) As Integer
Declare Sub CLOSECOM Lib "RSAPI.DLL" ()
Declare Function READBYTE Lib "RSAPI.DLL" () As Integer

Sub Main()
OPENCOM ("COM2,19200,N,8,2")
x = READBYTE
CLOSECOM
End Sub

For the serial interface the DLL has the following functions:

OPENCOM - open serial interface
CLOSECOM - close serial interface
SENDBYTE - submit a single byte
READBYTE - read a single byte
SENDSTRING - send a string of bytes
READSTRING - read a string of bytes
TIMEOUT - set the max. timeout delay
RTS - set the rts line status
DTR - set the dtr line status
TXD - set the txd line status
CTS - read the cts line status
DCD - read the dcd line status
DSR - read the DSR line status
RI - read the ri line status

The DLL is free to use but with commercial projects the author asks to be
mentioned along with the book title.

Regards,
R. Gaida

--
Message posted via http://www.officekb.com
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default How can i read from RS232 using a macro (VB)?

Another excellent tool that you might look at for adding serial I/O
capability to Excel is a product called WinWedge from TAL
Technologies.
For more information please visit:
http://www.taltech.com/products/winwedge.html


On Fri, 8 Apr 2005 10:55:02 -0700, "Freds"
wrote:

i would like to write a macro (Excel) in vb that would enable me to read from
rs232 port, but i don't know how to do it. can anyone help me please.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RS232 to Excel woorksheet Franz Excel Programming 4 February 21st 05 06:34 PM
rs232 with excel x Excel Discussion (Misc queries) 2 January 17th 05 09:25 PM
access rs232 port with vba BoBri Excel Programming 3 January 7th 05 08:18 PM
Communicating down RS232 Phil Excel Programming 3 August 6th 04 08:29 AM
RS232 to Excel John Gittins Excel Programming 2 July 17th 03 11:14 PM


All times are GMT +1. The time now is 06:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"