🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.visual.3rdparty
Article #38

Re: VB5 Oncomm and Timer Question

#38
From: Martin
Date: Tue, 29 Sep 1998 00:00
41 lines
2442 bytes
The OnComm event fires when data comes in. You don't need to do
anything. Set your RThreshold to 1 and the event will fire every time
a bytes arrives. Declare a static string (inside the ONComm event) and
accumulate the incoming data in it. When it gets to a certain size (or
on some other criteria) do whatever  processing needs to be done and
then reset the static string to "".  

Martin


On Sun, 27 Sep 1998 21:48:54 +0100, "GRAHAME DUKE"
<grahame.d@virgin.net> wrote:

>
>I have a program which will interrigate a piece of hardware for inforamtion.
>The recieved data has no handshaking protocol.
>
>Here's the problem. I want to run a few lines of program on a button click),
>look at the Rx comm1 buffer. If empty, wait indefinatly. If something
>present, run the Oncomm_event for a time (about 1 or 2 secs) which will
>store each piece of data into a array. As the data stream lasts only a
>second or two, continue storing data.
> After 2 secs, go back to where I left off, run some more program, clear
>buffer and repeat.
>In other words, on button click, test Rx buffer.
>If charatcer in buffer, collect all characters recieved for 2 secs,
>Go back to program, reset buffer and repeat,
>
>
>Any ideas?
>
>Grahame.
>
>
>
>How can I, on a button click, let a program wait until the comm1 recieve
>buffer (which starts empty), wait until something arrives, then with the
>Oncomm event, collect all the information (and store them into a dimensioned
>variable) which
>
>
Technical Details
Message-ID: <36116c66.292103262@flood.xnet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6urh44$npl$1@nclient3-gui.server.virgin.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11629a,9ea5c81679c8d790
X-Google-Attributes: gid11629a,public
X-Google-Thread: 110e3b,9ea5c81679c8d790
X-Google-Attributes: gid110e3b,public
X-Google-Thread: 10f5f9,9ea5c81679c8d790
X-Google-Attributes: gid10f5f9,public
X-Google-Thread: f5f6f,9ea5c81679c8d790
X-Google-Attributes: gidf5f6f,public
X-Google-Thread: 108062,9ea5c81679c8d790
X-Google-Attributes: gid108062,public
From: valley@xnet.com (Martin)
Subject: Re: VB5 Oncomm and Timer Question
Date: 1998/09/29
Message-ID: <36116c66.292103262@flood.xnet.com>
X-Deja-AN: 396152103
References: <6urh44$npl$1@nclient3-gui.server.virgin.net>
Organization: XNet - The Midwest's Leading Network Service Provider - (630) 983-6064
Newsgroups: comp.lang.basic.visual.3rdparty,comp.lang.basic.visual.misc,comp.lang.clipper.visual-objects,cz.comp.lang.basic.visual,microsoft.public.visualj.misc-tools