AnsweredAssumed Answered

vrf Access to serial port, some more details

Question asked by VRFuser on Aug 1, 2004
I'm not sure what's going on, it might be a mismatch 'tween the buffer size
and the read speed.  What I would do is:

Set the buffer size to something I know works for the device and with the
speed, sometimes slower is ok, then work backwards.  Once this is working I
would read a byte at a time and stuff it into a string.  This way you build
your own endless buffer within your code and this should solve any dropped
bytes through "dirty" windows.   Note, once you set the speed limit, the
device sending should comply, else tell it to comply.

Once good data is received, you can try to speed-up, but try to understand
the buffer size vs read speed (kinda funky since WINDOWS controls this one,
read speed).  But once you've got good buffer size and baud rate, you might
want to read all as an array.  Don't be surprised that you might loose a
byte here and there through the "window." I've had trouble intermittently
with the array, just shows up every month or so.

So a byte at a time is hard to drop.  You should be able to grab a byte with
a tin can and piece of string.

If you find a better way, please let me know.


-----Original Message-----
From: []
Sent: Friday, July 30, 2004 9:11 AM
Subject: [vrf] Access to serial port, some more details

Hello all,

a colleague has some problems using the serial interface, please find the
description of what happens below. Has anyone a solution to this? The
time-out is not active, the error occurs directly. We actually use VEE Pro
7, however, the error also occured in Vee 6.
Best regards,


> VEE seems to have difficulties in addressing the serial interface. So
> an error message like this happens the first time when using the
> serial interface. But then it works all right for reading 16 bytes
> Unfortunatelly we have to capture 36 bytes. With this setting, this
> error message occures every time at once, so it isn't a timeout.
Using an error output together with execute reset is a good tip when the vee
routine fails just once. But it does not help when vee settles with an error
message every time.

Thing is, after an initial error message, it works for reading 16 bytes (so
the transceiver is active . It also works when using a C routine. But the
VEE program fails when it has to read 36 bytes instead of 16 - even when
using restart to clear the buffer.

stop bit: 1
parity: none
baud rate: 115200
handshake: none
receive buffer size: 4096 and other values
timeout: 15 secs
Read Terminator: ""
EOL sequence: ""
Array seperator: ""
Live Mode: ON
Byte ordering: MSB

> .  <<err_msg_vee.gif>>

You are currently subscribed to vrf as:
To subscribe send a blank email to "".
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".