Click or drag to resize

Setting the Trailing Character for Read and Write Operations

Many instruments require special termination characters when reading and writing data. For instance, a line-feed character is often used by instruments to detect the end of a particular command sequence. Correspondingly, instruments often return data that includes extra termination characters in the response string. Manually inserting these termination characters when data is written to an instrument is tedious and error-prone, as is manually stripping these termination characters from response data read from the instrument.

To simplify driver I/O programming in the face of instruments that use termination characters, Nimbus provides two special functions: SetTrailingForReads and SetTrailingForWrites. Calls to I/O write functions, such as WriteString, will have the trailing characters appended to the string specified in the write call. Similarly, the string specified in a call to SetTrailingForReads function will automatically be stripped from the instrument response when using I/O read functions, such as ReadString.

See Also

Download a complete CHM version of this documentation here.