Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Sasy Caravella
  Where is Sasy Caravella?
 Naples
 Italy
 Sasy Caravella
 Tags
Subject: Reading from Serial Port with MsComm
Thread ID: 345602 Message ID: 345602 # Views: 65 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Thursday, May 24, 2012 8:36:20 PM         
   


Hi Experts,

I need help to read from the serial port

I have this error:

Ole IDispatch exception code 0 from mscomm Error Reading ...

oComm = CREATEOBJECT("MSCOMMLIB.MSCOMM")
oComm.CommPort = 1
oComm.Settings = "9600,N,8,1"
oComm.InputLen = 0
ocomm.portopen = .t.
cValue = ""
DO WHILE .T.
IF oComm.InBufferCount <= 2
cValue = oComm.Input
ENDIF
ENDDO
ocomm.portopen = .f.


Thanks
Sasy

ENTIRE THREAD

Reading from Serial Port with MsComm Posted by Sasy Caravella @ 5/24/2012 8:36:20 PM
RE: Reading from Serial Port with MsComm Posted by Anil Sharma @ 5/24/2012 9:17:09 PM
RE: Reading from Serial Port with MsComm Posted by Don Higgins @ 5/24/2012 10:59:30 PM
RE: Reading from Serial Port with MsComm Posted by Sasy Caravella @ 5/25/2012 10:37:44 AM
RE: Reading from Serial Port with MsComm Posted by Sasy Caravella @ 5/24/2012 11:00:19 PM
RE: Reading from Serial Port with MsComm Posted by Anil Sharma @ 5/25/2012 11:25:18 AM
RE: Reading from Serial Port with MsComm Posted by Sasy Caravella @ 5/25/2012 11:35:08 AM
RE: Reading from Serial Port with MsComm Posted by Don Higgins @ 5/28/2012 5:03:31 PM
RE: Reading from Serial Port with MsComm Posted by Suresh Adhikari @ 5/29/2012 12:51:46 PM