Remote Control
R&S
®
ESR
602
User Manual 1175.7068.02 ─ 12
Linking the Remote Control Library for Visual Basic
Programming notes:
●
Outputting text using the print function
Using the print method, this example displays the value of the variable
MyVar
in
the "Immediate" window of the Visual Basic development environment. Note that
the print method only applies to objects that can display text.
Debug.Print MyVar
●
Accessing the functions of the
VISA32.DLL
To enable users to create Visual Basic control applications, the
VISA32.BAS
file
must be added to a project so that functions of the
VISA32.DLL
can be called. In
addition, the
VPPTYPE.BAS
file must be added to the project. This file contains
constants and definitions for error handling, timeout values, etc.
The modules
visa32.bas
and
vpptype.bas
can be found under
<VXIpnpPath>\WinNT\include
(typically
C:\VXIpnp\WinNt\include
).
As an alternative, a reference to the
VISA32.DLL
can be added to the project.
●
Creating a response buffer
Since the DLL returns zero-terminated strings in responses, a string of sufficient
length must be created before the functions
InstrRead()
and
ilrd()
are called,
because Visual Basic inserts a length specification in front of the strings and this
specification is not updated by the DLL. The following two means of creating the
length specification for a string are provided:
Dim Rd as String * 100
Controlling the R&S
ESR Remotely