"R. Glenn Givens" <[EMAIL PROTECTED]> said:

>Fortunately, I don't have to worry about the funny 
>protocol & bad documentation because I get to decide all 
>this myself.

This being the case, my top tips would be:

- Have the remote device send a data block in response to a query from the PC, rather 
than spewing out the data continuously. The only serial communication task in LabVIEW 
that's ever given me a real headache was dealing with a meter that sent continuously, 
and I never completely fixed the intermittent error that would occasionally pop up and 
halt a three-hour test. The query-response format is far more predictable to deal 
with: you don't have to worry about data piling up in the buffer, chopping messages in 
half by reading/flushing at the wrong time, etc etc.

- Make use of VISA's termination character feature: have the remote device append a 
unique character such as LF to the end of each message it sends, wire a number bigger 
than the message length to 'bytes to read', and VISA Read will just return the message 
up to and including the termination character - or time out if it didn't arrive. No 
need for flaky time delays or polling the number of bytes at the port!

If your current VISA version is less than 3.0.1, it might be worth upgrading - search 
the NI site for "visa 3.0.1" (with the quotes) to find the installer.

Good luck, and once you're converted to the VISA way feel free to evangelise! ;-)

Tom


Dr Tom Hawkins
High Throughput Screening Analyst, Associated Octel ltd
PO Box 17, Ellesmere Port, Cheshire CH65 4HF, UK
+44 (0)151 355 3611  [EMAIL PROTECTED]

-----------------------------------------
Email provided by http://www.ntlhome.com/



Reply via email to