Serial port Write then Read issue

2004-04-08 Thread Art Barber
Greetings all:

In LV 7.0 I have a serial port Write/Read problem.I am attempting to
communicate with a fairly "dumb" instrument of custom design. In
testing my LV program (with nothing connected to the serial port), I
try to write a string "blah blah blah". No problem, far as I can tell.
Then I attempt a read, which in my mind should give me an error since
nothing is connected to the serial port. However, I get the original
message "blah blah blah"! I was under the impression based on the
documentation that the receive and transmit buffers in the serial port
were separate, and never the twain shall meet. Yet, I appear to be
reading the write buffer! WTF?

Using the VISA Clear function between the write and read operation
appears to give me what I want, since nothing is returned and the VISA
read operation times out. However, in my application this means data
could be lost if data is cleared while the "dumb" instrument is trying
to write to the serial port. A colleague suggested offsetting the read
operation by the write string length to weed out the write string, but
this seems like the long way home. Also, the issue remains: aren't the
serial port's transmit and receive buffers separate? What to do?

Another issue: the VISA Flush operation mode masks list two modes, 16
and 64 that appear to do the same thing, flush and discard the receive
buffer. Trying to do both thru an OR function yields an error that
flags it as an invalid mask. Also, none of the mask combinations seem
to really get rid of any data. 

Art



Best books to get up to speed with LabView 7?

2004-02-08 Thread Art Barber
I am presently looking for advice as to the best book(s) to get up to
speed with LabView 7 (Best beginner's book, best intermediate book,
best advanced book). Any books to advoid? While I prefer hardcopy, I
would be open to the best online resources as well.

Art