This document provides general information on remote control of Rohde & Schwarz
products via SCPI, especially useful for unexperienced users.
For further information, refer to:
●
User manuals of your product
–The description of manual operation (GUI reference) provides direct links to
corresponding remote commands.
–For remote control interfaces and protocols supported by your instrument, refer
to chapters describing remote control basics.
–For detailed description of the remote control commands that your instrument
supports, refer to the command reference chapters.
●
www.rohde-schwarz.com/rckb: Rohde & Schwarz webpage that provides informa-
tion on instrument drivers and remote control.
IntroductionRemote Control via SCPI
51179.4592.02 ─ 02
Remote control interfaces and protocolsRemote Control via SCPI
2Remote control interfaces and protocols
Remote operation with SCPI commands automates the operation of the instrument.
Scripts or programs control the software or firmware of the instrument to execute tests
or generate signals.
SCPI stands for Standard Commands for Programmable Instruments. Typically,
Rohde & Schwarz instruments support at least one interface for remote control via
SCPI.
SCPI compatibility
The SCPI standard is based on standard IEEE 488.2. It aims at the standardization of
instrument-specific commands, error handling and status registers. The tutorial "Automatic Measurement Control - A tutorial on SCPI and IEEE 488.2" from John M. Pieper
(Rohde & Schwarz order number 0002.3536.00) offers detailed information on concepts and definitions of SCPI. The instrument supports the latest SCPI version 1999.
SCPI-confirmed commands are typically explicitly marked in the command reference
chapters. Commands without SCPI label are instrument-specific. However, their syntax
follows SCPI rules. See also Chapter 3, "SCPI command structure", on page 13.
VISA libraries
Virtual instruments software architecture (VISA) is a standardized software interface
library providing input and output functions to communicate with instruments. Highlevel programming platforms use VISA as an intermediate abstraction layer. VISA
encapsulates the low-level function calls and thus makes the transport interface transparent for the user.
A VISA installation is a prerequisite for remote control via the LAN, USB or GPIB. The
I/O channel is selected at initialization time via the channel-specific address string or a
VISA alias (short name). The VISA address resource strings are typically displayed in
the GUI of the instrument.
For further information, refer to:
●
Rohde & Schwarz webpage providing the installers for a proprietary R&S VISA:
www.rohde-schwarz.com/rsvisa.
●
Rohde & Schwarz webpages providing examples on VISA tools:
–R&S VISA Tester Tool: www.rohde-schwarz.com/visa-and-tools
–Using R&S Forum Application for Instrument Remote Control: www.rohde-
schwarz.com/rs-forum
●
Rohde & Schwarz webpage VISA in Programming Languages: www.rohde-
schwarz.com/programming-with-visa
●
VISA user documentation
61179.4592.02 ─ 02
2.1LAN interface
Many instruments are equipped with a LAN interface that can be connected via a commercial RJ-45 cable to a network with TCP/IP protocol. The TCP/IP protocol and the
associated network services are preconfigured on the instrument. Software for instrument control and (for specified protocols only) the VISA program library must be installed on the controlling computer.
Rohde & Schwarz instruments support LAN protocols such as VXI-11, RSIB, raw
socket or the newer HiSLIP protocol.
VISA resource string
Only the IP address or the host name of the instrument is required to set up a connection. This information is part of the VISA resource string used to address the instrument. Several instruments in the same network have different IP addresses, host
names and resource strings.
Default ports
Remote control interfaces and protocolsRemote Control via SCPI
LAN interface
Rohde & Schwarz instruments typically use the following ports for communication via
LAN control interface.
The VXI-11 standard is based on the open network computing remote procedure call
(ONC RPC) protocol which in turn relies on TCP/IP as the network/transport layer. The
TCP/IP network protocol and the associated network services are preconfigured.
TCP/IP ensures connection-oriented communication, where the order of the
exchanged messages is adhered to and interrupted links are identified. With this protocol, messages cannot be lost.
TCP port: any port provided by the ONC RPC port mapper (see RFC 1833)
TCP port: 5353
2.1.2HiSLIP protocol
The high-speed LAN instrument protocol (HiSLIP) is the successor protocol for VXI-11
for TCP-based instruments specified by the IVI Foundation. The protocol uses two
71179.4592.02 ─ 02
Remote control interfaces and protocolsRemote Control via SCPI
LAN interface
TCP sockets for a single connection - one for fast data transfer, the other for nonsequential control commands (e.g. Device Clear or SRQ).
HiSLIP has the following characteristics:
●
High performance as with raw socket communication
●
Compatible IEEE 488.2 support for message exchange protocol, device clear,
serial poll, remote/local, trigger, and service request
●
Uses a single IANA registered port (4880), which simplifies the configuration of firewalls
●
Supports simultaneous access of multiple users by providing versatile locking
mechanisms
●
Usable for IPv6 or IPv4 networks
Using VXI-11, each operation is blocked until a VXI-11 instrument handshake returns.
Using HiSLIP, data is sent to the instrument using the "fire and forget" method with
immediate return. Thus, a successful return of a VISA operation such as viWrite()
ensure only that the command is delivered to the instrument's TCP/IP buffers. There is
no confirmation that the instrument has started or finished the requested command.
For more information, see also the application note:
1MA208: Fast Remote Instrument Control with HiSLIP
2.1.3Socket communication
An alternative method of remote control of the product is to establish a simple network
communication using sockets. The socket communication, also referred to as "Raw
Ethernet communication", does not necessarily require a VISA installation on the
remote controller side. It is available by default on all operating systems.
The simplest way to establish socket communication is, to use a telnet program. The
telnet program is part of every operating system and supports a communication with
the software on a command-by-command basis. For more convenience and to enable
automation by programs, user-defined sockets can be programmed.
Socket connections are established on a specially defined port. The socket address is
a combination of the IP address or the host name of the instrument and the number of
the port configured for remote-control. Typically, the products of Rohde & Schwarz use
port number 5025 for this purpose. The port is configured for communication on a command-to-command basis and for remote control from a program.
2.1.4RSIB protocol
The RSIB protocol defined by Rohde & Schwarz uses the TCP/IP protocol for communication with the instrument. Remote control over RSIB is implemented on a message
level basis using the SCPI command set of the instrument. The RSIB protocol allows
you to control the instrument, for example:
81179.4592.02 ─ 02
Remote control interfaces and protocolsRemote Control via SCPI
LAN interface
●
Via Visual C++- and Visual Basic programs
●
Via the Windows applications Word and Excel
●
Via National Instruments LabView, LabWindows/CVI, Agilent VEE
The control applications run on an external computer in the network.
RSIB interface functions
The RSIB library functions are adapted to the interface functions of National Instruments for GPIB programming. The functions supported by the libraries are listed in the
following table.
FunctionDescription
RSDLLibfind()Provides means for access to an instrument.
RSDLLibwrt()Sends a zero-terminated string to an instrument.
RSDLLilwrt()Sends a certain number of bytes to an instrument.
RSDLLibwrtf()Sends the contents of a file to an instrument.
RSDLLibrd()Reads data from an instrument into a string.
RSDLLilrd()Reads a certain number of bytes from an instrument.
RSDLLibrdf()Reads data from an instrument into a file.
RSDLLibtmo()Sets timeout for RSIB functions.
RSDLLibsre()Switches an instrument to the local or remote state.
RSDLLibloc()Temporarily switches an instrument to the local state.
RSDLLibeot()Enables/disables the END message for write operations.
RSDLLibrsp()Performs a serial poll and provides the status byte.
RSDLLibonl()Sets the instrument online/offline.
RSDLLTestSrq()Checks whether an instrument has generated an SRQ.
RSDLLWaitSrq()Waits until an instrument generates an SRQ.
RSDLLSwapBytesSwaps the byte sequence for binary numeric display (only required for non-Intel
2.1.5LXI
LAN extensions for instrumentation (LXI) are an instrumentation platform for measuring
instruments and test systems that is based on standard Ethernet technology. LXI is
intended to be the LAN-based successor to GPIB, combining the advantages of Ethernet with the simplicity and familiarity of GPIB.
platforms).
The instrument's LXI browser interface works correctly with all W3C compliant browsers. Type the instrument's host name or IP address in the address field of the browser
to reach its web GUI.
91179.4592.02 ─ 02
The LXI web GUI often includes a SCPI command shell, so that you can send SCPI
commands to the instrument via the LXI web GUI in your browser.
2.1.6LAN interface messages
In the LAN connection, the interface messages are called low-level control messages.
These messages can be used to emulate interface messages of the GPIB bus.
CommandLong termEffect on the instrument
Remote control interfaces and protocolsRemote Control via SCPI
GPIB interface
&ABO
&DCL
>L
>R
&GET
&LLO
&NREN
&POL
AbortAborts processing of the received commands.
Device clearAborts processing of the received commands and sets
the command processing software to a defined initial
state. Does not change the instrument setting.
Go to localTransition to the "local" state (manual control). The instru-
ment automatically returns to remote state when a remote
command is sent UNLESS &NREN was sent before.
Go to remoteEnables automatic transition from local state to remote
state by a subsequent remote command (after &NREN
was sent).
Group execute triggerTriggers a previously active instrument function (e.g. a
sweep). The effect of the command is the same as the
effect of a pulse at the external trigger signal input.
Local lockoutDisables transition from remote control to manual control
via the front panel keys.
Not remote enableDisables automatic transition from local state to remote
state by a subsequent remote command. To reactivate
automatic transition, use >R.
Serial pollStarts a serial poll.
2.2USB interface
For remote control via a USB connection, the PC is connected to the instrument via the
USB type B interface of the instrument. A USB connection requires the VISA library to
be installed. VISA detects and configures the Rohde & Schwarz instrument automatically when the USB connection is established. You do not have to enter an address
string or install a separate driver.
2.3GPIB interface
(IEC 625 / IEEE 418 bus interface)
To be able to control the instrument via the GPIB bus, the instrument and the controller
must be linked by a GPIB bus cable. A GPIB bus card, the card drivers and the pro-
101179.4592.02 ─ 02
gram libraries for the programming language used must be provided in the controller.
The controller must address the instrument via the GPIB bus address.
Notes and conditions
In connection with the GPIB interface, note the following:
●
Up to 15 instruments can be connected
●
The maximum permissible cable length is product-specific.
●
A wired "OR"-connection is used if several instruments are connected in parallel.
●
Any connected IEC-bus cables must be terminated by an instrument or controller.
2.3.1GPIB instrument address
To operate the instrument via remote control, it must be addressed using the GPIB
address. For remote control, addresses 0 through 30 are allowed. The GPIB address is
maintained after a reset of the instrument settings.
Remote control interfaces and protocolsRemote Control via SCPI
GPIB interface
2.3.2GPIB interface messages
Interface messages are transmitted to the instrument on the data lines, with the attention line (ATN) being active (LOW). These messages are used for communication
between the controller and the instrument and can only be sent by a computer, which
has the function of a GPIB bus controller. GPIB interface messages can be further subdivided into:
●
Universal commands: act on all instruments connected to the GPIB bus without
previous addressing
●
Addressed commands: only act on instruments previously addressed as listeners
2.3.2.1Universal commands
Universal commands are encoded in the range 10 through 1F hex. They affect all
instruments connected to the bus and do not require addressing.
CommandLong termEffect on the instrument
DCL
IFC
Device clearAborts the processing of the commands received and
Interface clear
*)
sets the command processing software to a defined initial
state. Does not change the instrument settings.
Resets the interfaces to the default setting.
LLO
SPE
*) IFC is not a real universal command, it is sent via a separate line; however, it also affects all instruments
connected to the bus and does not require addressing
Local lockoutThe "Local" softkey is disabled. Manual operation is no
longer available until GTL is executed.
Serial poll enableReady for serial poll.
111179.4592.02 ─ 02
Remote control interfaces and protocolsRemote Control via SCPI
Drivers for graphical programming interfaces
CommandLong termEffect on the instrument
SPD
PPU
*) IFC is not a real universal command, it is sent via a separate line; however, it also affects all instruments
connected to the bus and does not require addressing
Serial poll disableEnd of serial poll.
Parallel poll unconfigureEnd of the parallel-poll state.
2.3.2.2Addressed commands
Addressed commands are encoded in the range 00 through 0F hex. To send these
commands, the GPIB controller must address the instrument (GPIB listeners) via GPIB
bus channel.
CommandLong termEffect on the instrument
GET
GTL
GTR
REN
PPC
SDC
Group execute triggerTriggers a previously active instrument function (e.g. a
Go to localTransition to the "local" state (manual control).
Go to remote
Remote enable
Parallel poll configureConfigures the instrument for parallel poll.
Selected device clearAborts the processing of the commands received and
sweep). The effect of the command is the same as the
effect of a pulse at the external trigger signal input.
Transition to the "remote" state (remote control).
sets the command processing software to a defined initial
state. Does not change the instrument setting.
2.4Drivers for graphical programming interfaces
Many Rohde & Schwarz customers prefer graphical programming interfaces when writing applications for the instruments. Examples for such interfaces are LabVIEW and
LabWindows/CVI from National Instruments or VEE from Agilent.
Rohde & Schwarz provides software device drivers free of charge for this purpose. The
drivers are available for download from www.rohde-schwarz.com/drivers-vs-plain-scpi.
121179.4592.02 ─ 02
Loading...
+ 26 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.