Formatted I/O Instrument Driver Examples
The following topics show examples of VISA formatted I/O usage found in existing instrument drivers.
These topics show how to perform various I/O tasks using the formatted I/O services in VISA. They assume a basic knowledge of string formatting and ANSI-C format specifiers. For more information on VISA format specifiers, refer to the appropriate topics in this help file.
The VISA formatting capabilities include those specified by ANSI-C with extensions for common protocols used by instrumentation systems. To perform I/O, use the viPrintf(), viScanf(), and viQueryf() service routines with the appropriate format strings.
For each category of formatted I/O, we give a description and a list of short examples. The focus is on the VISA I/O supported format specifiers that are most frequently used in driver development, with an explanation of how different modifiers work with the format codes. To eliminate redundancy and make the examples easier to understand, we have omitted error-checking routines on I/O operations from all examples.