Admin Production ni-theme
Current Publication

VISA Data Types

LabWindows/CVI

VISA Data Types

The VISA Library defines a special set of data types. The IVI Library also uses some of these data types. The data types strictly define the type and size of the parameters and therefore promote the portability of the functions to new operating systems and programming languages.

A subset of the VISA data types has been defined for use in the development of LabWindows/CVI instrument drivers and are accessible as user-defined data types. The following table shows these special data types for instrument drivers.

VISA Type Name Definition
ViInt16 Signed 16-bit integer
ViInt32 Signed 32-bit integer
ViInt64 Signed 64-bit integer
ViUInt16 Unsigned 16-bit integer
ViUInt32 Unsigned 32-bit integer
ViUInt64 Unsigned 64-bit integer
ViReal64 64-bit floating-point number
ViInt16[] An array of ViInt16 values
ViInt32[] An array of ViInt32 values
ViInt64[] An array of ViInt64 values
ViReal64[] An array of ViReal64 values
ViChar[] A string buffer
ViConstString A read-only string
ViRsrc An instrument driver resource descriptor (string)
ViSession An instrument driver session handle
ViStatus An instrument driver return status type
ViBoolean Boolean value
ViBoolean[] An array of ViBoolean values


Note Note  LabWindows/CVI adds the ViInt64, ViUInt64, and ViInt64[] data types only when you select CVI 8.5 and later as the FP file format.

To use these special user-defined data types in an instrument driver, complete the following steps:

  1. Add the VISA data types to the function panel file by using the Options»Data Type command in the Function Panel Editor. Then click the Add VISA Types button in the Edit Data Type List dialog box.
  2. Include the vpptype.h file in the instrument driver header file.