Products: FSP, FSU, FSQ, FSE, FSIQ, ESIB, ESPI, ZVR, ZVC, ZVM, ZVK
Remote Control of
R&S Spectrum and Network Analyzers
via LAN
Spectrum and network analyzers equipped with network interface cards can be integrated in Local Area
Networks (LAN). This Application Note describes how to remote control these instruments over a LAN and
use VXIpnp instrument drivers over a LAN.
All product names are trademarks of their manufacturing companies.
Subject to change – J. Ganzert 06 / 2003 – 1EF47_2E
Remote Control over a LAN
Contents
1 Overview ................................................................................................. 2
VISA ................................................................................................... 2
2 Remote Control via RSIB........................................................................ 3
LabVIEW ............................................................................................ 3
Agilent VEE ........................................................................................ 3
Microsoft VB.NET .............................................................................. 4
3 RSIB Passport for NI-VISA ..................................................................... 4
System Overview ............................................................................... 4
Requirements..................................................................................... 4
Installation .......................................................................................... 5
Initialization file "RsViRsib.ini" .......................................................... 5
Header file "RsViRsib.h" ................................................................... 6
Supported VISA Attributes ................................................................. 6
Supported Events .............................................................................. 6
4 Instrument Drivers and RSIB Passport for NI-VISA ............................... 7
5 Literature ................................................................................................. 7
6 Additional Information ............................................................................. 7
1 Overview
Spectrum and network analyzers are high-end instruments that perform
various measurement tasks in today’s telecommunication industry.
Integrated in a Local Area Network (LAN) such instruments can directly
exchange data with various documentation tools or be remotely controlled.
To be integrated in a LAN, spectrum and network analyzers must be
equipped with a network interface card.
This Application Note shows how to control Rohde & Schwarz spectrum
and network analyzers over a local area network and use VXIpnp
instrument drivers over a LAN. Rohde & Schwarz VXIpnp instrument
drivers are based on VISA. Drivers can control the instrument via LAN if
the RSIB interface and passport are installed.
VISA
VISA is a standardized software interface library providing input and output
functions to communicate with measurement instruments. This standard is
defined by the VXIplug&play Systems Alliance (http://www.vxipnp.org).
These I/O functions are mostly independent of the device interface used;
VXI, GPIB and RS-232 are currently supported. The I/O channel is
selected at initialization time. Except for some interface specific
configuration functions, the subsequent program code is independent of
the I/O interface.
1EF47_2E
2
Rohde & Schwarz
Remote Control over a LAN
Test program
viWrite()
viRead()
VISA
device (HW) specific function calls
GPIB
RS232
RSIB
2 Remote Control via RSIB
The RSIB interface is a R&S defined protocol that uses the TCPIP protocol
for communication with the instrument. It consists of a set of I/O functions
very similar to the National Instruments NI-488.2 interface for GPIB.
The following table shows some corresponding functions:
NI-488.2 functions
RSIB functions
ibfind
RSDLLibfind
ibwrt
RSDLLibwrt
ibrd
RSDLLibrd
Installation, function reference and programming examples in Visual Basic
and C are included in the operating manuals of the instruments that
support this interface.
Remote control over RSIB is done on a message level basis using the
SCPI command set of the instrument. Because the I/O functions are
proprietary, VXIpnp instrument drivers cannot use the RSIB interface
directly.
LabVIEW
National Instruments LabVIEW is a graphical development environment for
test and measurement applications.
LabVIEW supports DLL loading and invoking DLL functions. Attached to
this Application Note is a LabVIEW library, that contains wrappers for the
RSIB functions. For documentation of the function parameters refer to the
operating manual with the instrument.
The RSIB32.DLL does not perform any kind of memory management. It is
therefore the responsibility of the application to allocate and free memory
for output parameters of the RSIB functions. These parameters are passed
by reference.
Agilent VEE
Agilent VEE is a graphical development environment for test and
measurement applications.
Similar to LabVIEW VEE supports DLL loading and invoking DLL functions.
For syntactical reasons the C header file of the RSIB interface (rsib.h)
1EF47_2E
3
Rohde & Schwarz
Remote Control over a LAN
cannot be included directly in VEE. However the C header file can be used
as a reference for a modified include file that is used by VEE.
The RSIB32.DLL does not perform any kind of memory management. It is
therefore the responsibility of the application to allocate and free memory
for output parameters of the RSIB functions. These parameters are passed
by reference.
Microsoft VB.NET
With the introduction of the .NET platform, Microsoft has introduced
significant changes to Visual Basic. Attached to this application note is a
VB.NET file that contains the function declarations of the RSIB interface in
the VB.NET syntax. Add this module to your project for using the RSIB
interface with VB.NET.
3 RSIB Passport for NI-VISA
This approach uses a plug-in wrapper, enabling RSIB to use a National
Instruments VISA I/O library.
The RSIB passport can be installed on a host PC or locally on the
instrument itself.
System Overview
This overview shows how to control an instrument via the passport
(RsViRsib.dll), which in turn requires the RSIB interface (Rsib32.dll).
PC
GPIB
Instrument
Application
Firmware
VISA
SCPI-Parser
RS232
RsViRsib
IEEE488
driver
LAN
interface
RSIB32.DLL
LAN
Requirements
The RSIB passport requires NI-VISA V2.5 or higher to be installed. Note
that NI-VISA has to be licensed separately.
For remote control via a LAN, the LAN option is required for the instrument.
See the operating manual of the instrument for details on installing this
option.
The IP communication protocol can be tested with the following command:
ping <hostname>
1EF47_2E
4
Rohde & Schwarz
Remote Control over a LAN
In the above example <hostname> can be either the absolute IP address
of the instrument or the logical name, if some name resolution mechanism
(e.g. DHCP) is used.
The user must have administrator rights in order to install the RSIB
passport (Windows NT, 2000, XP).
Installation
Start Setup.exe from the installation media. If NI-VISA has not been
installed, set-up is interrupted. To conform to the VISA standards, use the
recommended installation path.
The following files are installed in these directories:
• RSIB32.dll in the Windows system directory (e.g.
C:\WinNT\System32).
• RsViRsib.dll passport DLL in the VISA Bin directory which by
default is C:\VXIpnp\WinNT\Bin\ for Windows NT4, 2000 and XP.
• RsViRsib.ini passport INI file in the RSIB subdirectory of the VISA
directory which by default is C:\VXIpnp\WinNT\ for Windows NT4,
2000 and XP.
Additional information
The following entries are added to the Windows registry. They must not be
modified by the user.
HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\NIVISA for Windows
95/NT\CurrentVersion\IoLibraries\RsViRsib.dll
!VISA Library Passport for RSIB-INSTR V1.3
! 0x00000001
! C:\VXIpnp\WinNT\Bin\RsViRsib.dll
– LibraryDescription
– LibraryEnabled
– LibraryPath
Initialization file "RsViRsib.ini"
This file lists all resources which can be read by means of the viFindRsrc()
VISA function. It is contained in the installed directory under …\Rsib. If the
passport cannot find the INI file in the installed directory, it searches also
the standard VISA directory (e.g. C:\VXIpnp\WinNT) under …\Rsib. Entries
in NI-MAX or VISAIC are made only if resources are listed. The passport is
nevertheless integrated so that the user can still start sessions.
Extract:
[RSIB-RSRC-ALIAS]
Name0 = "RSIB::192.168.1.33::INSTR"
Name1 = "RSIB::192.168.1.37::INSTR"
Name2 = "RSIB::FSP7::INSTR"
The TCP/IP address can be entered in decimal, octal or hexadecimal
notation. In addition, a symbolic name can be used, if the network protocol
provides a name resolution mechanism (e.g. by using a hosts file or by
defining a domain name server (DNS)). Note that the semicolon (;) at the
1EF47_2E
5
Rohde & Schwarz
Remote Control over a LAN
beginning of a line denotes a comment line. Lines starting with ‘;’ are
therefore inactive.
After successful installation and with the instrument connected to the LAN,
the resources show up in NI-MAX under:
My System -> Devices & Interfaces -> VISA-Ethernet Devices.
Header file "RsViRsib.h"
The header file contains all manufacturer-specific (R&S) attributes that are
supported by the passport in addition to the VISA attributes. To address
these attributes from a C program, simply include the header file.
Supported VISA Attributes
In addition to the standard VISA attributes, the RSIB passport supports the
following manufacturer specific attributes:
•
•
•
RS_ATTR_RSIB_VER – read-only, returns the version of the
passport (e.g. 1.2)
RS_ATTR_RSIB_SRE – switches the instrument to LOCAL (value
= 0) or REMOTE (value = 1)
RS_ATTR_RSIB_LOC – switches the instrument temporarily to
LOCAL (no attribute value)
Supported Events
The RSIB passport supports the following events:
• VI_EVENT_SERVICE_REQ,
• VI_EVENT_IO_COMPLETION
1EF47_2E
6
Rohde & Schwarz
Remote Control over a LAN
4 Instrument Drivers and RSIB Passport for NI-VISA
Due to differences in the I/O protocol there are some limitations compared
to VISA functions over GPIB. The RSIB interface does not support the
VISA attribute VI_ATTR_TERMCHAR.
The current versions of the instrument drivers take into account which I/O
channel is used. RSIB is one of the supported I/O channels.
5 Literature
For more information about the RSIB interface as well as for
documentation of the remote control commands, refer to the operating
manual of the instrument.
For a detailed documentation of VISA functionality refer to the VISA User
Manual and the VISA Programmes Reference Guide.
6 Additional Information
Please contact TM-Applications@rsd.rohde-schwarz.com for comments
and further suggestions.
.
.
.
.
ROHDE & SCHWARZ GmbH & Co. KG Mühldorfstraße 15 D-81671 München P.O.B 80 14 69 D-81614 München
.
.
Telephone +49 89 4129 -0 Fax +49 89 4129 - 13777 Internet: http://www.rohde-schwarz.com
.
This application note and the supplied programs may only be used subject to the conditions of use set forth in the download
area of the Rohde & Schwarz website.
1EF47_2E
7
Rohde & Schwarz