How send BYTES down comm port 
Author Message
 How send BYTES down comm port

Bill Gates' wonderless documentation could not explain it sufficiently.

How do I send byte-type data down the serial port?

The Programmer's Reference goes through a superificial discussion about
file i/o using byte data, but otherwise treats it as an orphan child
that should be forgotten about quickly.

I was assigning to a string variable a sequence of bytes concatenated
with the "&" operator. I'm not sure what that gave me, but the
comm control surely choked when I said comm1.output = <bytevar> ,
it didn't like that one bit; something about a data type mismatch.
So, it wants a string fed to it, not a byte.

Is there some conversion going on internally or does this:

<stringvar> = <bytevar>

put pure bytes into the string variable?

I have no way of ascertaining what the device on the other end of the
comm port thinks it is getting, so I suspect this is the cause.

Thanx!



Thu, 06 May 1999 03:00:00 GMT  
 How send BYTES down comm port



Quote:
> Bill Gates' wonderless documentation could not explain it sufficiently.

> How do I send byte-type data down the serial port?

Turn the byte B into a 1-byte string with stringname = chr$(B)
--
Peter Hesketh from Mynyddbach, Monmouthshire, UK


Sat, 08 May 1999 03:00:00 GMT  
 How send BYTES down comm port

On Sun, 17 Nov 1996 03:55:07 -0500, The Bote Man

Quote:

>Bill Gates' wonderless documentation could not explain it sufficiently.

Amen. The doc sure isn't the best in the world.  Could be worse,
though...

<clip>

Quote:
>I was assigning to a string variable a sequence of bytes concatenated
>with the "&" operator. I'm not sure what that gave me, but the
>comm control surely choked when I said comm1.output = <bytevar> ,
>it didn't like that one bit; something about a data type mismatch.
>So, it wants a string fed to it, not a byte.

So you did something like this?
dim o$
o$ = chr$(4) & chr$(5) & chr$(6)...
comm1.output = o$

Well, I'm using VB4.0 PE, and that works just fine for me.
Maybe some more details would be helpful.

-Roger



Sun, 09 May 1999 03:00:00 GMT  
 How send BYTES down comm port

 On Sun, 17 Nov 1996 03:55:07 -0500, The Bote Man

Quote:

>Bill Gates' wonderless documentation could not explain it sufficiently.

Anybody who uses grammar like "How send BYTES down comm port" can hardly
complain about anyone else's documentation.

Cheers,

Steve Comstock
Denver, Colorado
USA

telephone: 800-993-8716
or:        303-393-8716
fax:       303-393-8718



Sun, 09 May 1999 03:00:00 GMT  
 How send BYTES down comm port

Quote:

>Anybody who uses grammar like "How send BYTES down comm port" can hardly
>complain about anyone else's documentation.

Thanks for the insightful comment.


Mon, 10 May 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Sending CTRL key to a comm port?!

2. opening and sending BINARY to a comm port.

3. How do i send a hex value to the comm port

4. Sending data to a comm port that is in use

5. Unable to send data on comm port

6. Send a byte to a port?

7. How to send byte direct to parallel port ?

8. Send a byte to printer port?

9. Send a byte to a port??

10. How to send byte to printer port? HELP

11. Send bytes through serial port?

12. Send bytes through serial port and Unicode

 

 
Powered by phpBB® Forum Software