05-31-2006 08:07 PM
06-01-2006 01:54 AM
ComRdTerm reads and returns the characters received on the serial port and discards the termination byte. As you can see in the online help, a CR + LF combination is discarded too.
However, the function ends even for timeout, so you must set the appropriate timeout with SetComTime and always check RS232Err value after reading so you can detect and handle correctly a timeout during read.
Given these details, ComRdTerm is a powerful function to use if your messages end regularly with a fixed character (which is not supposed to be used elsewere in the message, of course! In this latter case ComRdTerm would be tricked out: that's why you usually cannot use ComRdTerm on binary data transmission, but if your instrument transmits plain text as you have reported you should have no problem).