R Glenn:

I'll suggest using VISA, for obvious reasons.  Starting with LabVIEW 7,
it's really the only way (the serial VI's are just wrappers on top of
VISA).

The main issue in your email that I'd like to address is the size of the
input/receive buffer.  Just call VISA Set Buffer Size and make the input
I/O buffer size larger than you'd expect to need.  Buffer sizes up to 32 KB
work perfectly fine; I've seen larger buffers work OK too.  (I've also seen
a request of multiple MB return a "success" status code even though Windows
in fact was using only a 4 KB buffer.  Go figure.)  But a 32 KB buffer
should meet your needs perfectly.

Dan Mondrik
National Instruments



                                                                                       
                                                
                      "R. Glenn Givens"                                                
                                                
                      <[EMAIL PROTECTED]        To:       "LabView Discussion Group" 
<[EMAIL PROTECTED]>                       
                      com>                     cc:                                     
                                                
                      Sent by:                 Subject:  [W] Data link Serial port     
                                                
                      <[EMAIL PROTECTED]                                               
                                                 
                      a.army.mil>                                                      
                                                
                                                                                       
                                                
                                                                                       
                                                
                      03/22/2004 10:56                                                 
                                                
                      PM                                                               
                                                
                                                                                       
                                                




Friends
I am writing a data link to communicate between a PC running LV 6.0.2 and
an
industrial computer. The link on RS232C will run @ 9600 baud and the
throughput is such that I'm using 1/4 to 1/3 of capacity. The industrial
computer sends the data and has a 500 byte buffer each for send and
receive.
But the data is all one way from the industrial computer to the PC. The PC
will save this data to disk continuously and also present displays etc.

It sounds like there are many ways to operate the serial port in LV (maybe
VISA, maybe direct port manipulation, more likely old-fashioned serial port
VI's?. I haven't done much checking but I wondered what the consensus was
for the best method for this type of application. Since PC's only have a
buffer of a few bytes, I would prefer to have something automatically
handle
the interrupts and have a big input buffer that I just read from time to
time (say every 50 to 100 msec). I used to do that interrupt handler stuff
in assembler in the DOS days.

The LV application will be compiled/built to an EXE. I'm writing both sides
of the link so I can impose whatever design I want.

TIA

R. Glenn Givens P.Eng.
Innovention Industries Inc.
Burlington, ON, Canada
www.innovin.com




Reply via email to