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
 To: Anil Sharma
  Where is Anil Sharma?
 ludhiana
 India
 Anil Sharma
 Tags
Subject: RE: Reading from Serial Port with MsComm
Thread ID: 345602 Message ID: 345610 # Views: 60 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Thursday, May 24, 2012 11:00:19 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
>
> Are you sure your comport = 1 ?
> Check on which port your device is connected and use that port number here.
>
>
>
> Anil
>
>
> Accounting Software
>
> Web Development
>
> Accounting, Inventory, Hotel Management, Restaurant Kot Billing, MLM, Excise Accounting and much much more!.
> My Blog



Hi Anil
Yes , the port number is right

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