Hello,

You can enable or disable termination characters by using the Config
Serial Port VI in your flow of programming.  See the LabVIEW <->
Serial.vi example that ships with LabVIEW (go Help -> Find
Examples...)for proper use of this VI.

Note that the termination character specified in the config serial
port VI applies <b>only</b> to reads and not to writes.  This stems
from the fact that this Vi sets the "VI_ATTR_ASRL_END_IN" attribute
only.  Thus, it will not be appended to a write buffer.

In your application, it seems that you should disable the termination
character on this VI (or at least change it to something besides LF).
You can do a "get bytes at port" as others have mentioned to find out
how many bytes to read in, and then read exactly this many bytes from
the port.  As long as your device sends all its data before you do
this read, you will not lose any data with this method.  On the other
hand, if you device sends, say 10 out of the total 25 bytes, then your
Get Bytes at Port will only return 10 and you will only read 10 bytes;
you will need to be careful with this "no termination character"
approach.

If any of this is unclear, please respond by posting here.

Scott B.
Applications Engineer
National Instruments

Reply via email to