🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.basic.visual.3rdparty
2 messages
2 total messages Started by GRAHAME DUKE Sun, 27 Sep 1998 00:00
VB5 Oncomm and Timer Question
#36
Author: GRAHAME DUKE
Date: Sun, 27 Sep 1998 00:00
26 lines
1916 bytes
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
Re: VB5 Oncomm and Timer Question
#38
Author: 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
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads