Receiving from serial port in qb4.5 
Author Message
 Receiving from serial port in qb4.5

Hi!

I have a communication with a nullmodem between two PCs.
Transmitting characters over the COM-Port makes no problem, but the
receiving.

On both PCs I have 2400Baud, 7 data bits, even parity and 2 stop bits
set.
But when I want to receive data with the INPUT$-Command, always one
character (the last one) misses.
But this trouble only occurs after the second INPUT$ statement.

My command order is:
send 12 characters
receive 4 characers(correct)
send 12 characters
receive 4 characters(the last one misses)

Does anybody know why this is and has any solution for this problem?

Thanks, Bernd



Mon, 09 Feb 2004 15:43:21 GMT  
 Receiving from serial port in qb4.5

Quote:

> I have a communication with a nullmodem between two PCs.
> Transmitting characters over the COM-Port makes no problem, but the
> receiving.

> On both PCs I have 2400Baud, 7 data bits, even parity and 2 stop bits
> set.
> But when I want to receive data with the INPUT$-Command, always one
> character (the last one) misses.
> But this trouble only occurs after the second INPUT$ statement.

> My command order is:
> send 12 characters
> receive 4 characers(correct)
> send 12 characters
> receive 4 characters(the last one misses)

> Does anybody know why this is and has any solution for this problem?

Yes: Use a dummy last character! Now it dosen't matter if it is modified
or not.

Anyway, I'd say there is a problem with either the cable or the I/O
cards on the computers, not in the code or QB. Try going to Command
Prompt on both computers and type (if null-modem is on COM1 otherwise
appropriately replace) "Type CON > COM1" on the first and "Type COM1" on
the other. Now type whatever text you want on the first and see the
results on the screen of the other computer. If the problem is still
here, it's a hardware problem.

Good luck!

--

Don't feel bad about asking/telling me anything, I will always gladly
reply.

Wish you a lot of theta brain-waves!!

GTSC4 -- If nobody else wants to do it, why shouldn't we?(TM)
Meson & GTSC4 are now merged:
Http://WWW.MesonAI.Com



Mon, 09 Feb 2004 18:12:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Receiving ASCII Values Through Serial Port

2. Receiving binary data from a serial port

3. mscomm - send/receive from serial port

4. Serial port receive format?

5. Receive data thru the serial port.

6. View text received on serial port

7. Sendind and Receiving data from a serial port in Visual Basic

8. I/O port, Parallel port, Serial port

9. qb45 and SERIAL strange SERIAL port protocol

10. serial printer on serial port

11. serial printer on serial port

12. Future of Serial Ports vs USB Ports

 

 
Powered by phpBB® Forum Software