That read error means that there's no data to be read at the serial
port. The cause of that is probably because the instrument did not
receive a valid command. Why it didn't could be because of any number
of reasons. Is the baud rate, parity, data bits, correct? Is the cable
correct? Are you sending the correct termination character? Is there a
syntax error in the command? Have you tried using Hyperterminal?

A lot of questions with no definite answers but serial communication
in general just plain sucks and there's a lot that can be wrong. If
you would do a search of the forum for serial, you would see hundreds
of questions similar to yours. Many of them have example code and
links to tutorials such as the one <A
href="http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&93FD9F2AD3D0641E8625682100067F39";>here</A>.
I always start with Hyperterminal or Procomm to at least verify the
hardware is correct before starting to write any software.

Reply via email to