Visa Data Types And Selected Constant Definitions; Error Handling - HP 8163A Series Programming Manual

Lightwave multimeter, lightwave measurement system & lightwave multichannel system, mainframes
Hide thumbs Also See for 8163A Series:
Table of Contents

Advertisement

VISA Data Types and Selected Constant Definitions

HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User's Guide, E1299
VISA Data Types and Selected
Constant Definitions
The driver functions use VISA data types. VISA data types are identified by the
Vi prefix in the data type name (for example, ViInt16, ViUInt16, ViChar).
The file visatype.h contains a complete listing of the VISA data types,
function call casts and some of the common constants.
N O T E
You can find a partial list of the type definitions and constant definitions for the
visatype.h in the HP 816x VXIplug&play Instrument Driver Online Help.

Error Handling

Events and errors within a instrument control program can be detected by polling
(querying) the instrument. Polling is used in application development
environments (ADEs) that do not support asynchronous activities where callbacks
can be used.
Programs can set up and use polling as shown below.
1 Declare a variable to contain the function completion code.
ViStatus errStatus;
Every driver function returns the completion code ViStatus.
If the function executes with no I/O errors, driver errors, or instrument errors,
ViStatus is 0 (VI_SUCCESS).
If an error occurs, ViStatus is a negative error code.
Warnings are positive error codes, and indicate the operation succeeded but
special conditions exist.
2 Enable automatic instrument error checking following each function call.
hp816x_errorQueryDetect
(instrumentHandle, VI_TRUE);
When enabled, the driver queries the instrument for an error condition before
returning from the function.
If an error occurred, errStatus (Step 1) will contain a code indicating that
an error was detected (hp816x_INSTR_ERROR_DETECTED).
3 Check for an error (or event) after each function.
The HP 816x VXIplug&play Instrument Driver
159

Advertisement

Table of Contents
loading

This manual is also suitable for:

8164a series8166a series

Table of Contents