AnsweredAssumed Answered

VRf-Serial Baud Rate again

Question asked by VRFuser on Mar 25, 1997
To: VEE Reflector
From: Peter Fender   pmfa@eci-esyst.com
Subj: Serial Baud Rate again
Date: 26 Mar 1997


Greg,
Thanks for the response, but I don't think you understood
my question.  I'll explain further.

I have two VEE 'instruments' defined:
Device_9600 is setup as a Serial Interface, Address 9 (COM1:),
9600 baud.
Device_19200 is setup as as Serial Interface, Address 9 (COM1:),
19200 baud.
There is a manual A/B switch between COM1: and the two physical
devices.

I will transmit and receive to each device seperately in different
parts of my VEE program. The operator will be prompted to change
the A/B switch for each device.

Device_19200 sends out a string of characters when it is turned
on without being interrogated, that I wish to read in VEE.

If I had last used Device_9600, the UART on the COM1: board is still
setup for 9600 baud, and will not receive the 19200 baud data
properly. I need to configure the hardware interface (COM1:) for
19200 baud so that it will receive the data.
Then I can READ it in VEE.

My VEE program prompts the operator to turn this device on, so I
can get the interface ready to receive the data.

Rob Marquardt suggested trying a Direct I/O 'EXECUTE RESET' to set
the port's baud rate.  Does this set the port's hardware ?
Is this why 'EXECUTE RESET' takes several seconds to finish ?

If I just WRITE a character to the serial port, does VEE
'remember' which device or instrument last used the port and set
the baud rate properly for the current instrument ?
Or does it output the data at the baud rate still setup on the
port ?
I had been starting my functions that WRITE and then READ data
for each device with 'EXECUTE RESET' to clear out any leftover
data in the receive buffer, or any garbage characters from
the A/B switch.  I had been assuming that writing data out
set the baud rate, but if 'EXECUTE RESET' actually does this,
then I can execute it before I expect any data into the port.


This is difficult to visualize, since the dividing line between
Interface and Device in not as clear for the serial port as it
is for the HPIB.

I hope I have explained my question better this time.
I will be able to try out these solutions sometime next week.

Thanks in advance,
Peter

--------------------------------------------------------------------

>> I have a test setup where I will be communicating with two devices
>> through one serial port and a manual A/B switch.
>>
>> One device operates at 19200 baud, and the second at 9600 baud.
>>
>> The first device sends a status string after it is turned on that
>> I wish to read in VEE.
>>
>> How do I be sure the serial port is set to the right baud rate so
>>that it will accept and buffer the data ?
>>

>Baud rates are set by performing a manual Direct I/O configuration for
>the particular interface as part of the device configuration process.
>It is not possible to programmably change the baud rate.  However, you
>could have two different configurations for the same interface and
>alternate between different DIO objects (or use Multidevice Direct I/O).


>> Do I need to transmit one character to the port so the baud rate is
>> correct ?
>No.

>> Does transmitting a charater via Direct I/O always set the baud rate
>> defined for that instrument ?
>No.

>>I am using VEE 3.12 for Windows, with Windows 3.1.

----------------------------------------------------------------------

Peter Fender
Raytheon E-Systems, Inc.
PO Box 12248
St. Petersburg, FL  33733
pmfa@eci-esyst.com







Outcomes