Serial-comm question

Serial-comm question

Postby byte-one » Sat Sep 17, 2011 10:51 am

Can i check, if the handle from a comm-port are at the actual time ok? I the case, the user shut off the environment with the serial connection the app hangs.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Serial-comm question

Postby Jeff Barnes » Sat Sep 17, 2011 11:21 am

Not sure if this will help but in my app I do the following to see if data is still hitting the serial port:
Keep in mind that with my app the serial device sends data every second so I always expect to see something on the port unless the device is turned off or disconnected.


Code: Select all  Expand view

      if ReadComm( nComm , @cDataRead) <> 0
          //data on serial port
      else
         //no data on serial port
      endif
 
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Serial-comm question

Postby byte-one » Mon Sep 19, 2011 7:26 am

No, i have the problem with a usb-serial converter. If the converter is unplugged from the user, the app hangs.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 110 guests