LeCroy, ProBus and SMART Trigger are registered trademarks, and ActiveDSO, ScopeExplorer, WaveAnalyzer and
Waverunner are trademarks, of LeCroy Corporation. Centronics is a registered trademark of Data Computer Corp. Epson
is a registered trademark of Epson America Inc. Mathcad is a registered trademark of MATHSOFT Inc. MATLAB is a
registered trademark of The MathWorks, Inc. Microsoft, MS and Microsoft Access are registered trademarks, and Windows
and NT trademarks, of Microsoft Corporation. PowerPC is a registered trademark of IBM Microelectronics. DeskJet,
ThinkJet, QuietJet, LaserJet, PaintJet, HP 7470 and HP 7550 are registered trademarks of Hewlett-Packard Company.
Manufactured under an ISO 9000
Registered Quality Management System
www.lecroy.com to view the
Visit
certificate.
LTXXX-RCM-E Rev B
This electronic product is subject to
disposal and recycling regulations
that vary by country and region.
Many countries prohibit the
disposal of waste electronic
equipment in standard waste
receptacles.
For more information about proper
disposal and recycling of your
LeCroy product, please visit
www.lecroy.com/recycle.
PROGRAM MESSAGES........................................................................................................................................6
COMMANDS AND QUE RIES............................................................................................................................7
HE ADERS .................................................................................................................................................................8
HE ADER PATHS.....................................................................................................................................................8
CHARACTE R DATA ..............................................................................................................................................9
NUMERIC DATA ....................................................................................................................................................9
BLOCK DATA ........................................................................................................................................................10
ADDRE SS ................................................................................................................................................................14
INTERFACE CL E AR ............................................................................................................................................16
CONFIGURE THE GPIB-DRIVE R SOFTW ARE .......................................................................................16
MAKE SIMPL E TRANSFERS............................................................................................................................17
USE ADDITIONAL DRIVER CALLS.............................................................................................................19
MAKE SERVICE REQUESTS ...........................................................................................................................19
Tak eInstrum ent Po lls ....................................................................................................................21
DO CONTINUOUS POL LING ........................................................................................................................21
TAK E A SERIAL POLL .......................................................................................................................................21
DO A PARAL L EL POLL .....................................................................................................................................22
PERFORM AN *IST POLL .............................................................................................................................. 24
Drive Hard-copy Devi c es o nth eGPIB ..........................................................................................25
READ DATA BY CONTROLLER .................................................................................................................... 25
SEND DATA TO BOTH ..................................................................................................................................... 25
TAL K DIRECTLY TO PRINTE R.....................................................................................................................26
CHAPTER THREE:
Communicat ethroughthe RS-232-C Port .....................................................................................29
HANDSHAKE CONTROL ................................................................................................................................29
EDITING FE ATURES.........................................................................................................................................30
MESSAGE TERMIN ATORS..............................................................................................................................30
LONG LINE SPL ITTIN G .................................................................................................................................. 31
LOGICAL DATA BLOCKS ................................................................................................................................ 35
INSPECT WA VEFORM CONTENTS ............................................................................................................. 36
USE THE W A VE FORM QUERY ......................................................................................................................37
INTERPRET VERTICAL DATA ......................................................................................................................39
CALCUL ATE A DATA POINT’S HORIZONTAL POSITION ............................................................... 40
USE THE W A VE FORM COMMAND .............................................................................................................42
Tra nsfer Waveforms at HighSpeed................................................................................................4 3
CH APTER FI VE:
Use Status Register s.......................................................................................................................45
OVE RVIEW ............................................................................................................................................................45
STATUS BYTE REGISTER (STB)....................................................................................................................47
STANDARD EVENT STATUS RE GISTE R (ESR) ...................................................................................... 47
STANDARD EVENT STATUS ENABLE REGISTE R (ESE )................................................................... 48
SERVICE REQUEST ENABL E RE GISTER (SRE )..................................................................................... 48
PARALLEL POLL ENABLE RE GISTE R (PRE) .......................................................................................... 48
INTERNAL STATE CHANGE STATUS REGISTE R (INR).....................................................................48
INTERNAL STATE CHANGE ENABL E REGISTER (INE ) ..................................................................49
COMMAND E RROR STATUS RE GISTE R (CMR)..................................................................................... 49
DEVICE DEPENDEN T ERROR STATUS RE GISTE R (DDR).............................................................. 49
EXECUTION E RROR STATUS REGISTER (EXR)................................................................................... 49
USER REQUEST STATUS REGISTER (URR).............................................................................................49
This manual explains how to remotely control the oscilloscope, using commands keyed into the external
controller. This controller will normally be a computer, although it could be a simple terminal.
The manual includes a complete list of the commands you’ll need to perform most Wave runner operations
(you can find commands for a few special, optional functions in the software option’s dedicated manual). The
manual has two main parts:
Part One, “A bout R emote C ont r ol,” covers the principles of remote control, and offers practical
examples.
Part Two, “C ommands ,” describes each of the remote control commands and queries for Waverunner
operations. It starts w ith two special indexes that list the commands by short name and by category. Use these
to find the command or query you wish to use.
See also the table of contents and the index at the back of the manual.
As an additional guide, each chapter is prefaced by a summary of its contents.
Wa tch for these icons and the information they signal:
s offer additional hints on how to get the most out of Waverunner actions or features.
TTIIPPs
s bring to your attention important information you should know.
NNOOTTEEs
See also Chapter 12, “U se Waver unner wit h PC,” in the Operator’s M anual.
LTXXX-RCM-E RevBISSUED: January 20021
BLANK PAGE
2ISSUED: January 2002L TXXX-RCM-E Rev B
A
A
P
P
B
B
T
AARRT
O
O
O
O
U
NNE
U
E
T
T
R
Part One of the manual explains how Waverunner operates under remote control. I t covers GPIB and
RS-232-C interfaces, the transfer and formatting of waveforms, and the use of status bytes in reporting
errors.
R
E
E
M
M
O
O
T
T
E
E
C
C
O
O
N
N
T
T
R
R
OLL
O
LTXXX-RCM-E RevBISSUED: January 20023
C HAPTER O NE:
In thi s chap te r, see how
To con stru ct pr o gr ammessages
To use comm an ds and queries
To include data, and mak e data strin gs
TouseScopeExplorer for remote control
Over view
4ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTERO NE
Over v iew
Oper ate W aver unn erbyRemo te Con tr ol
Yo ucan fully control you r Waverunner oscilloscop eremote lyby using either the GPIB (General Purpose
Interface Bus) port or the RS-232-C comm u nic a tion port on the scope rea r pan el, shown belo w. Theonly
actions for which you must use the front panel controls are the powe ring up of the scope and the setting of
remote addresses. Use L eCroy’s ScopeE xplorer software as the ideal interface between scope and PC (see page
11).
RS-232-C Port
Centronics Port
PowerInputBN C Signal Output
External MonitorPort
PC CardSlot
(Memory/ Hard-Disk card )
GPIB Port
Waverunner back panel , including t he G P I B and R S -232-C ports us ed in remot e cont rol .
: Use Waverunner Remote Control Assistant to monitor all your remote control operations. See the
TTIIPP:
COMM_HELP
command in Part Two of this manual, and Chapter 12 of the
Operator ’s Manual
,“Use
Waverunner with PC”.
LT3XX-RCM-E RevBISSUED: January 20025
P ART O NE: ABOUT REMOTE CONTROL
STANDARDS
*
LeCroy remote control commands conform to the GPIB IE E E 488.2
ex ten sionof the IEEE 488.1 standa rd, whic h dea ls mainly with ele ctrical andmech a n ical issue s. The IEEE
488.2 recommendations ha v ealso be e nadopted for RS-232-C comm un ications wh erever appropriate .
PROGRAM MESSAGES
Yo ucontrol the oscilloscop eremotelyusingprogrammessa g es that consist of one or sev eral commands or
qu e rie s . The program messa g e s yousend from the ex ternal controller to the W a v erunne r oscilloscop emu st
conform to precise format structures. The oscilloscope will execute all program messages sent in the correct
form, but will igno re those with errors.
You can use upper- or lowe r-case characters, or both, in program messages.
W a rningor error messag es are normally not reported unle ss the controller ex p licitlyexa m ine sthe rele v a n t status
register, or if the status-enable registers have been set so that the controller can be interrupted w hen an error
occurs. If you connect an external monitor to the W averunner’s RS-232-C port, how ever, yo uw ill be able to
observe all your remote control transactions, including error messages, as they happen. See the command
COMM_HELP in Part Two, “Commands.”
Program messages are separated by semicolons ; and end in a terminator:
The oscilloscop ew ill not decod ean incomingprogram messag ebefore rece i vingits terminator. The exception is
w h e nthe program mes sa g eis longe r thanthe 256 by te input buffer; thenthe oscilloscop ew ill start ana ly zingthe
message whe n the buffer is full. Commands and queries are executed in the order in w hich they are transmitted.
standard. This may be considered an
In GPIB mode, the follow ingare valid terminators:
<NL >New-line character (i.e. the ASCII new-line character, w hose decimal value is 10).
<NL >< EOI>New-line character with a simultaneous < EOI> signal.
<EOI> < E OI>Signal together w ith the last character of the program message.
The <NL > <EOI> terminator is always use d in resp on semes sa g e s sent by the oscilloscope to the controller.
In RS-232-C commu n ic a tions , you can de fine the terminator with the comman dCOMM_RS232. The default
value is <CR>, which is the ASCII carriage return charac ter, who sede cimal valu eis 13.
NNOOTTEE:
: T he < E OI> signal is a dedicated GPI B interface line, which can
be set witha special call to the GPIB inter face driv er. Referto theGPIB
in ter f ace manufacturer’s manual and supp o r t pr o gr am s .
*ANSI/IEE E Std. 488.2–1987, IE EE Standard Codes, Formats, Protocols, and Common Commands. The Institute of Electrical and Electronics E nginee rs
Inc., 345 E ast 47th Street, New York, NY 10017 USA.
6ISSUED: January 2002LTXXX-RCM-E RevB
C HAPTER O NE:
COMMAND S AND QUERIES
Program messages are made up of one or more commands or queries. While the command directs the
oscillosco p eto chang eits state (for ex a m p le, its timeba seor vertical sensitivity) the query ask s the oscillosc op e
about that state. Very often, you will use the same mnemonic for a command and a query , the query being
identified by a ? after the last character.
For ex a m p le, to chang ethe timeba seto 2 ms/div , send this comma n d to the oscilloscop e:
TIME_DIV 2 M
Or, to ask the oscilloscop eabo u t its timeb a se, send this query:
TIME_DIV?
A query causes the oscilloscop eto sen d a respon semess a g e. The control programshouldread this messa g ew ith
a ‘read’ instruction to the GPIB or RS-232-C interface of the controller.
Theresponsemessagetotheabovequerymightbe:
TIME_DIV 10 NS
The portion of the query preceding the question mark is repeated as part of the response message. If desired,
this text can besuppressed withthecommand COMM_HEADER.
Depending on the state of the oscilloscope and the computation to be done, several seconds may pass before a
response is received. Command interpretation does not have priority over other oscilloscope activities.
The general form of a command or a query consists of a command header, < header> , optionally followed by
one or several parameters, < data> , separated by commas:
Overview
<header>[?] < data>,...,< data>
The notation [?] shows that the question mark is optional (turning the command into a query).
There is a space between the header and the first parameter.
There are commas between parameters.
The following are examples of how program
messages are made up of commands and queries...
GRID DUAL: This program message consists of a
sing lecomma n d that instructs the oscilloscope to
display a dual grid.
The terminator is not show n , as it is usu ally automaticallyadd ed by the interfacedriver routine writing to GPIB
or RS232.
DZOM ON; DISPLAY OFF; DATE?:This program message consists of tw o commands, followed by a
query . They instruct the oscilloscope to turn on the multi-zoom mode, turn off the display , and then ask for the
current date. Again, the terminator is not shown.
DATE 15,JAN,1993,13,21,16: This command instructs the oscilloscope to set its date and time to 15
JAN 1993, 13:21:16. The comma n dhea d e r DATE indicates the action, the 6 data values specify it in detail.
LT3XX-RCM-E RevBISSUED: January 20027
: Set the controller I/ O timeout conditions
TTIIPP:
to thr e eormore seconds to giv ethescop etime
to respo n d. An incorr ect query will not get a
re sp o nse; and, if Remo te Con trol Assistant is
ena bled, a beep will sound.
P ART O NE: ABOUT REMOTE CONTROL
HEADERS
The hea d e r is the mnemon ic form of the operation to be pe rformed by the oscilloscope. Most comma ndand
query headers have a long form, which allows them to be read more easily, and a short form for better transfer
and decoding spee d. The two are fully equivalent and you can use them interchangeably. For example,
TRIG_MODE AUTO and TRMD AUTO are two separate but equivalent commands for switching to the
automatic trigger mode.
Some comman dor qu e ry mnemo nic s are impose dby the IEEE 488.2 standard. Theyare stand a rdize dso that
differen t oscilloscop es w ill presen t the same programminginterfacefor similar functions.All thesemnemo n ics
beginwithanasterisk* . For example, the command *RST is the IEEE 488.2 impose dmnem on ic for rese tting
the oscilloscope, whe reas *TST? instructs the oscilloscop eto perform an internal self-test andreport the
outcome.
HEADERPATHS
Certain commands or queries apply to a sub-section of the oscilloscope; for example, a single input channel or a
trace on the display . In such cases, you must prefix the heade r by a path name that indicates the channel or trace
to which the command applies. The header path normally consists of a two-letter path name followed by a
colon : immediately preceding the command heade r. One of the wave form traces can usually be specified in the
header path:
HEADER PAT H N AM EWAV E FOR M T RACE
C1, C2
C3, C4
M1, M2, M3, M4
TA, TB, TC, TD
EX, EX10, EX5
LINE
Example: C1:OFST -300 MVCommand to set the offset of Channel 1 to −300 mV.
You need only specify a header path once. Subsequent commands with header destinations not indicated are
assumed to refer to the last defined path. For example, the queries C2:VDIV?; C2:OFST? ask: What is the
vertical sensitivity and the offset of channel 2? While the queries C2:VDIV?; OFST? ask exactly the same
qu e stion without repe a tingthe path.
Channels 1 and 2
Channels 3 and 4 (on four-channel models)
Memories 1, 2, and3 an d4
Trac es A, B, C an dD
External trigger
LINE sourcefor trigger
8ISSUED: January 2002LTXXX-RCM-E RevB
C HAPTER O NE:
DATA
Whenever a command or query uses additional data values, the values are expressed as ASCII characters. There
is a single exception: the transfer of wave forms with the command/query WAVEFORM, where the wa veform can
be expressed as a sequence of binary data values. See Chapter 4, “Wavef or m St r uct ur e.” ASCII data can
have the form of character, numeric, string, or block data.
CHARACTER DATA
Thesearesimplewordsor abbreviationsto indicate a specific action.
Example: DUAL_ZOOM ON
In this example, the data value ON commands the dual zoom mode to be turned on (the data value OFF will
havetheoppositeeffect).
How eve r, this can become more complex. In some commands, where you can specify as many as a dozen
different parameters, or wherenot all theparametersareapplica ble at thesametim e, theformat re quires pairs of
data values . The first value names the parameter to be modified, while the second gives its value. Only those
parameter pairs changed need to be indicated.
Example: HARDCOPY_SETUP DEV,EPSON,PORT,GPIB
In this example, two pairs of parameters have been used. The first specifies the device as an EPSON (or
compatible) printer, w hile the second indicates the GPIB port. While the command HARDCOPY_SETUP allow s
many more parameters, either they are not relevant for printers or they are left unchanged.
Overview
NUMERIC DATA
The numeric data type is used to enter quantitative information. Numbers can be entered as integers or
fractions,or in exponential representation:
TA:VPOS -5Move the displaye d trace of Trace A downw ards by five divisions.
C2:OFST 3.56Set the DC offset of Channel 2 to 3.56 V.
TDIV 5.0E-6Adjust thetimebaseto5µsec/div.
Example: There are many way s of setting the timebase of the oscilloscope to 5 µsec/div:
TDIV 5E-6Exponential notation, without any suffix.
TDIV 5 USSuffixmultiplierU for 1E −6, with the(optional) suffixS for seconds.
or
TDIV 5000 NS
TDIV 5000E-3 US
Yo ucan follow nume ric value s with multiplie rs and units, to modify the valu eof the nu merical ex p re ssio n.The
following mnemonics are recognized:
LT3XX-RCM-E RevBISSUED: January 20029
P ART O NE: ABOUT REMOTE CONTROL
MULTIPLIERE XP .NOT E.SUFFIXMULTIPLIERE XP.NOTE .SUFFIX
EX1E18Exa-PE1E15PetaT1E12Tera-G1E9GigaMA1E6Mega-K1E3k iloM
N
F
STRIN G DATA
Thisdata type enables youto transfera (long) stringof characters asasingleparameter. Simplyenclose any
sequence of ASCII characters betwee n single or double quotation marks:
MESSAGE ‘Connect probe to point J3’
The oscilloscope displays this message in the Message field above the grid.
BLOCK DATA
These are binary data values coded in hexade cimal ASCII: four-bit nibbles translated into the digits 0 through 9
or A through F, and transmitted as ASCII characters. They are used only for the transfer of wa veforms from
Wa verunner to controller (WAVEFORM) and for Wa verunner panel setups (PANEL_SETUP)
RESPONSE MESSAGES
The oscilloscope sends a response message to the controller in answ er to a query . The format of such messages
is the same as that of program messages: individual responses in the format of commands, separated by
semicolon s ; and ending in terminators. These messages can be sent back to the oscilloscope in the form in
which they were received, to be accepted as valid commands. In GPIB response messages, the < NL > < E OI>
terminator is alwa ys used.
1E−3
1E−9
1E−15
milli-U
nano-PI
femto-A
1E−6
1E−12
1E−18
micropicoatto-
Example: The controller sends the program message:
TIME_DIV?;TRIG_MODE NORM;C1:COUPLING? (terminator not shown).
The oscilloscope might respond to this with:
TIME_DIV 50 NS;C1:COUPLING D50 (terminator not shown) .
The response message refers only to the queries: TRIG_MODE is left out. If this responseis sent backto the
oscillosco p e, it is a valid program messa g efor setting its timebase to 50 ns/div and the inp u t couplin gof
Channel 1 to 50 Ω.
Whenever you expect a response from the oscilloscope, you must have the control program instruct the GPIB
or RS-232-C interface to rea dfrom the oscilloscop e. If the controller sends another program message without
reading the response to the previous one, the response message in the output buffer of the oscilloscope will be
10ISSUED: January2002LTXXX-RCM-E Rev B
C HAPTER O NE:
disca rde d . The oscilloscope kee ps to stricter rules for resp on seme ssa g e sthan for acc e p tan ceof program
messages. While you can send program messages from the controller in upper- or lower-case characters,
response messages are always returned in upper-case. Program messages may contain extraneous spaces or tabs
(white space), but response messages will not. And while program messages may contain a mixture of short and
long command or query heade rs, response messages alwa ys use short headers by default.
How eve r, you can use the command COMM_HEADER to force the oscilloscopeto uselong hea ders, or noneat
all. If the response header is omitted, the response transfer time will be minimized. But the response will not be
ableto be sent back to the oscilloscope. Suffix units are also supp resse d in the response .
If you were to set the trigger slope of Channel 1 to negative, the query C1:TRSL? mig ht yie ld the following
response s:
Overview
C1:TRIG_SLOPE NEGhea der format: long
C1:TRSL NEGhea der format: short
NEG
header format: off
: Wav efo r m s you obtain fromthe
TTIIPP:
oscilloscope using the query
WAVEFORM?
a special kind of response message. Control
theirex act for m at by using the
COMM_FORMAT
an d
COMM_ORDER
are
commands.
USE SCOPEEXPLORER
ScopeExplorer is an easy-to-use and practical software tool for interfacing your W ave runner oscilloscope with a
PC running Windows:
1.Connect the scope to a PC using either the GPIB (you’ll need a PC with GPIB card installed) or PCstandard RS-232-C port on the scope ’s rea r pan el.
2.DownloadScopeExplo rer free of ch argeat http:/ / www.lecroy .com/ scopeexplorer. Or inquire at your
LeCroy customer service center.
3.Having installed ScopeExplorer, open it as you would any Windows program. Use its on-line help to do the
follow in g :
Use the teletype-like terminal to send standard remote control commands from computer to
oscillosco p e, an dto displa ythe W a v erunne r respon seon the PC.
Control the scope by means of an interactive, virtual scope front panel.
Pipe sequences of commands from a file to the scope, then send the scope’s responses to another file.
Transfer pixel-for-pixel copies of your Wa verunner display to PC, then view them, print them, or both
from the computer. With a single press of a button or key , you can copy bitmap wave form images to
the Windows Clipboard, ready to paste into any Windows application.
Capture Wa verunner front panel setups and, using a long filename, store them on the computer. You
can then transfer them back into the scope to reproduce an identical setup.
Transfer your waveforms to PC, and store them in either the compact L eCroy Binary format, or an
ASCII version compatible with PC-based analysis products.
LT3XX-RCM-E RevBISSUED: January 200211
C HAPTER T WO:
In thi s chap te r, see how
To address yo urWav er un n erscope forGPIB
Toconfi gureGPIB softwa re
To enable remote or local control
To mak e transfer s of data
To makeservice reque sts
To poll Waverunner
To driv e har dcopy devices
ControlbyGPIB
12ISSUED: January2002LTXXX-RCM-E Rev B
C HAPTERT WO
ControlbyGPIB
Talk, L isten, or Control
Yo ucan remotelycontrol you r W a v e runn e r oscilloscope, usingthe Gene ra l PurposeInterfaceBus (GPIB).
GPIB is similar to a standard computer bus. But while the computer interconnects circuit cards by means of a
bac k plane bus, the GPIB interconn e cts inde p endent devices (os cillos copes and compute rs, for ex a m p le) by
means of a cable bus. GPIB also carries both program and interface messages.
Progr ammessages, often called device dependent messages, contain programming instructions, measurement
results,and oscilloscopestatus and wa v eform data.
Interface messages manage the bus itself. They perform functions such as initialization, addressing and
“unaddressing” of devices, and the setting of remote and local modes.
TALK, LIST EN, OR CONTROL
On the one hand, devices connected by GPIB to your Wa verunner oscilloscope can be listeners, talkers, or
controllers. A talker sends program messages to one or more listeners, w hile a controller manages the flow of
information on the bus by sending interface messages to the devices. The host computer must be able to play
all three roles. For details of how the controller configures the GPIB for specific functions, refer to the GPIB
interface manufacturer’s manual.
On the other hand, the Waverunner can be a talker or listener, but
IN T ERFACE
W averunne r interface cap abilities includethe following IEEE 488.1 de finitions:
AH1Complete Acceptor HandshakeDC1CompleteDeviceClearFunction
SH1Complete Source HandshakeDT1Comp lete DeviceTrigger
L4Partial Listener FunctionPP1Parallel Polling : remo te configurable
T5Comp le te Talke r FunctionC0No Controller Functions
SR1Comp le te Service Reque s t FunctionE2Tri-stateDrive rs
RL1Complete R emote/Local Function
LTXXX-RCM-E RevBISSUED: January 200213
NOT a controller.
P ART O NE: ABOUT REMOTE CONTROL
ADDRE SS
Every device on the GPIB has an address. To address Wa verunner, set the remote control port to GPIB by
means of thescope ’s front pane l UTILITIES button and on-scree nmen u s .If yo usele ct “RS-232” in the same
way, the oscilloscop ew ill execute over the GPIB solely“talk-only ” operations,such as driving a printer. Setting
W averunne r to “RS-232” enab le sthe oscilloscop eto becontrolled throughtheRS-232-C port. See Chapter 12
of the Operator’s M anual for how to do this.
If youaddre ss Wa v e runn e r to talk, it will rema in in that state until it receives a uni versal untalk comma n d
(UNT), its ow n listen address (ML A), or ano ther oscillosco p e’s talk addres s .
If youaddre ss Wa v e runn er to listen, it w ill rema inconfiguredto listen until a univ e rsa l unlisten comma n d
(UNL ), or its own talker address (MTA), is received.
GPIB SIGNAL S
The GPIB bus systemconsists of 16 signal lines and eigh t ground or shieldlines .The signa l lines are divided
into three groups:
Data Lines:Theseeig h t lines , usua llycalle d DI01 throughDI08, carry both prog ramand interface messag es.
Most of the messages use the 7-bit ASCII code, in which case DI08 is unused.
Handshake Lines:These three lines control the transfer of message bytes between devices. The process is
called a three-wire interlocked handshake, and it guarantees that the message bytes on the data lines are sent
and received without transmission error.
Inter face Management Lines: These five lines manage the flow of information across the interface:
ATN (ATteNtion): The controller drives the ATN line true when it uses the data lines to send interface
mes sa g es suchas talk and listen addresses or a deviceclea r (DCL ) messa g e. WhenATN is false, the bus is in
data mode for the transfer of program messages from talkers to listeners.
IFC (InterFaceClear):The controller sets the IFC line true to initialize the bus.
RE N (RemoteENable): The controller uses this line to place devices in remote or local program mode.
SRQ (ServiceReQues t ): AnydevicecandrivetheSRQlinetruetoasynchronouslyrequest servicefromthe
controller. This is the equivalent of a single interrupt line on a computer bus.
EOI(End Or Identify):This line has tw o purposes: The talker uses it to mark the end of a message string.
The controller uses it to tell devices to identify their response in a parallel poll (discussed later in this section).
I/O BUFFE RS
The oscilloscope has 256-byte input and output buffers. An incoming program message is not decoded before
a message terminator has been received. However, if the input buffer becomes full (because the program
mes sa g eis longe r than the buffer),the oscilloscop estarts analy z ingthe messa ge. In this casedata trans miss ion
is temp o rarilyhalted , and the controller maygen e ratea timeo u t if the limit was set too low.
14ISSUED: January2002LTXXX-RCM-E Rev B
C HAPTER T WO:
USE IE E E 488.1 STAN DARD M E SSAGE S
The IEEE 488.1 stand a rd specifies not onlythe mech a n ical andele ctrical asp ects of the GPIB, but also the
low-level transfer protocol. For instance, it defines how a controller addresses devices, turns them into talkers
or listeners, resets them or puts them in the remote state. Such interface messages are executed with the
interface management lines of the GPIB, usually with ATN true.
ControlbyGPIB
All these messages except GET are executed
immediately upon receipt.
The command list in Part Two of this manual does
not contain a command for clearing the input or
output buffers, nor for setting the oscilloscope to the
remote state.
This is because such commands are already specified as IEEE 488.1 standard messages. Refer to the GPIB
interface man u al of the host controller as w e ll as to its supp ort progra ms , whic h should contain spec ia l calls for
theexecutionof thesemessages.
The following description covers those IEEE 488.1 standard messages that go beyond mere reconfiguration of
the bus and that have an effect on Wave runner operation.
DEVICE CLEAR
In response to a universal Device CLear (DCL ) or a Selected Device Clear message (SDC), Wave runner clears
the input or output buffers, cancels the interpretation of the current command (if any) and clears pending
commands. However, statusregisters and status-enableregisters arenot cleared. Although DCL will have an
immediate effect, it can take several seconds to exe cute if the oscilloscopeis busy.
GROUP EXECUTE TRI GGER
The Group E xecute Trigger message (GET) causes Waverunner to arm the trigger system, and is functionally
ide ntica l to the *TRG command.
N OT E : In addition to the IE E E 488.1 interface
message standards, the IE E E 488.2 standard
specif ies certainstandar dized pr ogrammessages,
i.e., comm and h eader s. Theyare iden tified witha
leadin g asterisk * and are listed in the System
Commands section.
RE MOT E ENABL E
This interface message is executed when the controller holds the Remote ENable control line (RE N) true,
allowing you to configure the oscilloscope as a listener. All the front panel controls except the menu buttons
are disabled. The menu indications on the right-hand side of the screen no longer appea r, since menus cannot
now be operated manually . Instead, the text REMOTE E N ABL E appears at the top of the menu field to
indica te that the oscilloscop eis set in the remote mode . When e v er the controller returns the RE N line to false,
all oscillosco pes on the bus return to GO TO LOCAL.
When you press the GO TO LOCAL menu button, the scope returns to front panel control, unless you have
pla ced the oscillosco p ein Local LOckout (LLO) mode (seebelo w).
LTXXX-RCM-E RevBISSUED: January 200215
P ART O NE: ABOUT REMOTE CONTROL
The Go To Local message (GTL) causes the oscilloscopeto return to local mode . All front pa n e l controls
become active and the normal menus reappe ar. Thereafter, whene ver the oscilloscope is addressed as a listener
it will be immediately reset to the remote state, except when the LL O command has been sent.
When you activate Local Lockout the scope can only be returned to its local state by returning the L LO to
false.Whene v er youreturn the oscillosco p eto the remote state the local lockou t modewill immedia te ly
becom eeffective again.
The L ocal LOckout message (L L O) causes the GO TO LOCAL menu to disappear. You can send this message
in local or remote mode. But it only becomes effective once you have set the oscilloscope in remote mode.
INTERFACE CLEAR
The InterFace Clear message (IFC) initializes the GPIB but has no effect on the operation of the Wa verunner.
NNOOTTEE:
: To illu strate theGPIB progr amming concep ts a nu mberof examples writteninBASICA are
included here. It is assumed that the controller is IBM- PC compatible, running under DO S, and that
it is equipp ed with a N ational Instrumen ts GPIB interface card. Neverth eless, GPIB pro gram m in g
withotherlanguages such as C orPascal is quite similar . If yo u’re using ano th ertype of comp uteror
GPIB interface, refe rto the interface manual forinstallatio npr o ced ur es and subro utine calls.
CONF IGURE TH E GPIB DRIVER SOFTWARE
1.Verify that the GPIB interface is properly installe d in the computer . If it is not, followthe interface
man u facture r’s installation instructions. In the caseof the National Instruments interface , it is pos sibleto
modify the base I/ O address of the board, the DMA channel number, and the interrupt line setting using
switches and jumpers. In the program examples below, default positions are assumed.
2.Connect Wave runner to the computer with a GPIB interface cable.
3.Set the GPIB address to the required value. The program examples assume a setting of 4.
The host computer requires an interface driver that handles the transactions betwe en the operator’s programs
and the interface board.
In the caseof the National Instrume n ts interface , the installation proced u re will:
a.CopytheGPIB handler GPIB.COM into theboot director y.
b.Modify the DOS system configuration file CONFIG.SYS to declare the presence of the GPIB handler.
c.Crea te a sub-directory calle dGPIB-PC, and install in GPIB-PC a numb e r of files and programs useful for
testing and reconfiguring the system, and for writing user programs.
The following files in the sub-directory GPIB-PC are particularly useful:
IBIC.EXE allows interactive control of the GPIB by means of functions entered at the keyboard. Use of this
program is highly recommended to anyoneunfamiliar with GPIB programming or w ith Wave runner’s remote
commands.
16ISSUED: January2002LTXXX-RCM-E Rev B
C HAPTER T WO:
DE CL.BAS is a declaration file that contains code to be included at the beginning of any BASICA application
program.Simpleapplicationprograms can bequicklywritten byappendingtheoperator’s instructionsto
DECL.BAS andexecuting thecompletefile.
IBCONF.EXE is an interactive program that allows inspection or modification of the current settings of the
GPIB handler. To run IBCONF.EXE, refer to the National Instruments manual.
ControlbyGPIB
NNOOTTEE:
: I n the program examples in this section, it is assumed that the N ational Instruments GPIB
driv erGPIB.COM is in its default state, i.e., that the user has no t modified it with IBCONF.E XE .
T his means that the interface board can be referred to by the symbolic name ‘GPIB 0’ and that devices
onthe GPIB bus withaddresses between1and 1 6can be called by the sym bol ic names ‘DEV1 ’ to
‘DEV1 6 ’. If you h av ea NationalInstruments PC2 in ter f ace card r ath erth anPC2A, yo u must run
IBCONF to declare th epresen ceof thi s card ratherthanthe defau l t PC2A.
MAKE SIMPLE TRANSFERS
For a large number of remote control operations it is sufficient to use just three different subroutines
(IBFIND, IBRD and IBWRT) provide d by National Instrume n ts. The following complete program rea d s the
timebase setting of Waverunner and displays it on the terminal:
Lines 1–99 are a copy of the file DECL .BAS supplied by N ational Instruments. The first six lines are required
for the initialization of the GPIB handler. The other lines are declarations w hich may be useful for larger
programs, but are not really required code. The sample program above only uses the strings CMD$ and RD$,
which are declared in DE CL .BAS as arrays of 255 characters.
Lines 100 and 110 openthe deviceDEV4 and associatewith it thedescriptor SCOPE%. All I/O calls after that
w ill refer to SCOPE%. The default configuration of the GPIB handler recognizes DEV4 andassocia tes with it a
device with the GPIB address 4.
Lines 120 and 130 prepare the command string TDIV? and transfer it to the oscilloscope. The command
instructs the oscilloscope to respond with the current setting of the timebase.
LTXXX-RCM-E RevBISSUED: January 200217
P ART O NE: ABOUT REMOTE CONTROL
Lines 140 and 150 read the response of the oscilloscope and place it into the character string RD$.
Line 170 displays the response on the terminal.
NOTE: DECL.BAS requ ires acce ss to the file BIB.M du ring the GPIB initializa tion. BIB.M
is one of the files supplied by N ational Instruments, and it must exist in the directory
currently in use.
Thefirst two linesof DE CL.BAS both contain astring XXXXX, whichmustbe replaced bythenumber of
bytes that determinethemaximum workspace for BASICA (computed bysubtracting thesizeof BIB.M from
the spa cecurrently availa b lein BASICA). For ex a m p le, if the size of BIB.M is 1200 bytes , and whe nBASICA
is loaded it repo rts “60200 bytes free,” you should rep la ce“XXXXX” bythe value 59 000 orless.
When running this sample program, Wa verunner w ill automatically be set to the remote state w hen IBWRT is
exe cuted, and will remain in that state. Pressing the LOCAL menu button will return Wa verunner to local mode
if the GPIB handler was modified to inhibit L ocal LOckout (LL O). Here is a slightly modified version of the
sample program that checks if any error occurred during GPIB operation:
TheGPIB statuswordISTA%, the GPIB error variable IBERR% and the count variable IBCNT% are defined
by the GPIB handler and are updated with every GPIB function call. Refer to the National Instruments manual
for details. The sample program above w ould report if the GPIB address of the oscilloscope was set to a value
other then 4. L ine 180 resets the oscilloscope to local with a call to the GPIB routine IBLOC.
18ISSUED: January2002LTXXX-RCM-E Rev B
C HAPTER T WO:
USE ADDIT I ONAL DRIVER CALLS
IBLOC is used to execute the IE EE 488.1 standard message Go To L ocal (GTL), i.e. it returns the
oscillosc op eto the loca l state. The programmin gexample aboveillustrates its use.
IBCLR executes the IE EE 488.1 standa rd messa g eSelectedDeviceClear (SDC).
IBRDF and IBWRTF, respe ctively , allowdata to be read from GPIB to a file, and w ritten from a file to
GPIB. Transferring data directly to or from a storage device does not limit the size of the data block, but
may be slow e r than transferring to the computer memory .
IBRDI andIBWRTI allowdatatobereadfromGPIBtoanintegerarray,andwrittenfromintegerarray
to GPIB. Since the integer arrayallows storageof up to 64 kiloby tes (in BASIC), IBRDI and IBWRTI
should be used for the transfer of large data blocks to the computer memory , rather than IBRD or
IBWRT, w h ichare limited to 256 by tes by the BASIC string length. Note that IBRDI andIBWRTI only
exist for BASIC, since for more modern programming languag es, such as C, the functions called IBRD
andIBWRT are far less limited in da ta blocksize .
IBTM O can be used to change the timeout value during program execution. The default value of the
GPIB driver is 10 seconds — for example, if the oscilloscop edoe s not respo n d to an IBRD call, IBRD
will return with an error after the specified time.
IBTRG executes the IEEE 488.1 stand a rd messa g eGroup Exe cu te Trigge r (GE T), wh ichcaus e s
Waverunner toarm the trigger system.
National Instruments supply a number of additional function calls. In particular, it is possible to use the socalle dboard leve l calls , wh ichallowa very detaile dcontrol of the GPIB.
ControlbyGPIB
NOTE: Th eSRQ bit is latch e dunti lthe con troll e rread s the STatus Byte Register(STB). Th eaction
of reading the ST B with the command
*STB?
clears the r egiste rcon te nts ex cept th eMAV bit (bit 4)
until a n eweven t occurs. Service requesting can be disabled by clearin g the SRE register
w i ththe
MAKE SERVICE REQUESTS
When a W ave runner is used in a remote application, events often occur asynchronously, i.e., at times that are
unpredictab lefor the host computer.The most common ex a m p leof this is a trigge r w a it after the oscilloscop e
is armed: the controller must wait until the acquisition is finished before it can read the acquired wa veform.
The simplest way of checking if a certain event has occurred is by either continuously or periodically reading
the status bit associa te d with it until the required transition is detected. Continuous status bit pollingis
described in more detail below. For a complete explanation of status bits refer to Chapter 5.
Perhaps a more efficient wa y of detecting events occurring in the oscilloscope is the use of the Service Reque st
(SRQ). This GPIB interrupt line can be use dto interrupt program ex ecution in the controller. The controller
can thenex e c u te other program s w h ilew a iting for the oscilloscope. Unfortuna te ly, not all interface
manufacturers support theprogrammingof interrupt service routines. In par ticular, NationalInstruments
supports only the SRQ bit within the ISTA% status word. This requires you to continuously or periodically
LTXXX-RCM-E RevBISSUED: January 200219
*SRE 0 command.
P ART O NE: ABOUT REMOTE CONTROL
check this word, either explicitly or with the function call IBWAIT. In the absence of real interrupt service
routines the use of SRQ may not be very advantageous.
In the default state, after pow er-on, the Service ReQuest is disabled. You enable SRQ by setting the Service
Request E nable register with the command “*SRE ” and by specifying which event should generate an SRQ.
Wa verunner will interrupt the controller as soon as the selected event(s) occur by asserting the SRQ interface
line. If several devices are connected to the GPIB, you may be required to identify which oscilloscope cause d
the interrupt by serial pollingthe various device s .
Example:To assert SRQ in response to the events “new signal acquired” or “return-to-local” (pressing the
soft key/ menu button for GO TO L OCAL).T hese events are tracked by the INR register, which is ref lected in
the SRE register as the INB summary bit in position 0. Since bit position 0 has the value 1, the command
*SRE 1 enables the generation of SRQ whe never the IN B summary bit is set.
In addition, the events of the INR register that may be summarized in the INB bit must be specified. The
event “new signal acquired” corresponds to INE bit 0 (value 1) while the event “return-to-local” is assigned to
INE bit 2 (value 4). The total sum is 1 + 4 = 5. Thus the command INE 5 is needed:
CMD$=“INE 5;*SRE 1”
CALL IBWRT(SCOPE%,CMD$)
Example:To assert SRQ whe n soft key4 (fourth menu button from top of screen) is pressed. The event “soft
key4 pressed” is tracked by the URR register. Since the URR register is not directly reflected in STB but only in
the ESR register (URR, bit position 6), the E SE enable register must be set first with the command *ESE 64
to allow the URQ setting to be reported in STB. An SRQ request will now be generated provided that the ESB
summary bit (bit position 5) in the SRE enable register is set (*SRE 32):
CMD$=“*ESE 64;*SRE 32”
CALL IBWRT(SCOPE%,CMD$)
NNOOTTEE:
: The term “soft-key,” used her e in refer en ce to r em ote oper ation s, is syno n y m o us with “men u
button ,” used in the accom p anyin g Oper ato r’s Manual to meanfront panel operation s. Both term s
refer to the column of seven buttons running parallel to the screen on the Waverunner front panel and
th emenu fun ctions th e ycontro l .
20ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER T WO:
ControlbyGPIB
Take Instrumen t Polls
Youcan regularlymonitor state transitions withintheoscilloscopebypolling selected internal status registers.
Thereare four ba sic pollingmethods you can useto detec t the occurrence of a giv e nevent: continuou s , serial,
pa rallel, an d *IST. By far the simplest of these is continuous polling. The others are appropriate only when
interrupt-service routines (servicing the SRQ line) are supported, or multiple devices on GPIB require constant
monitoring. To emphasize the differences betwe en the methods, described below, the same example
(determining whether a new acquisition has taken place) is used in each case.
DO CONT IN UOUSPOLLIN G
A status register is continuouslymonitoreduntil a transition isobserved. This isthemost straightforward
method for detecting state changes , but may not be practical in certain situations, especially with multiple
device configurations.
In the followin gexample,the even t “newsigna l acqu ired ” is obse rved by continuouslypollin gthe INternal
state change Register (INR) until the corresponding bit (in this case bit 0, i.e., value 1) is non-zero, indicating a
new wavefor m has been acquired. Reading IN R clears this at the same time, so that there is no need for an
additional clearing action after a non-zero value has been detected. The command CHDR OFF instructs the
oscillosco p eto omit anycomma ndhea d e rs whe nresponding to a query , simplifying the decoding of the
resp on se. The oscilloscop ew ill then sen d “1” instead of “INR 1”:
CMD$=“CHDR OFF”
CALL IBWRT(SCOPE%,CMD$)
MASK% = 1‘New Signal Bit has value 1’
LOOP% = 1
WHILE LOOP%
CMD$=“INR?”
CALL IBWRT(SCOPE%,CMD$)
CALL IBRD(SCOPE%,RD$)
NEWSIG% = VAL(RD$) AND MASK%
IF NEWSIG% = MASK% THEN LOOP% = 0
WEND
TAKE A SER IAL POLL
Serial pollin gtak es pla ceoncethe SRQ interrupt line has beenasse rted, and is only adv a n tag e o u s whe nyouare
usingsev e ra l oscilloscope s at once. Thecontroller finds wh ichoscilloscop ehas gene rate d the interrup t by
inspecting the SRQ bit in the STB register of each. Because the service request is based on an interrupt
LTXXX-RCM-E RevBISSUED: January 200221
P ART O NE: ABOUT REMOTE CONTROL
mec h a n ism , seria l pollin goffers a reas on a b lecomp romisein terms of servicing spee din multiple -de vice
configurations.
In thefollowingexample, thecommandINE 1 enables the event “new signal acquired” to be reported in the
INR to theINB bit of thestatus byteSTB.Thecommand*SRE 1 enables the INB of the status byte to
generate an SRQ wheneve r it is set. The function call IBWAIT instructs the computer to wa it until one of
three conditions occurs: &H8000 in the mas k(MASK%) correspond s to a GPIB error, &H4000 to a timeou t
error, and &H0800 to the detection of RQS (ReQue s t for Service) generated by the SRQ bit.
Whe never IBWAIT detects RQS it automa ticallype rforms a serial poll to find out w h ic h oscilloscop egen e ra ted
the interrupt. It w ill onlyexit if there w as a timeou t or if the oscillosco p e(SCOPE%) generated SRQ. The
additional function call IBRSP fetches the value of the status byte, which may be further interpreted. For this
to wo rk properlythe valueof “Disable Auto Serial Polling ” must be set to “off ” in the GPIB handler (use
IBCONF.EXE to check):
CMD$=“*CLS; INE 1; *SRE 1”
CALL IBWRT(SCOPE%,CMD$)
MASK% = &HC800
CALL IBWAIT(SCOPE%,MASK%)
IF (IBSTA% AND &HC000) <> 0 THEN PRINT “GPIB or Timeout Error” : STOP
CALL IBRSP(SCOPE%,SPR%)
PRINT “Status Byte =.”, SPR%
Board-le vel function calls can dea l simu ltaneously with seve ra l oscilloscopes attache d to thesameinterface
board. Refer to theNational Instruments manual.
NOTE: After the serial po ll is comp leted, the RQS bit in the STB status register is cleared. N ote that
the otherSTB registerbits rem ainset until theyare cleared by mean s of a “* CL S” comm and or the
oscilloscopeis reset. If these bits are no t cleared, theycann o t gener ate anoth erinterrup t.
DO A PARALLEL POLL
Like serial polling , this is onlyuse ful w ith several oscilloscopes. Thecontroller simultane ously rea d s the
Individua l STatus bit (IST) of all oscilloscopes to determine whic h one need s service. This method allow s up
to eight different oscilloscop e s to be polled at the sametime .
When a parallel poll is initiated, each oscilloscope returns a status bit over one of the DIO data lines. Devices
ma yrespo ndeither individ u a lly, usinga sep a rateDIO line , or collectively on a singledata line . Data-line
assignments are made by the controller using a Parallel Poll Configure (PPC) sequence.
In thefollowingexample, thecommandINE 1 enables the event “new signal acquired” in the INR to be
reported to the INB bit of the status byte STB. The PaRallel poll Enable register (PRE ) determines which
events w ill be summarized in the IST status bit. The command *PRE 1 ena bles the INB bit to set the IST bit
22ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER T WO:
w h e n ever it is itself set. Once pa rallel pollin ghas be e nestablish e d , the pa rallel-poll status is exam in e duntil a
change on data bus line DI02 takes place.
Stage 1
1.Enablethe INE and PRE reg isters
2.Configure the controller for parallel poll
3.Instruct Wa verunner to respond on data line 2 (DI02) with these commands:
In the above example, board-level GPIB function calls are used. It is assumed that the controller (board) and
Wa verunner (device) are respectively located at addresses 0 and 4.
LTXXX-RCM-E RevBISSUED: January 200223
P ART O NE: ABOUT REMOTE CONTROL
The listener and talker addresses for the controller and Waverunner are:
L OGIC DEVICELISTEN ER ADDR ESSTAL KER ADDR ESS
External Controller32 ASCII<space>)64(ASCII @ )
W averunne r32+4= 36 (ASCII $)64+4=68 (ASCII D)
PERFOR M AN *IST PO LL
Yo ucan also read the state of the Individua l STatus bit (IST) returnedin parallel pollin gby sendin gthe
*IST? query. To enable this poll mode, you must intialize Waverunner as for parallel polling by writing into
thePR E register.Since*IST emulates parallel polling, apply this method whe rever parallel polling is not
supported by the controller. In the following example, the command INE 1 enables the event “new signal
acquired” in the INR to be reported to the INB bit of the status byte STB. The command *PRE 1 enables
the INB bit to set the IST bit wheneve r it is set. The command CHDR OFF suppresses the command header
in the oscilloscop e’s respons e ,simplifying the interpretation. The status of the IST bit is then continuou sly
monitoreduntil set bythe oscilloscop e:
CMD$=“CHDR OFF; INE 1; *PRE 1”
CALL IBWRT(SCOPE%,CMD$)
LOOP% = 1
WHILE LOOP%
CMD$=“*IST?”
CALL IBWRT(SCOPE%,CMD$)
CALL IBRD(SCOPE%,RD$)
IF VAL(RD$) = 1 THEN LOOP% = 0
WEND
N OT E : T he characters “?” and “_” appearing in the command strings stand for unlisten and untalk
r e spectiv e l y. The yar eused to set thedevi ce s to a “known” state. To shortenthesize of th epr ogr am
ex am p l es, device talking and listen in g initialization instructions ha v e beengro up ed into char acter
chains. T hey are:
CMD1$ = “?_@$” Unlisten, Untalk, PC talker, DSO listener.
Theremotemessagecodeforexecutingaparallelresponseinbinaryformis01101PPP,wherePPP
specifies the data line. Because data line 2 is selected, the identification code is 001, which results in
the code 011 01 001(binary) or &H 69 (hex). See Table 38 of the IE E E 488-1978 Standard
forfurtherdetails.
24ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER T WO:
ControlbyGPIB
Dr iveHard-cop yDev ices onth e GPIB
Yo ucan interface yo u r Waverunne r oscillosc op e with a w id erangeof hard-copydevic e s, suc h as printers and
plotters, and copy the screen contents to them. L ist the devices supported using the command
HARDCOPY_SETUP.
With a hard-copy device connected to the GPIB, you can use either of two basic configurations. When only
Wa verunner and a hardcopy device such as a printer are connected, you must configure the oscilloscopeas
talker-only, and the hardcopy device as listener-only, to ensure proper data transfer. However, when an external
controller is connected to the GPIB, you must use this controller to supervise the data transfers. You can then
use a variety of schemes to transfer Waverunner screen contents.
Configure W ave runner as talker-only w ith its front panel controls. The hardcopy device manufacturer usually
spe c ifies an addres s that forces the oscilloscop einto listeningmode, an d youcan select this as w ell as the other
nece ssa ry settings using the same menus . See Chapter 6, “Document Your Work” of t he Opera tor’ sManual.
Use the following schemes for driving hard copy devices by remote control using GPIB.
READDATA BY CONTROLLER
The controller reads the data into internal memory , then sends them to the printer. You can arrange this with
simp lehigh-le v e l GPIB function calls.The controller stores the full set of printer instructions and afterw a rds
sends them to the graphics device. This method is the most straightforwa rd w ayto transfer screen contents,
but requires a large amount of buffer storage:
Wa verunner sends data to both controller and printer. The oscilloscope puts the printer instructions onto the
bus. The data is directly put out and saved in scratch memory in the controller. The contents of the scratch file
can be deleted later:
a.The controller goes into a standby state.
b.Waverunner becomes a talker and sends data directly to the printer.
c.The controller goes into standby and resumes GPIB operations once the data have been printed, i.e., when
In the second and third schemes presented above, board-level GPIB function calls are used. It is assumed that
the controller (board), Wa verunner and the printer are respectively located at addresses 0, 4, and 5.
The listener and talker addresses for the controller, Wa verunner, and printer are as follows:
L OGIC DEVICEL ISTE NE R ADDRE SSTAL KER ADDR ESS
Controller32 (ASCII< space >)64 (ASCII @ )
W averunne r32+4=36 (ASCII $)64+4= 68 (ASCII D)
Printer32+5=37 (ASCII %)64+5=69 (ASCII E)
The characters “?” and “_” appea ring in the command strings stand for unlisten and untalk respectively . They
are used to set the devices to a “ known” state.
26ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER T WO:
To shorten the size of the program examples, device talking and listening initialization instructions have been
grouped into character chains. They are:
CMD1$ = “?_@$”Unlisten, Untalk , Controller talke r, Waverunn e r listene r
CMD2$ = “?_ D”Unlisten, Untalk , Controller listene r, Waverunn e r talke r
ControlbyGPIB
LTXXX-RCM-E RevBISSUED: January 200227
C HAPTER T HREE:
In thi s chap te r, see how
To control Waverunner by RS-232-C
To simulate GPIB messages using RS-232-C
Control by RS232
28ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTERT HREE
ControlbyRS232
Com m un icate th r oughth e RS-232-C Port
Yo u r Waverunne r oscilloscope can also be controlled remo telythrough the RS-232-C port, w h ic h supp o rts the
transfer of all commands for its operation. Nevertheless, RS-232 w ave form transfer is only possible in HEX
mode, using the default value for COMM_FORMAT, and with the syntax of the response to WF? identical to
that f or GPIB.
RS-232-C connector pin assignments for connecting W ave runner to an external controller are given in Chapter
12, “U se Waverunner with PC ” of the W averunner Operator’s M anual.
The RS-232-C port is full-duplex configured.This means that both sides — W a v erunne r oscilloscope and
external controller — can send and receive messages at the same time. Howe ver, the oscilloscope stops
outputting w hen it receives a new command.
Yo u should transmit long mess ag es to the oscilloscopewh ileit is in a trigger mode , and not wh ilean
acquisition is in progress. This is especially important when sending wave forms or front panel setups.
Characters that cannot be printed in ASCII are here represented by their mnemonics. For example:
<L F>ASCII line feed character whose decimal value is 10.
<BS>ASCII backspace character whose decimal value is 8.
CTRL_UThe control key and the U key are pressed simultaneously .
Set RS-232-C beh avior acco rdingto your ne e d s .In addition to the basic setup on the front pane l menu , there
are “immediate commands,” as well as the special command COMM_RS232 for this. Immediate commands
consist of the ASCII E SCape character < E SC> (w hose decimal value is 27), followe d by another character.
These commands are interpreted as soon as the second character has been received.
You can have the serial port echo the received characters. This is useful when the oscilloscope is connected to a
terminal. Echoing can be turned on or off by sending the tw o-character sequence < ESC> ] or < ESC> [.
Echoingis on by defau lt, but the host must not ech ochara cters rece iv ed from the oscillos cope.
HAN DSHAKE CONTROL
When the oscilloscope intake buffer becomes nearly full, the instrument sends a handshake signal to the host
tellingit to stop transmitting. Whenthis buffer has enough room to rece iv emore characters,anothe r
handshake signal is sent. These signals are either the CTRL-S (or < XOFF>) andCTRL-Q (< XON > )
characters, or a signal level on the RTS line. They are selected by sending the two-character sequence < ESC> )
for XON/ XOFF handshake (the default), or <ESC> for the RTS handshake.
You can control the flow of characters coming from the oscilloscope by either a signal level on the CTS line or
the<XON >/<XOFF> pair of characters.
LTXXX-RCM-E RevBISSUED: January 200229
P ART O NE: ABOUT REMOTE CONTROL
NNOOTTEE:
: T he RS-232-C baud rate, parity, character length, and number of stop bits are among the
parameters saved or recalled by the front panel SAVE or RE CAL L buttons, and by the remote
commands
*SAV,*RCL
,or
PANEL_SETUP
. When recalling by remote, ensure that these parameters
areset at th e samevalue on both con trolleran d oscill o sco p e. Otherwise, the ho st maynolongerbe
abl eto com mun ica te withth eoscill oscop eanda m anual reco nfigurationwouldbe nece ss ary.
E DIT ING F EATU RES
When the oscilloscope is directly connected to a terminal, the following will make correction of typing errors
easier:
<BS> or <DELETE>Delete the last character.
CTRL_UDelete the last line.
MESSAGE TE RMINATORS
Message terminators are markers that indicate to the receiver that a message has been completed. The Program
Message Terminator is a character you could select whe n you input to the oscilloscope. Choose a character
never used for anything else, using the command COMM_RS232 and the keyword EI. The default Program
Message Terminator is the ASCII character <CR> , whose decimal value is 13.
The oscilloscope appends a Response Message Terminator to the end of each of its responses. This is a string,
similar to a computer prompt, which you also choose. This string must not be empty. The default Response
Messa geTerminator is \n\r,whichisthesameas<LF><CR>.
Example: COMM_RS232 EI,3
This comma n d informs the oscilloscope that eachmessage it rece iv e s will be terminatedwith the ASCII
character <E TX> , whose decimal value is 3.
Example: COMM_RS232 EO,”\r\nEND\r\n”
This command indicates to the oscilloscope that it must appe nd the string “\r\nEND\r\n” to each response.
After you make these settings, a host command will look like this:
beha vio rbefor e it can send a com m an d in the new mode. E nsur e this by includin g a query onthe line
that con tains the
COMM_RS232
comm an d (forexam ple,
COMM_RS232 EI,3;*STB?
) and w aitin g
un til the re sp o nse is receiv ed .
SRQ MESSAGE
Eachtime theMaster Summary Status (MSS)bit of theSTatus Byte(STB)is set, theSRQ message(astring of
cha ra cters)is sent to the host to indicate that the oscilloscoperequ ests service. The RS-232-C SRQ messa g e
has the same meaning as the GPIB SRQ message. If the string is empty , no message will be sent. This is the
default setting . Note that no response message terminator is added at the end of the SRQ message.
Example: COMM_RS232 SRQ, “\r\n\nSRQ\r\n\a”
Whe n the MSS bit is set, the oscilloscop ew ill sen d a <CR> followed bytwo < LF>SRQ, and a < CR> followed
by a <L F>. The buzzer will sound.
LONG LINE SPLITTING
Line splitting is a feature provided for hosts that cannot accept lines w ith more than a certain number of
cha rac ters.The oscilloscope maybe configu redto split respon se s into manylines. This fea ture is ve ry useful for
wa veform or front panel setup transfers although it is applicable to all response messages. Two parameters
control this feature:
Line Separator:Off
- messages will not be split into lines.
<CR>,<LF> or <CR><LF>
- possible line terminators.
Line L ength:the maximum number of characters to a line.
Example: COMM_RS232 LS,LF,LL,40
The line separator is the ASCII character < L F>, the line is a maximum of 40 characters long (excluding the
line separator).
If the oscilloscope receives the command PNSU?, it may answe r with:
Long comma n d s sent to the oscilloscopemaynot be split into lines . If a comma ndsent to the oscilloscop eis
the resp on seto a previousque ry, the line-split charac ters (<LF>, <CR>) must be remov e d . This also app lies to
line -split chara cters insidestrings sent to the oscillosco p e.
How ever, hex -ASCII data sent to theoscilloscop ema ycontain line -sp lit characters . If youw ish to use line
splitting, ensure that neither the input message terminator characters nor the line-split characters occur in the
data.
32ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER T HREE:
Control by RS232
Sim ulate GPIB Messages
Use these RS-232-C command s to simula te GPIB 488.1 me ssa g es:
RS232 COMMAN DGPIB M E SSAGEEFFE CT AND E QUI VALE N CE
<ESC>C or < E SC> cDevice Clear (DCL )Clears the input and output buffers. This command
has the same meaning as the GPIB DCL or SDC
interface message s .
<E SC> R or < ESC>rRemo te E nable(RE N)Place s the oscilloscop ein remo te mode .This
command’s function is the same as the GPIB
command asserting the REN line and setting the
oscillosc op eto listener.
<E SC> L or <ESC>lGo to L ocal (GTL)Place sthe oscilloscop ein local mode. Thecomman d
clears local locko ut (seebelow). It has the same
function as GPIB’s setting the REN line to false.
<ESC>F or <ESC>fL ocal L ockout (LLO)Disables the front panel “ L OCAL” button
imme d ia telyif the oscilloscopeis alrea dyin remote
modeor, if not, wh e nthe oscilloscop eis next set to
remote. This Local L ockout (see Chapter 2, “Cont r ol
by GPI B” ) can be cance lle donly with the <ESC>L
command. < ESC>F has the same meaning as GPIB’s
LLO interfacemessage.
<ESC>T or <ESC>tGroupExecute Trigger
(GE T)
LTXXX-RCM-E RevBISSUED: January 200233
Re-arms the oscilloscopew hileit is in the STOP mode ,
but only while the oscilloscope is in remote mode. This
command has the same meaning as the *TRG
command and GPIB’s GET interface message.
C HAPTER F OUR:
In thi s chap te r, see how
Tolea rnhowwavefo rmsare structured
To inspect w av efo rmconten ts
To tran sf erw aveforms rapidly
Un der stan d and Manage Wavef or m s
34ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTERF OUR
Und erstan d andMan age Wav ef o r ms
Kn owYo urWaveform
A wave form can be said to have tw o main parts. The first is its basic data array: rawdata values from the
oscillosco p e’s ADCs (Analog-to-Digital Conve rters) obtaine d in the wa v e form’s cap ture . Thesecondis the
description that accompanies this rawdata: the vertical and horizontal scale or time of day , for examp le,
necessary for a full understanding of the information contained in the waveform.
You can access this information by remote control using the INSPECT? query (seepage36), which interprets
it in an easily understood ASCII text form. And you can rapidly transfer the information using the
WAVEFORM? que ry (seepag e37). Or w rite it bac kinto the oscilloscopew ith the WAVEFORM command (pag e
42).
Yo u r Waverunne r oscilloscope contains a data structure, or template (se eAppendix II), whichprovide s a
de taile ddescrip tion of howwaveform information is organize d . Althoug ha sampletemp la te is provided with
this manual, we suggest you use the TEMPLATE? query to access the Waverunner template in the oscilloscope
itself (the template may change as your oscilloscope’s firmware is enhanced).
You can also store wave forms in preformatted ASCII output, for popular spreadsheet and math processing
packa ges , using the STORE and STORE _SE TUP commands. Also see Chapter 12, “U se Waver unner
with P C ,” of the Operat or’s M anual.
LOGICAL DATA BLOCKS
Each of your wave forms w ill normally contain at least a w ave form descriptor and data array block. Howeve r,
other blocks may also be present in more complex wave forms.
Waveform Descriptor block (WAVE DE SC): This include s all the information neces sa ry to recon stitute the
display of the wave form from the data, including: hardw are settings at the time of acquisition, the exact time of
the event, kinds of processing performed, your oscilloscope name and serial number, the encoding format used
for the data blocks, and miscellaneous constants.
Option al User-pro v ided Text block (USE RT E XT): UsetheWFTX commandto put atitleor descriptionof
a wa veform into this block, and the WFTX? queryforanalternativewaytoreadit.Thistextblockcanholdup
to 160 characters. Display them as four lines of 40 characters by selecting “Text & Times”fromthestatus
menu, using Waverunner front panel controls (see the Operat or’s M anual).
Sequence Acquisitio nTimesblock(TRIGTIME): This is needed for sequence acquisitions to record the
exact timing information for each segment. It contains the time of each trigger relative to the trigger of the
first segment,as well asthetime of thefirst data point of eachsegment relativeto its trigger.
Randominterleav ed samplin g times block (RISTIME ): This is required for RIS acquisitions to record the
exact timing information for each segment.
LTXXX-RCM-E RevBISSUED: January 200235
P ART O NE: ABOUT REMOTE CONTROL
First data arrayblo ck (SIMPL E orDATA_ARRAY_1 ): This is the basic intege r data of the w aveform. It
can be raw or corrected ADC data or the integer result of w ave form processing.
Secon ddataarray block(DATA_ARRAY_2 ): This is a second data array , needed to hold the results of
processing functions such as E xtrema or FFT math functions:
E XT R E M AFFT
N OT E : T he Waverunner template
also describes an arr aynamed DUAL.
DATA_ARRAY_1Roof traceReal part
DATA_ARRAY_2Floor traceImaginary part
Butthisissimplyawaytoallowthe
INSPECT?
command to examine the
tw odata arrays together.
IN SPECT WAVE F ORM CON TENTS
UsetheINSPECT? query to examine the contents of your w ave form. You can use it on both of the main
waveformparts. Its most basic formis: INSPECT? “name”, the template giving you the name of a
descriptor item or data block. The answer is returned as a single string, but may cover many lines. Some typical
dialogue follows:
QuestionC1:INSPECT? “TRIGGER_TIME”
ResponseC1:INSP “TRIGGER_TIME: Date = FEB 17, 1994, Time =4: 4:29.5580”
You can also use INSPECT? to provide a readable translation of the full w ave form descriptor block using
INSPECT? “WAVEDESC”. Again , the temp latewill give youthe details for interpretation of ea c hof the
parameters. Use, too, INSPECT? “SIMPLE” to examine the measured data values of a waveform. For an
acquisition with52 points, for example:
INSPECT? “SIMPLE”
C1:INSP “
0.00052250.0006475
0.0001475
−0.000915−0.001 79−0.0002275
−0.00179−0.0002275
0.00027250.00077250.00071
0.00052250.00046
0.001335
−0.000665−0.001 665−0.0001025
−0.0009158.50001E−0
“
−0.0013525 −0.00204−4E−05
−0.0009775 −0.001915−0.000165
−0.00029−0.0009152.25 001E−0
0.000710.00096
−0.00104−0.00154
0.0008350.00 05225
0.00114750.00114 75
0.00114750.00108 5
−0.0003525 −0.00104
−0.0003525 −0.00129−0.0002275
0.00052250.00127 25
0.00127250.00096
0.00102250.00096
0.000835
−0.00079
−0.0003525
36ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER F OUR:
The numbers in the table above are the fully converted measurements in volts. When the data block contains
thousands of items the string will contain a great many lines.
Depending on the app lication, you may prefer the data in its raw form, with either a BYTE (8 bits) or a
WORD (16 bits) for each data value. In that case, use the relations INSPECT? “SIMPLE”,BYTE wit h
WAVEFORM?. The examination of data values for waveforms with two data arrays can be performed as
follow s:
INSPECT? “DUAL”to get pairs of data values on a single line
INSPECT? “DATA_ARRAY_1”to get the values of the first data array
INSPECT? “DATA_ARRAY_2”to get the values of the second data array.
INSPECT? has its limitations; it is useful, but also wordy. As a query only, INSPECT? cannot be used to send
a wa veform back to the oscilloscope . If you want to do this and you want the information quickly, you should
instead use WAVEFORM.WithWAVEFORM_SETUP it is possible to examine just a part of the wave form or a
sparsed form of it. See the following pages.
If you’re a BASIC user you might also find it convenient to use INSPECT? and WAVEFORM? together to
construct files containing a version of the w ave form descriptor that both you and BASIC can read. Using a
stored w ave form, this can be done in a format suitable for retransfer to Wa verunner with MC:INSPECT?“WAVEDESC”;WAVEFORM?, and then placin gthe resp o ns edirectly into a disk file.
USE TH E WAVE FORM QUERY
Under stan d and Manage Waveform s
UsetheWAVEFORM? que ry to transfer waveform data in blockformats defined by the IEE E-488.2 standa rd.
You can then download the response back to your Wave runner by using the WAVEFORM command. All your
waveform’s logic al blocks canbereadwith the query C1:WAVEFORM? Comple ten e ss, as well as time and
space are the advantages of this approach w hen you have to read many waveforms with the same acquisition
conditions, or when you are interested only in large amounts of raw integer data. Moreover, you can choose
anysingleblockforreadingwithaquerysuchasC1:WAVEFORM? DAT1. See Part Tw o for the various block
names.
You can place the binary response to a query of the
form C1:WAVEFORM? or C1:WAVEFORM? ALL
in a disk file, then dump it using the GPIB bus. Do
this w ith default settings to show the hexadecimal
andASCIIform,asonthefollowingpage.
LTXXX-RCM-E RevBISSUED: January 200237
: A w av efo rmqueryrespo n se can easily be
NNOOTTEE:
a block containin g ov er1 6 million bytes if it is in
binary format, and twice as much if the H E X
option is used.
Above: T o illustrate the contents of the logical block s, the relevant parts have beenseparated. T o
ma ke counting easier, the corresponding Byt e Offset numbering has been restarted each time a new
block begins. T he A SC II t ranslation, only part of which is shown, has been similarly split and
highlighted, showing how its parts correspond to the binary con tents.
38ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER F OUR:
Under stan d and Manage Waveform s
On thefacing page... The first 10 by tes transla te into ASCII and resem b lethe simple beg inn ingof a query
response. These are followed by the string #9000000450, the beginning of a binary block in which nine
ASCII integers are used to give the length of the block (450 bytes). The wa veform itself starts immediately
after this, at Byte 21. The very first byte is 0, as it is for the first by te in each block.
The first object is a DE SCRIPTOR_NAME, a string of 16 characters with the value WAVEDESC.
Then, 16 bytes after the beginning of the descriptor, at Byte 37, w e find the beginning of the next string: the
TE MPLATE_NAME with the valu eLECROY_2_2.
Several other parameters follow. TheINSTRUMENT_NAME, LECROYLT344, 76 bytes from the descriptor
start (Byte 97), is easilyrecogn izable. On the preced in gline,38 bytes after the de scrip tor (Byte 59), a four
-byte
integer gives the leng th of the descriptor: WA VE_DESCRIPTOR = 00 00 01 5A (he x )= 346.
At 60 bytes from the descriptor start (Byte 81) we find another four
-byteinteger givingthelengthof thedata
array : WA VE_ARRAY_1 = 00 00 00 68 (he x )= 104.
And at 116 bytes after the descriptor (Byte 137), yet another four-byte integer gives the number of data points:
W AVE_ARRAY_COUNT = 00 0000 34 (hex )= 52.
Noww ekno wthat the data will start at 346 by tes from the des crip tor’s be g inn in g(Byte 367), and that eachof
the 52 data points will be repres e n tedby tw o bytes. The waveform has a total length of 346 + 104, w hic his the
same as the ASCII string indicated at the beginning of the block. The final 0A at Byte 471 is the NL character
associa ted with the GPIB messageterminator <NL > < E OI>.
As the example was tak e nusing an oscilloscop ew ith an eight-bit ADC, weseethe eigh t bits follow e dby a 0
byte for each data point. Howe ver, for many other kinds of wa veform this second byte will not be zero and w ill
contain significant information. The data is coded in signed form (two’s complement) with values ranging from
−32768 = 8000 (hex) to 32767 = 7FFF (he x ). If wehadchosen to use the BYTE option for the data format,
thevalues would havebeen signed integers in therange −128 = 80 (h e x )to 127 = 7F (hex ) . The ADC valu e s
aremappedtothedisplaygridinthefollowingway:
0 is located on the grid’s center axis
127 (BYTE format) or 32767 (WORD format) is locatedat the top of the grid
−128 (BYTE format) or −32768 (WORD format) is located at the bottom of the grid.
IN T ERPRET VERT ICAL DATA
Knowing now how to decipher the data, you may wish to convert it to the appropriate measured values. The
vertical reading for each data point depends on the vertical gain and the vertical offset given in the descriptor.
For acquisition w aveforms, this corresponds to the volts/div and voltage offset selected after conversion for
thedata representationbeingused.Thetemplatetellsus that thevertical gain and offset can befoundat Bytes
156 and 160 and that they are stored as floating point numbers in the IE E E 32
-bit format. An ASCII string
givin gthe vertical unit is to be foun din VE RTUNIT, Byte 196. Thevertical valueis given bythe relationsh ip :
value = VER TICAL _GAIN × data − VERT ICAL _OFFSET,where:
LTXXX-RCM-E RevBISSUED: January 200239
P ART O NE: ABOUT REMOTE CONTROL
VERTICAL_GAIN2.44141e−07 from the floa ting point number 3483 126f at Byte 177
VERTICAL_OFFSET0.00054 from the floating point numbe r 3A0D 8EC9 at Byte 181
VE RTI CAL_UNITV = volts from the string 5600 ... at Byte 217
Therefore:
sincedata[4] =FA00 = 64000 from the hexadecima l wo rd FA00 at by te371. Overflow s
the max im u m . 16 bit valueof 32767, so must be a nega tivevalu e. Using
the two ’s comp lement conversion 64000−2
value[4] =−0.000915 V as stated in the inspec t comman d .
If the computer or the software available is not able to understand the IEE E floating point values, use the
descriptioninthetemplate.
The data values in a waveform may not all correspond to measured points. FIRST_VAL ID_PNT and
LAST_VAL ID_PNT give the necessary information. The descriptor also records the SPARSING_FACTOR,
the FIRST_POIN T, and the SE GMENT_INDEX to aid interpretation if the options of the
WAVEFORM_SETUP command have been used.
For sequence acquisitions the data values for each segment are given in their normal order and the segments
are read out one after the other. The important descriptor parameters are the WAVE _ARRAY_COUNT and
the SUBARRAY_COUNT, giving the total number of points and the number of segments.
16
= −1536
For waveforms such as the extrema and the complex FFT there w ill be tw o arrays — one after the other — for
thetwo of theresult.
CAL CULATE A DATA POINT ’S HORIZ ONTAL POSITION
Each vertical data value has a corresponding horizontal position, usually measured in time or frequencyunits.
The calculation of this position depends on the type of wa veform. Each data value has a position, i, in the
original waveform, with i = 0 corresponding to the first data point acquired. The descriptor parameter
HORUN IT gives a string with the name of the horizontal unit.
Single Sweepwaveforms:x[i] = HORIZ_INTE RVAL × i+ HORIZ_OFFSE T.For acquisitionwaveforms
this time is from the trigger to the data point in question. It will be different from acquisition to acquisition
since the HORIZ_OFFSET is measured for each trigger. In the case of the data shown above this means:
HORIZ_INTERVAL =1e−08 from the floating point number 322b cc77 at Byte 194
HORIZ_OFFSET =−5.149e−08 from the double precision floating point number be6b a4bb
51a0 69bb at Byte 198
HORUN IT = S =seconds from the string 5300 ... at Byte 262
Thisgives:x[0] =−5.149e−08 S
x[1] =−4.149e−08 S.
40ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER F OUR:
Under stan d and Manage Waveform s
Sequence wav efo rm s: are really many independe nt acquisitions, so each segment will have its ow n horizontal
offset. These can be found in the TRIGTIME array .
Forthen’th segment:
x[i,n] =HORIZ_IN TERVAL × i + TRIGGE R _OFFSET[n].
The TRIGTIME array can contain up to 200 segments of timing information with tw o eight-byte double
prec isio n floating point numbers for each segm e n t.
RIS (RandomInterleav ed Samplin g) wav eform s:arecomposedof manyacquisitionsinterleaved together.
The descriptor parameter, RIS_SWE EPS gives the number of acquisitions. The i’th point will belong to the
m’th segment w here:
m = i modulo (RIS_SWE EPS) w ill have a value betwee n 0 and RIS_SWE E PS −1.
Thenwith:j = i − m
x[i] = x[j,m] =HORIZ_INTERVAL × j + R IS_OFFSET[m],
whe re the RIS_OFFSETs can be found in the RISTIME array . There can be up to 100 eight
-byte double
prec isio n floating point numbers in this block. The instrumen t tries to get seg ments with times such that:
RIS_OFFSET[i] ≅ PIXE L _OFFSE T + (i − 0.5) × HORIZ_INTERVAL.
Thus,takingas an example aRIS with RIS_SWEEPS = 10, HORIZ_INTE RVAL = 1 ns,and
PIXE L _OFFSE T = 0.0, we might find for a particular event that:
Waveforms you read with the WAVEFORM? query (page 37)
can be sen t backinto y o u r Waverunne r oscilloscope using
WAVEFORM and related commands. Since the descriptor
contains all of the necessary information, you need not be
concerned with any of the communication format parameters.
The oscilloscop ew ill learn all it needs to knowfrom the
wavef or m.
To ensure that the descriptor is coherent, however, when you synthesize waveforms for display or comparison
read out a w ave form of the appropriate size and then replace the data with the desired values.
Here are among the many ways to use WAVEFORM and its related commands to simplify or speed up w ork:
Partial Wav efo r mReadout: UseWAVEFORM_SETUP to specify a short part of a wave form for readout, as
well as to sele ct a spa rsing factor for read ingev e ry n’th da ta point only.
Byte Swapping: The COMM_ORDER comm a n d allows y outo swap twobytes of data presen tedin 16
format, in the descriptor or in thethe data/time arrays, w h en sendingthe data via GPIB or RS-232-C ports.
Depending on the computer system used, this w ill allow easier data interpretation. For Intel
you should send the data with the LSB first; the command should be CORD LO.ForMotorola
computers, send the data with the MSB first (CORD HI) — the default at power-up.
NNOOTTEE:
: Data writtentoWaverunnerharddiskorfloppydrive,orto the optionalPC memorycard
drive, will always remain in L SB first, the default DOS format. T hus you cannot use the
: Because w av ef o r m s can onlybe sent
TTIIPP:
backto Waverunn ermemorytr ace s(M1 ,
M2,M3, M4),consider removing or
ch anging thepr e f i x(C1or
intheresponsetothe
CHANNEL_1
WF?
query. See
Part Two for exam p les.
-bit word
-based computers,
-based
CORD
command in these cases, as it is only for data sent via the GPIB and RS-232-C ports.
Data Length, Blo ckFor mat, and Enco di ng: COMM_FORMAT gives you control over these parameters.
If you do not need the extra precision of the low er order byte of the standard data value, the BYTE option
will enable you to save by a factor of two the amount of data transferred or stored. If the computer you are
using cannot read binary data, the HEX option allows a response form in which the value of each byte is given
by a pair of hexadecimal digits.
)
Data- O nly Transfers: COMM_HEADER OFF enables a response to WF? DAT1 with data only (the C1:WF
DAT1 will disapp ear). If yo uhav ealso spe c ified COMM_FORMAT OFF,BYTE,BIN, the resp onsewill be
data bytes only (the #90000nnnnn will disappe a r — see page 38).
Formatting for RS-232-C Users: TheCOMM_RS232commandcanassist bysplittingtheverylongWF?
response into individual lines.
42ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER F OUR:
Under stan d and Manage Waveform s
Tr ansferWav efor ms at HighSpeed
You must take several important factors into account if you wish to achieve maximum, continuous data
trans fer rates from your W a v erunne r oscilloscop eto the ex ternal controller. The single most important of
these is to limit the amount of work done in the computer. This means that you should avoid writing data to
disk wherever possible, minimize operations such as per-data-point computations, and reduce the number of
callsto theI/O system. To do this, youcan try thefollowing:
Reduce the numberof points to be tran sfer r ed and the num berof data bytes perpoin t. Thepulse
pa ra meter capa b ility and the processin gfunctions can savea grea t dea l of comp uting anda lot of data
transfer time if employed creatively.
Attem pt to ov e rlap wa veform acquisi tion withwavef ormtransfer. The oscillosco p eis capa b leof
transferring an already acquired or processed waveform after a new acquisition has been started. T he total
time that Waverunner takes to acquire events will be considerably increased if it is obliged to wait for
trigge rs (livetime) .
Minimize the number of w av efo rmtran sfer s by using Sequence mode to accumulate manytriggers
for ea chtransfer. This is preferableto usin gWAVEFORM_SETUP to reduce the number of data points for
transfer. It also significantly reduces oscilloscope transfer overhead. For example, you could use
ARM; WAIT;C1:WF? (wait for the event, transfer the data, and then start a new acquisition). You
could also “loop” this line in the program as soon as it has finished reading the wave form.
LTXXX-RCM-E RevBISSUED: January 200243
C HAPTER F IVE:
In thi s chap te r, see how
To use status r e gisters
Ch eck Wavef or mStatus
44ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTERF IVE
Ch eck Wavefo r mStatus
UseStatusRegisters
A wide range of status registers allows you to quickly determine Wave runner internal processing status at any
time. These reg isters and theoscilloscop e ’s status reporting system, whichgroup rela tedfunctions toge ther, are
de signed to complyw ith IEEE 488.2 recom m e n d a tions. Some , such as the Status Byte Reg iste r (STB) or the
Stand a rd Even t Status Registe r (ESR), are req u ire d by the IE EE 488.2 Stand a rd. Others are devic espe cific,
including the Command Error Register (CMR) and E xecution E rror Register (EXR). Those commands
asso c ia te d with IEEE 488.2 ma nd atory status reg iste rs are prece d ed by an asterisk (*).
OVERVI EW
The Standard Event Status Bit (E SB) and the Internal Status Change Bit (INB) in the SBR are summary bits of
the ESR and the Internal State Change Register (IN R). The Message Available Bit (M AV) is set whenever there
are data bytes in the output queue. The Value Adapted Bit (VAB) indicates that a parameter value wa s adapted
during a previous command interpretation. For example, if the command TDIV 2.5 US was received, the
timebase wou ld be set to 2 ms/ div along with the VAB bit.
The Master Summary Status bit (MSS) indicates a request for service from the oscilloscope. You can only set
the MSS bit if you have enabled one or more of the other STB bits with the Service Request E nable Register
(SRE ).
All Enable registers (SRE, ESE and INE) areused to generate a bit-wise AND with their associatedstatus
regis ters.The logical OR of this ope ration is repo rted to the STB reg ister . At power-on, all Ena blereg isters are
zero, inhibiting any reporting to the STB.
The E SR primarily summarizes errors, whe reas the INR reports internal changes to the instrument. Additional
details of errors reported by E SR can be obtained with the queries CMR?, DDR?, EXR? and URR?.
The register structure contains one additional register, not shown on the next page (Fig.1). This is the Parallel
Poll Enable Registe r (PRE), w h ich behaves ex a ctly like the SRE, but sets the “ist” bit usedin the Parallel Poll.
Read the“ ist” bit with t he*IST? query.
Example: If you were to send the erroneous command TRIG_MAKE SINGL E to your Waverunner, the
oscillosco p ewould reject it and set the CommandError Register (CMR) to the value1 (unreco g n ized
command/query header). The non-zero value of CMR would be reported to Bit 5 of the Standard Event
Status Register (ESR), which is then set. Nothing further w ould occur unless the corresponding Bit 5 of the
Standard Event Status Enable Register (ESE) was set with the command *ESE 32, enabling Bit 5 of E SR to
be set for reporting to the summary bit ESB of the STB.
LTXXX-RCM-E RevBISSUED: January 200245
0
&
S
S
PowerO N
2
121
&
&
User request ()
Comma nd error found ()
Execution errordetecte d ()
Device specific error()
Query error
Request control (unused)
Operationcomplete
7
5
6
4
2
3
0
1
URR?
CMR?
DDR?
EXR?
&
LogicalOR
7
Service
Request
Generation
Logical OR
&
0
1
&
&
tandard E vent
Status Register
*ESR?
Read by
InternalState
Change Register
INR?
Read by
Logical OR
15
Status Byte Register
Read by Serial Poll
*STB?
Read by
Service Request
Enable Register
*SRE n
Setby
*SRE?
Read by
eecommandfor theinterpretation of thebits.
INR
110 94
&
&
1211
109
&
315
&
&
3
4
2
Internal St ate Change
Enable Register
INE n
Setby
INE?
Read by
&
01
1
&
&
&
&
&
&
56
RQS
7
MSS
&
3
Standard Event
Status E nable Regi ster
*ESE n
Set by
Read by
ESB
MAVVABINB
&
124
*ESE?
3
&
&
7
5
4
2
3
0
1
F igure 1.S tatus Register S tructure
46ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER F IVE:
If you enabled the setting of the ESB summary bit in STB, again nothing would occur unless you enabled
further reporting by setting the corresponding bit in the Service Reque st Enable Register with the command
*SRE 32. The generation of a non-zero value of CMR w ould ripple through to MSS, generating a Service
Request (SRQ).
You can read the value of CMR and simultaneously reset to zero at any time with the command CMR?.The
occurrence of a command error can also be detected by analyzing the response to *ESR?. However, if you
must survey several types of potential errors, it is usually far more efficient to enable propagation of the errors
of interest intotheSTB with theenableregisters ESE and INE.
To summarize: a command error (CMR) sets Bit 5 of ESR if
a.Bit 5 of ESE is set, ESB of STB is also set, or
b.Bit 5 of SRE is set, MSS/ RQS of STB is also set and a Service Request is gene rated.
STATUS BYTE REGISTER (STB)
STB is the W ave runner central reporting structure. It is made up of eight single-bit summary messages, three
of which are unused, that reflect the current status of the oscilloscope ’ s associate d data structures:
Bit 0 is theINB summarybit of theI nternal StateChangeRegister.It isset if anyINR bitsareset,
provided they are enabled by the corresponding bit of the IN E register.
Bit 2 is the VAB bit, indicating that a parameter value was adapted during a previous command
interpretation.
Check Wavefo rmStatus
Bit 4 is the MAV bit, indicating that the interface output queueis not empty.
Bit 5 is the summary bit ESB of the ESR. It is set if any of the bits of the ESR are set, provided they are
enabled by the corresponding bit of the ESE register.
Bit 6 is either the MSS or RQS (Request for Service) bit.
You can read the STB using the *STB? qu e ry. It reads and clears the STB, in whichcaseBit 6 is the MSS bit,
And it indicates whe ther the oscilloscope has any reason to request service. The response to the query
represents the binary w eighted sum of the register bits. The register is cleared by *STB?, ALST?, *CLS,or
with W ave runner powering up.
Another wa y to read the STB is using the serial poll (see Chapter 2). In this case, Bit 6 is the RQS bit, indicating
that the instrument has activated the SRQ line on the GPIB. The serial poll clears only the RQS bit. And the
STB’s MSS bit, and any other bits w hich caused MSS to be set, will remain set after the poll. These bits must be
reset.
STANDARDEVENT STATUS REGISTER (E SR)
ESR is a 16-bit register ref lecting the occurrence of events. E SR bit assignments have been standardized by
IE EE 488.2. Only the lower eigh t bits are currentlyin use .
LTXXX-RCM-E RevBISSUED: January 200247
ReadESR using*ESR?. The resp on seis the binary w e ighted sum of the regis ter bits. The register is cleare d
with *ESR? or ALST?,orwith*CLS or pow e ring on the scope.
Example: Theresponsemessage*ESR 160 tells you that a command error occurred and that the E SR is
be ingreadfor the first time after po wer-on. The valu e160 can be brokendown into 128 (Bit 7) plus 32 (bit 5).
See the table with the ESR command description in Part Two for the conditions corresponding to the bits set.
The Pow er ON bit appe ars only on the first *ESR? query after powe r-on, as the query clears the register. You
can determine this type of command error by reading the CMR with CMR?. It is not necessary that you read,
or simultaneously clear, this register in order to set the CMR bit in the ESR on the next command error.
STANDARDEVENT STATUSENABLE REGISTER (ESE)
Thisregister allows youto report one or more eventsintheESR to theESB summary bit in theSTB.
Modify E SE with *ESE and clear it with *ESE 0, or with power-on. Read it with *ESE?.
Example: Use*ESE 4 to set bit 2 (binary 4) of the E SE Register, and enable query errors to be reported.
SERVICE REQUEST ENABLE REGISTER (SRE)
SRE specifies whic h Status Byte Registe r summa ry bit or bits will bring abo u t a service requ e s t. This reg ister
consists of eight bits. Setting a bit allows the summary bit located at the same bit position in the SBR to
generate a service request, provided that the associated event becomes true. Bit 6 (MSS) cannot be set and is
always reported as zero in response to *SRE?.
Modify SRE with *SRE and clear it with *SRE 0, or with power-on. Readit using *SRE?.
PARALLELPOLLENABLEREGISTER(PRE)
This specifies which Status Byte Register summary bit or bits w ill set the “ist” individual local message. PRE is
similar to SRE, but is used to set the parallel poll “ist” bit rather than MSS.
The valueof the “ist” mayalso be read withou t a Paralle l Poll via the query *IST?. The response indicates
whe ther or not the “ist” message has been set (values are 1 or 0).
Modify PRE *PRE and clear it with *PRE 0, or with power-on. Readthis reg ister with *PRE?.
Example:Use*PRE 5 to set the register’s bits 2 and 0 (decimal 4 and 1).
IN T ERNAL STATE CHAN GE STATUS RE GISTE R (IN R )
INR reports the completion of a number of internal operations (the events tracked by this 16-bit-wide register
are listed with the INR? descriptioninPartTwo).
Read theregister usingINR?. The resp on seis the binary w eighted sum of the register bits. Clea r the register
with INR? or ALST?,a*CLS command, or with pow e r-on.
48ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER F IVE:
INTERNALSTATECHANGEENABLEREGISTER(INE)
INE allows one or more events in the Internal State Change Status Register to be reported to the INB
summary bit in the STB.
Modify INE with INE and clear it with INE 0, or after power-on. Read it with INE?.
COMMAND ERROR STATUS REGISTER (CMR)
This register contains the codeof the last comma n d error detected by the oscillosc op e. List the seerror code s
using CMR?.
ReadCMR withCMR?. The resp o ns eis the error code. Clear the register w ith a CMR? or ALST? query , a
*CLS command, or with pow er-on.
DE VI CE DEPENDENT ERROR STATU S R EGI ST ER (DDR)
DDR indicates the type of hardw are errors affecting your Wa verunner. Individual bits in this register report
spe c ific hardware failure s .List them using DDR?.
Alsoread thisregister usingtheDDR? query. The response is the binary we ighted sum of the error bits. Clear
it w ith ano the r DDR? or w ith ALST?,a*CLS command, or with pow e r-on.
EXECUTION ERROR STATUS REGISTER (EXR)
Check Wavefo rmStatus
EXR contains the codeof the last ex e cu tion error detected by the oscillosco p e. List theseerror cod e s with
EXR?.
Read the register, again using the EXR? query . The response is the error code. Clear with another EXR? or
with ALST?,a*CLS command, or w ith powe r-on.
USER REQUEST STATUSREGISTER(URR)
Finally , URR contains the identification code of the last menu button pressed. List these codes with URR?.
Read URR using the same query . The response is the decimal code associated with the selected menu button.
And clear the register with another URR?,orwithALST?, a *CL S command, or w ith powe r-on.
LTXXX-RCM-E RevBISSUED: January 200249
BLANK PAGE
50ISSUED: January 2002L TXXX-RCM-E Rev B
C HAPTER F IVE:
BLANK PAGE
Check Wavefo rmStatus
LTXXX-RCM-E RevBISSUED: January 200251
P
AARRT
P
C
O
C
O
Part Twolists and describes the com man ds and queries you will need to rem otelyoper ate your
Waverunner oscillosco p e.
M
M
M
M
T
T
T
A
A
O
WWO
N
N
DSS
D
LTXXX-RCM-E RevBISSUED: January 200251
P ART T WO: COMMANDS
In this part of the manual, yo u’ll find the com m an ds and queries.
To run Wav erun ner rem otely.
52ISSUED: January 2002L TXXX-RCM-E Rev B
PARTTWO:COMMANDS
{{}
Use Waverunner Commands and Queries
This part of the manual lists and describes the remote control commands and queries recognized by
Waverunner. You can execute all of them in either local or remote state. Where commands or queries for
spe c ia l options are not include d,youwill find them in thoseoptions’ dedica tedOperator’s M anuals.
The commands and queries are listed in alphabetical order according to the long form of their name. For
example, the description of ATTENUATION, whose short form is ATTN, is listed before that of AUTOSETUP, whose short form is ASET. E ach command or query description starts on a new page. The name
(heade r) is given in both long and short form at the top of the first page of each description.
Queries perform actions such as obtaining information. They are recognized by ? follow ingtheir head ers.
Many commands can be used as queries w ith the question mark added.
A brief explanation of the operation performed by the command or query is follow ed the formal syntax, with
the full-name header given in lower-case characters and the short form derived from it in uppe r-case characters
(e .g., DoT_JoiN forDTJN). Where app licable, the syntax of the query is given w ith the format of its
resp on se. A short ex a m p leillustrating a typica l use is also prese nted . The GPIB ex a m p les assu m ethat the
controller is equippe d with a National Instruments interface board, which calls to the related interface
subroutines in BASIC. The device name of the oscilloscope is defined as SCOPE%.
Use the two tables that precede the descriptions to quickly find a command or query . The first of these lists the
commands and queries in alphabetical order according to their short form. The second table groups them
according to the subsystem or category they belong to.
COMMAND NOTATION
The following notation is used in the commands:
Angular brackets enclose words that are used as placeholders, of which there are two types: the heade r
>
<<>
::=
[[]
…
…
LTXXX-RCM-E RevBISSUED: January 200253
path and the data parameter of a command.
A colon followed by an equa ls sign separates a placeholder from the description of the type and range
=
of values that can be used in a command instead of the placeholder.
Braces enclose a list of choices, one of which must be made.
}
Square brackets enclose optional items.
]
An ellip sis indicates that the items left andright of it can be repe a tedanynumb e r of times .
P ART T WO: COMMANDS
Example:consider the syntax notation for the command to set the vertical input sensitivity:
1.< chann e l> : VOLT_DIV <v_gain>
2.< chann e l> : = { C1, C2}
3.< v_gain > : = 5.0 mV to 2.5 V
The first line shows the formal appearance of the command: < channel> denotes the placeholder for the
heade r path; < v_gain> is the placeholder for the vertical gain value.
The second line indicates that either C1 or C2 must be chosen for the header path.
Thethirdlinemeansthattheactualverticalgaincanbesettoanyvaluefrom5mVto2.5 V.
MISCELL ANE OUSEnables or disables automatic calibration.
STATUSReads and clears the contents of all status registers.
ACQUISITIONChang e s acq u isition state from “stoppe d ” to “single”.
DISPLAYControls the Auto Scroll viewingfeature.
ACQUISITIONAdjusts vertical, timebaseandtrigger parameters.
ACQUISITIONSelects the verticalattenuationfactor of theprobe.
MISCE LLANEOUSControls the built-in pie zo-electric buzzer.
ACQUISITIONEnables/ disable s band width-limiting low-passfilter.
MISCE LLANEOUSPerforms comple te internal calibration of oscilloscope.
COMMUN ICATIONSelects the format for sending wave form data.
COMMUN ICATIONControls formatting of query responses.
COMMUN ICATIONControls operational level of the RC Assistant.
COMMUN ICATIONReturns the contents of the RC Assistant log.
DISPLAYAllows manual generation of a service request (SRQ).
FUN CTIONClears the specified memory.
STATUSClears all statusdata registers.
FUNCTIONRestarts the cumulative processing functions.
STATUSReads andclears theComm and erro rRegister(CMR).
DISPLAYSelects color of individual on-screen objects.
COMMUN ICATIONControls the byte order of wa veform data transfers.
COMMUNICATIONSets remote control parameters of the RS-232-C port.
MISCE LL ANE OUSSets signal type put out at the CAL connector.
ACQUISITIONSelects the specified input channel’s coupling mode.
CURSORSpecifies the type of cursor/ parameter measurement.
CURSORAllows positioning of any one of eight cursors.
CURSORReturns tracevalues measu re dbyspe cifiedcursors.
DISPL AYSelects the display color scheme.
MISCELL ANE OUSChanges the date/time of the internal real-time clock.
ST ATUSReads, clears t he Device Dependent Register (DD R).
FUN CTIONSpecifies math expression for function evaluation.
MASS STORA GEDeletes files from mass storage.
MASS STORA GECreates and deletes file directories.
DISPLAYControls the displayscree n .
DISPLAYControls bold/single pixel display of sample points.
DISPLAYControls the interpolation lines betwe endata points.
DISPLAYSets horizontal magnification and positioning.
DISPLAYAllow s use of the K EY commandin local mode.
STATUSSets theStandardEvent StatusEnable register(ESE).
STATUSReads,clearsthe Event StatusRegister (ESR).
STATUSReads, clears theEX ecutionerror Register(EXR ).
DISPLAYControls width of cursors.
FUNCTI ONAutomatically sets the center andwidth of ahistogram.
MISCELL ANE OUSFormats the memory card.
MISCELL ANE OUSFormats a floppy disk.
MASS STORAGEFormats the removable hard disk.
MASS STORAGEChanges default filenames.
FUNCTIONResets a waveform-processing function.
DISPLAYSelects magnified viewformat for the grid.
ACQUISITIONE nables/disables the Global Bandw idth Limit.
DISPLAYSpecifies single-, dual- or quad-modegrid display.
HARD COPYConfigures the hardcopy driver.
HARD COPYSends string of ASCII characters to hardcopy unit.
DISPLAYHorizontally expands the selected expansion trace.
DISPLAYHorizontally positions intensified zone’s center.
MISCELL ANE OUSFor identification purposes.
ACQUISITIONE nables/disables random interleavedsampling (RIS).
STATUSSets theI nternal state changeEnable register (INE ).
STATUSReads, clearsINternal statechange Regi ster (INR).
WAVEFORM
TRANSFE R
DISPLAYSets the grid or trace /text intensity level.
STATUSRead sthe current state of the IEEE 488.
DISPLAYDisplays a string in the menufield.
DISPLAYDisplays LeCroy logo at top of grid.
CURSORInvokes Polymask drawand fill tools.
DISPLAYControls highlighting of the measurement gate region.
DISPL AYDisplays a string of characters in the message field.
ACQUISITIONSelectsmax. memorylength.
DISPLAYSets horizontal magnification and positioning.
ACQUISITIONAllows output channel vertical offsetadjustment.
STATUSSets theOPC bit intheEvent StatusRegister (ESR).
MISCE LLANEOUSIdentifies oscilloscop eoptions.
CURSORClears allcurrent parametersin Custom, Pass/Fai l.
CURSORControls parame ters with customizablequalifiers.
CURSORDeletes a specified param e ter in Custom, Pass/Fail.
CURSORReturnscurrent statisticsparamete rvalues.
CURSORReturnscurrent parameter, mask test val ues.
CURSORPositions indepen dent cursors.
CURSORReturnsvalues measured bycurso rs.
DISPLAYShows the last trace drawn in a persistence data map.
DISPLAYE nables or disables the persistence display mode.
DISPLAYControls color rendering method of persistence traces.
DISPLAYSets the color saturation levelin persistence .
DISPL AYSelects display persistence duration.
CURSORAdds a Pass/ Fail test condition or custom parameter.
CURSORResets the Pass/Fail acqu isition counters.
CURSORDefines desired outcome, actions after Pass/Fail test.
CURSORGenerates tolerance mask on a trace and stores it.
CURSORReturns the Pass/Fail test for a given line number.
SAVE/ RECALLComplementsthe*SAV/*RST commands.
STATUSSets the PaRallel poll E nable register (PRE).
PROBE SPerforms auto-calibration of connected current probe.
PROBE SDegausses, calibrates connected current probe.
PROBE SNames the probe connected to the oscilloscope .
SAVE /RECAL LRecalls one of five non-volatile panel setups.
SAVE /RECAL LRecalls a front panel setup from mass storage.
WAVE FORM
TRANSFE R
MICE LLAN EOUSSets the type of signal put out at rear BNC connector.
SA VE / RECAL LInitiates a device reset.
SAVE /RECAL LStores current state in non-volatile internal memory.
HARD COPYCauses a screen dump to the hardcopy device.
ACQUISITIONAllows controlof an external timebase.
DISPLAYControls the automatic screen saver.
DISPLAYSelects the specified trace for manual display control.
ACQUISITIONSets the conditions for the sequence mode acquisition.
MICELLANEOUS
ST ATUSSets the Service R equest E nable register (SRE ).
STATUSReadsthe contents of the IEE E 488.
WAVE FORM
TRANSFE R
ACQUISITIONImmediately stops signal acquisition.
SAVE /RECAL LStores front panel setup to mass storage.
WAVE FORM
TRANSFE R
WAVE FORM
TRANSFE R
Recalls a file from mass storage to internal memory.
Makes the scope wait before it interprets new
commands
Storesa trac ein internal memory or massstorage.
Controls the wayin wh ichtraces are stored.
Stores the waveform template to mass storage.
LTXXX-RCM-E RevBISSUED: January 200257
P ART T WO: COMMANDS
PAGE
SHORT
NO.
FORM
TDIVTIME_DIV
218
TDISPTDISP
216
TMPL?TEMPLATE?
217
TRATRACE
219
TOPATRACE_OPACITY
220
TRCPTRIG_COUPLING
222
TRDLTRIG_DELAY
223
*TRG*TRG
221
TRLVTRIG_LEVEL
225
TRMDTRIG_MODE
226
TRSETRIG_SELECT
227
TRSLTRIG_SLOPE
230
TRWITRIG_WINDOW
231
*TST?*TST?
232
URR?URR?
233
VDIVVOLT_DIV
237
VMAGVERT_MAGNIFY
235
VPOSVERT_POSITION
236
*WAI*WAI
238
WAITWAIT
239
WFWAVEFORM
240
WFSUWAVEFORM_SETUP
243
WFTXWAVEFORM_TEXT
245
XYAS?XY_ASSIGN?
246
XYCOXY_CURSOR_ORIGIN
247
XYCSXY_CURSOR_SET
248
XYCV?XY_CURSOR_VALUE?
250
XYDSXY_DISPLAY
252
253
XYRD
254XYSA
LONG FORMSUBSYSTEM
ACQUISITIONModifies thetimebasesetting.
MISCELL ANE OUSChanges time display from current to trigger or none.
WAVEFORM
TRANSFE R
DISPLAYE nables or disables the display of a trace.
DISPLAYControls theopacityof thetrace color.
ACQUISITIONSets the coupling mode of the specified trigger source.
ACQUISITIONSets thetime at whichthe trigger is to occur.
ACQUISITIONE xecutesan ARM command.
ACQUISITIONAdjuststhetrigger level of thespecified trigger source.
ACQUISITIONSpecifies the trigger mode.
ACQUISITIONSelects the conditionthat will trigger acquisition.
ACQUISITIONSets thetriggerslopeof thespecified trigger source.
ACQUISITIONSets windowamplitudeon current Edge trigge r source.
MISCE L L AN E OUSPerf orms an internal self-test.
ST ATUSReads, clears User Request status R egister (URR).
ACQUISITIONSets the vertical sensitivity.
DISPLAYVertically exp a n dsthe specified trace .
DISPLAYAdjusts the vertical position of the specifiedtrace.
STATUSRequ ire d by the IEE E 488.
ACQUISITIONPrevents newanalysis untilcurrentiscompleted.
WAVEFORM
TRANSFE R
WAVEFORM
TRANSFE R
WAVEFORM
TRANSFE R
DISPL AYR eturns traces currently assigned to the X Y display.
CURSORSets origin position of absolute cursor measureme nts.
CURSORAllows positioning of XY voltage cursors.
CURSORReturnsthe current values of theX vs Y curs ors.
DISPLAYE nables or disables the XY display mode.
XY_RENDER
XY_SATURATION
DISPLAYControls X Y plot: smooth or disconnected points.
DISPL AYSets persistence color saturation level in XY display.
WHAT THE COMMAND OR QUE RYDOE S
(CATE GORY)
Produces a complete wa ve form template copy.
Transfers a waveform from controller to scope.
Specifies amoun t of wave form data to go to controller.
Documents acquisition conditions.
58ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
Table of Com m an ds and Quer ies — By Subsystem ...
Changes acqu isition state from “stopped” to “single”.
Adjusts vertical, timebaseand trigger parameters for signal display.
Selects the vertical attenuation factor of the probe.
Enablesor disables the bandw id th-limiting low-passfilter.
Enables/ disables the Global Bandwidth Limit
Enables or disables random interleaved sampling (RIS).
Allows selection of maximummemory length (M- and L-modelsonly ) .
Allows vertical offset adjustment of the specifiedinpu t channe l.
Allows control of an ext ernal timebase.
Sets the conditions for Seque nce-modeacquisition.
Immediatelystops signal acq uis ition.
Modifies the timebase setting.
Sets the couplingmodeof the specifiedtrigger source.
Sets thetimeat whichthetrigger is to occur.
Executes an ARM command.
Adjusts the level of the specifiedtrigger source.
Specifies Trigger mode .
Selects the condition that will trigger acqu isition.
Sets theslopeof thespecified trigger source.
Sets the windowamplitude in volts on the current E dge trigger source.
Sets theverticalsensitivityin volts/div.
Prevents new command analysis until current acquisition completion.
Selects the format to be used for sending wave form data.
Controls formatting of query responses.
Controls operational level of the RC Assistant.
Returns the contents of the RC Assistant log.
Controls the byte order of wa veform data transfers.
Sets remote control parameters of the RS-232-C port.
Specifies the type of cursor or parameter measurement for display.
Allows positioning of any one of eight independe nt cursors.
Returns the values measured by the specified cursors for a given trace.
Invokes Polymask drawand fill tools.
Clears allcurrent parametersin Custom andPass/Failmodes.
Deletes a specified parameter in Custom and Pass/Fail mode s.
Returnscurrent statisticsvaluesfor the specifiedpul se parameter.
Returnscurrent value(s )of parameter(s)and masktes ts.
Allows positioning of any one of six independent cursors.
Returns the value smea su re dbyspe cifiedcursors for a given trace .
Adds a Pass/Fail test condition or custom parameter to display.
Rese ts the Pass/Fail acq u isition counters.
Defines the desired outcome and actions following a Pass/Fail test.
Generates a tolerance mask around a chosen trace and stores it.
Returns the Pass/Fail test for a given line number.
Sets position of origin for absolute cursor measuremen ts on XY display.
Allows positioning of any one of six independe nt XY voltage cursors.
Returnscurrent values of X vs Y curso rs.
Controls the Auto Scroll viewing feature.
Allows manual generation of a service reque st (SRQ).
Selects color of individual objects such as traces, grids or cursors.
Selects the display color scheme.
Controls display of sample points in single display pixels or bold.
Controls the oscilloscopedisplayscreen.
Controls the interpolation lines betwee n data points.
Sets horizontal magnification and positioning for all expande d traces.
Allows use of the KEY comman din local mode.
Controls width of cursors.
Selectsmagnified view format forthe grid.
Specifies grid displayin single,dua l or qua dmode.
Horizontally expands the selected expansion trace.
Horizontally positions the intensified zone’s center on the source trace.
Sets grid or trace/text intensitylevel.
Displays a string in the menu field.
Displays LeCroy logo at top of grid.
Controls highlighting of the region betwe enthe parameter cursors.
Displays a string of characters in the message field.
Sets horizontal magnification and positioning for all expande d traces.
Enablesor disables the PersistenceDisplay mode .
Controls color rendering method of persistence traces.
Shows the last trace drawn in a persistence data map.
Sets thecolorsaturation level in persistence.
Selects displaypersistenceduration in Persistencemode .
Selects the speci fied tracefor manua ldisplay control.
Enablesor disables the displayof a trace.
Controls theopacityof thetrace color.
Verticallyexp a n d s the specified trace .
Adjuststheverticalposition of thespecif iedtrace.
Returnsthe tracescurrently assignedto theXY display.
Enablesor disables the XY display mode .
Controls XY plot: smooth or disconnected points.
Sets persistence color saturationlevel inX Y display.
FUNCTION — TO PERFORM WAVEFORM MATHEMATICAL OPERATI ON S
Clears the specified memory.
Restarts the cumulative processing functions.
Specifies the mathematical expression to be evaluated by a function.
Automatically sets the center andwidth of ahistogram.
Resets a waveform processing function.
Deletes files from the currently selecteddirectory on mass storage .
Creates and deletesfile directories on mass-storage device s.
Formats the memory card.
Formats a floppy disk in the Double- or High-Density format.
Formatstheremo vableharddisk.
Changes the default filename of any stored trace, setup or hard copy.
Enablesor disables automatic calibration.
Controls the built-in piezoe lectric buzzer.
Performs a complete internalcalibra tion of the oscilloscope .
Sets the type of signal put out at the CAL connector.
Change s the date/time of the oscilloscope ’s internal rea l-time clock.
Used for identification purposes.
Identifies oscilloscopeoptions.
Sets the type of signal put out at rear BNC connector.
Makes the scope wait before it interprets newcommands
Changes time display from current to trigger or none.
Performs a complete calibration of the connected current probe.
Degau sses and calibrates the connected current probe.
Gives an identification of the probe connected to the oscilloscope.
SAVE/RECALL SETUP — TO PRESERVE AND RESTORE FRONT PANEL SETTINGS
Complements the *SAV/* RST commands.
Recalls one of five non-volatile panel setups.
Recalls a front panel setup from mass storage.
Initiates a device reset.
Stores the current state in non-volatile internal memory.
Stores the complete front panel setup on a mass-storage file.
STATUS — TO OBTAIN STATUS INFOR MATI ON AND SET UP SERVICE REQUESTS
Reads and clears the contents of all (but one) of the status registers.
Clears all the status data registers.
Readsand clears the contents of theCoMmand error Register (CMR).
Reads and clears the Device-Dependent error R egister (DDR).
Sets thestandardE vent Status E nable (ESE) register.
Reads and clears the E vent Status Register (E SR).
Readsand clearstheEXecutionerrorRegister (EXR).
Sets theINternal statechange E nableregister (INE ).
Reads and clears the INternal state change R egister (INR ).
Individual STatus reads the current state of IEE E 488.
Sets totrue theOPC bit (0)inthe Event StatusRegister (ESR).
Sets the PaRallel poll Enable register (PRE ).
Sets the Service Request E nable register (SRE ).
Read sthe contents of IE EE 488.
Reads and clears the User R equest status Register (URR).
WAIt to continue— requiredby IE EE 488.
WAVE FORM TRAN SFER — TO PRESERVE AND RESTORE WAVEFORMS
Allows acquired waveform parts to be read.
Recalls a waveform file from mass storage to internal memories M1–4.
Stores a trace in one of the internal memories M1–4 or mass storage.
Controls the wayin wh ichtraces are stored.
Stores the waveform template in a mass-storage device.
Produces a copyof the templa te describing a complete wave form.
Transfers a wa ve form from the controller to the oscilloscop e .
Specifies amoun t of wave form data for transmissionto controller.
Documents the conditions under which a waveform has been acquired
62ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
STATUS
DE SCRIPTIO N
QUE R Y SYN TAXALl_STatus?
RESPONSE FORMAT
EXAMPLE (GPIB)The following reads the contents of all the status registers:
TheALL_STATUS? query reads and clears the contents of all status
registers: STB, E SR,INR, DDR, CMR,EXR and URR except for the
MAV bit (bit 6) of theSTB register. For aninterpretationof the
contents of each register, refer to the appropriate status register.
The query is useful in a complete overview of the state of your
Wa verunner oscilloscope.
RE L ATED COMMAN DS*CLS, CMR?, DDR?, *ESR?, EXR?, *STB?, URR?
LTXXX-RCM-E RevBISSUED: January 200263
P ART T WO: COMMANDS
ACQUISITION
DE SCRIPTIO N
COMMAND SYN TAXARM_acquisition
EXAMPLEThe following ena ble ssignal acqu isition:
RE L ATED COMMAN DS
TheARM_ACQUISITION command enables the signal acquisition
process by changing the acquisition state (trigger mode) from
“stopped” to “single”.
CMD$=“ARM”: CALL IBWRT(SCOPE%,CMD$)
STOP, *TRG, TRIG_MODE, WAIT
ARM_ACQUISITION, ARM
Command
64ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
ACQUISITION
DE SCRIPTIO N
COMMAND SYN TAX
QUE R Y SYN TAX
RESPONSE FORMAT
AVAILABILITY
ATTENUATION, ATTN
Command/Query
TheATTENUATION command selects the vertical attenuation factor of
the probe .Values of 1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000 or 10000
can be specified.
The ATTENUATION? query returnstheattenuation factor of the
spe c ified chann e l.
<channel> : { C3, C4} available only on four-channel Waverunner
oscillosco p es.
EXAMPLE (GPIB)Thef ollowing sets to 100 t heattenuationf actor of Channel1:
CMD$=“C1:ATTN 100”: CALL IBWRT(SCOPE%,CMD$)
LTXXX-RCM-E RevBISSUED: January 200265
P ART T WO: COMMANDS
MISCELLANEOUS
DE SCRIPTIO N
COMMAND SYN TAX
QUE R Y SYN TAXAuto_CALibrate?
RESPONSE FORMAT
TheAUTO_CALIBRATE command is used to enable or disable the
au toma tic calibration of you r Wave runn er oscilloscop e .At power-up,
au to-calib ration is turned ON, i.e.all input chann els are periodic a lly
calib ratedfor the current inpu t amp lifier and timeba sesettings.
The automa tic calibration can be disab le dby issuing the command
ACAL OFF. Whenever convenient, a *CAL? query may be issued to
fully calibra te the oscillosco p e. When the oscilloscop eis returne d to
local control, the periodic calibrations are resumed.
The response to the AUTO_CALIBRATE? query indicates whether
au to-calib ration is ena b le d .
Auto_CALibrate <state>
<state> : = { ON, OFF}
Auto_CALibrate <state>
AUTO_CALIBRATE, ACAL
Command/Query
EXAMPLE (GPIB)The following disables auto-calibration:
CMD$=“ACAL OFF”: CALL IBWRT(SCOPE%,CMD$)
RE L ATED COMMAN DS
*CAL?
66ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
DISPL AY
DE SCRIPTIO N
COMMAND SYN TAX
QUE R Y SYN TAXAuto_SCRoll?
RESPONSE FORMAT
TheAUTO_SCROLL command and query controls the Auto Scroll
feature, accessed through the front panel using the MATH SETUP
button and ZOOM + MATH menus. This automatically moves the
selected trace (or all traces if multi-zoom is on) across the screen. The
command turns the scroll on and off and sets the scrolling speed in
divisions per second, and the query returns the current scroll rate.
EXAMPLE (GPIB)The following activates Auto Scroll and start scrolling the data to the
rightatarateof2s/div.:
CMD$=“ASCR PLAY,DIV_S,2”: CALL IBWRT(SCOPE%,CMD$)
RE L ATED COMMAN DS
LTXXX-RCM-E RevBISSUED: January 200267
MULTI_ZOOM, HOR_MAGNIFY, HOR_POSITION
P ART T WO: COMMANDS
ACQUISITION
DE SCRIPTIO N
COMMAND SYN TAX
AUTO_SETUP, ASET
Command
TheAUTO_SETUP comma n d attemp ts to disp la ythe inpu t signa l( s)by
adjusting the vertical, timebase and trigger parameters. AUTO-SETUP
operates only on the channels whose traces are currently turned on. If no
traces are turned on, AUTO_SETUP operates on all channels and turns
on all of the traces.
If signals are detected on several channels, the low est numbered
channel with a signal determines the selection of the timebase and
trigger source.
If only one input channel is turned on, the timebase will be adjusted
for that channel.
The < channel> : AUTO_SETUP FIND command adjusts gain and
offset only for the specified channel.
If the FIND keyw ord is present, gain and offset adjustments will be
performed only on the specified channel. In this case, if no <channel>
prefix is added, then an auto-setup will be performed on the channel
used on the last ASET FIND remote command. In the absence of the
FIND keyword, the normal auto-setup w ill be performed, regardless of
the <cha nn el> pre fix.
AVAILABILITY<channel> : = { C3, C4} only on four-channel Waverunner
oscillosco p es.
EXAMPLEThe following instructs the oscilloscope to perform an auto-setup:
CMD$=“ASET”: CALL IBWRT(SCOPE%,CMD$)
68ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
ACQUISITION
DE SCRIPTIO N
COMMAND SYN TAX
QUE R Y SYN TAXBandWidth_Limit?
BANDWIDTH_LIMIT ena bles or disable sthe bandwidth-limiting lowpa ssfilter. When Global_BWL (se epa g e136) is on, the BWL comma n d
applies to all channels; when off, the command is used to set the
bandw idth individually for each channel. The response to the
BANDWIDTH_LIMIT? query indicates whether the bandwidth filters
areonor off.
BandWidth_Limit < mode>
Or, alternatively , to choose the bandwidth limit of an individual
TheBUZZER command controls the built-in piezo-electric buzze r.
This isuseful for attracting t heattentionof alocaloperator in an
interactive working application. The buzzer can either be activated for
short beeps (about 400 ms long in BE EP mode) or continuously for a
certain time interval you select by turning the buzzer ON or OFF.
: T his command is only able to be used in oscilloscopes
NNOOTTEE:
BUZZER, BUZZ
Command
fitted with the CL BZ hard option.
COMMAND SYN TAX
EXAMPLE (GPIB)Sendin gthe following will causethe oscilloscop eto sound two short
EXAMPLE (GPIB)The following forces a self-calibration:
The*CAL? que rycaus e s the oscilloscopeto perform aninternal selfcalibration and generates a response that indicates whe ther or not your
Waverunner oscilloscope completed the calibration without error. This
internal calibration sequence is the same as that which occurs at powerup. At the end of the calibration, after the response has indicated how
the calibra tion terminated , the oscilloscopereturns to the state it wa s in
just prior to the calibration cycle .
CALSQProvides a square signal
LEVELProvides a DC signal at the requ ested level
LTXXX-RCM-E RevBISSUED: January 200273
P ART T WO: COMMANDS
DISPL AY
DE SCRIPTIO N
COMMAND SYN TAXCall_HoST <state>
QUE R Y SYN TAX
RESPONSE FORMAT
TheCALL_HOST comma n d allow s you to manu a llyge n e ra te a service
reque st (SRQ). Once the CAL L_HOST command has been rece ived ,
the message “Call Host” will be displayed next to the lowest button on
the menu-button column immediately next to the screen. Pressing this
button while in the root menu sets the User R equest status Register
(URR) and the URQ bit of the E vent Status Register. This can generate
a SRQ in local mode, provided the service requ est mechanism has bee n
enabled.
The response to the CALL_HOST? query indicates whether CAL L
HOST is enabled (on) or disabled (off).
<state> : = { ON, OFF}
Call_HoST?
Call_HoST <state>
CALL_HOST, CHST
Command/Query
EXAMPLE (GPIB)After executing the following an SRQ request will be gene rated
whenever the button is pressed (it is assumed that SRQ servicing has
already been enabled):
CMD$=“CHST ON”: CALL IBWRT(SCOPE%,CMD$)
RE L ATED COMMAN DS
URR
74ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
FUN CTION
DE SCRIPTIO N
COMMAND SYN TAX
EXAMPLE (GPIB)ThefollowingclearsthememoryM2.
RE L ATED COMMAN DSSTORE
TheCLEAR_MEMORY command clears the specified memory. Data
previously stored in this memory are erased and memory space is
returnedto thefreememorypool.
EXAMPLE (GPIB)The following example will restart the cumulative processing:
RE L ATED COMMAN DSDEFINE, INR
TheCLEAR_SWEEPS command restarts the cumulative processing
functions: summed or continuous average, extrema, FFT power
average, histogram, pulse parameter statistics, Pass/ Fail counters, and
persistence.
CMD$=“CLSW”: CALL IBWRT(SCOPE%,CMD$)
CLEAR_SWEEPS, CLSW
Command
76ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
STATUS
DE SCRIPTIO N
COMMAND SYN TAX
EXAMPLE (GPIB)The following causes all the status data registers to be cleared:
RE L ATED COMMAN DSALL_STATUS, CMR, DDR, *ESR, EXR, *STB, URR
The*CLS command clears allstatusdata registers.
*CLS
CMD$=“*CLS”: CALL IBWRT(SCOPE%,CMD$)
*CLS
Command
LTXXX-RCM-E RevBISSUED: January 200277
P ART T WO: COMMANDS
STATUS
DE SCRIPTIO N
QUE R Y SYN TAXCMR?
RESPONSE FORMAT
EXAMPLE (GPIB)The following reads the contents of the CMR register:
RE L ATED COMMAN DSALL_STATUS?, *CLS
TheCMR? query reads and clears the contents of the CoMmand error
Register (CMR) — see table next page — which specifies the last syntax
error typede tecte d by your Waverun n e r oscillos cop e.
1Unrecognized command/query header
2Illega l hea der path
3Illega l numb e r
4Illegal number suffix
5Unrecognized keyw ord
6Stringerror
7GE T embedded in another message
10Arbitrary data block expected
Remote Control Commands and Queries
11Non-digit character in byte count field of arbitrary data block
12E OI detected during definite length data block transfer
13Extra bytes detected during definite length data block transfer
LTXXX-RCM-E RevBISSUED: January 200279
P ART T WO: COMMANDS
DISPL AY
DE SCRIPTIO N
COMMAND SYN TAX
COLOR, COLR
Command/Query
TheCOLOR command is used to select the color of an individual
display object such as text, trace, grid or cursor.
The response to the COL OR? query indicates the color assigned to
each display object, whether or not it is currently displayed.
: T his command is only effective if the color scheme
NNOOTTEE:
(CSCH) is chosenfro mthe user schem es U1 , U2, U3 or U4.
COLoR < object, color>[,...< object>,<color> ]
<object>:= {BACKGND,C1,C2,C3,C4,TA,TB,TC,TD,GRID,
TEXT,CUR SOR, NE UTRAL, WA RNING} ,
<color> : = { WHITE, CYAN, YELLOW, GREEN, MAGENTA,
TheCOMM_FORMAT command selects the format the oscilloscope uses
to send waveform data. The available options allow the block format, the
data type and the encoding mode to be modified from the default
settings.
The COMM_FORMAT? query returns the currently selected waveform
data format.
format. The digit 9 indicates that the byte count consists of 9 digits.
The data blockdirectly follows the byte count field .
For example, a data block consisting of three data bytes would be sent
as:
84ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
WF DAT1,#9000000003<DAB><DAB><DAB>
where < DAB> represents an eight-bit binary data byte.
IND0:Uses the IEEE 488.2 indefinite length arbitrary block response data
format.
A < NL^END> (newline w ith E OI) signifies that block transmission
has ended.
The same data bytes as above would be sent as:
WF DAT1,#0<DAB><DAB><DAB><NL^END>
OFF:Same as IND0. In addition, the data block type identifier and the
leading # 0 of the indefinite length block will be suppressed. The data
presented above would be sent as:
WF <DAB><DAB><DAB><NL^END>
: T he format OF F does not conform to the IE E E 488.2
NNOOTTEE:
standard and is only pr o v id ed forspecial applicatio n s wh ere the
abso lute min im umof data transfermaybe im p o r tan t.
Data Type
BYTE:Transmits the waveform data as eight-bit signed integers (one byte).
WORD:Transmits the wa veform data as 16-bit signed integers (two bytes).
: T he data type BYT E transmits only the high-order bits
NNOOTTEE:
of the internal 16-bit representation. T he precision contained in
th elow-orderbits is los t.
Encoding
BIN:Binary encoding (GPIB only)
HEX:Hexade cimal encoding (bytes are converted to 2 hexadecimal ASCII
digits (0, ...9, A, ...F))
RE L ATED COMMAN DS
LTXXX-RCM-E RevBISSUED: January 200285
WAVEFORM
P ART T WO: COMMANDS
COMMUN ICAT ION
DE SCRIPTIO N
NNOOTTEE:
that just after po wer -on , is SHORT.
: The default for m at, i.e.
COMM_HEADER, CHDR
Command/Query
TheCOMM_HEADER command controls the wa y the oscilloscope
formats responses to queries. There are three response formats:
LON G, in which responses start with the long form of the header
word; SHORT, where responses start with the short form of the
header word; and OFF, for which headers are omitted from the
response and suffix units in numbers are suppressed.
Unless you request otherwise, the SHOR T response format is used.
This command does not affect the interpretation of messages sent
to the oscillosco p e. Head e rs can be sent in their longor short
form regardless of theCOMM_HEADER setting.
Querying the vertical sensitivity of Channel 1 may result in one of
the follow ing respon se s:
COMM_HEADER
LONGC1:VOLT_DIV 200E-3 V
SHORTC1:VDIV 200E-3 V
OFF200E-3
RESPONSE
COMMAND SYN TAX
QUE R Y SYN TAXComm_HeaDeR?
RESPONSE FORMAT
EXAMPLE (GPIB)The following code sets the response header format to SHORT:
RE L ATED COMMAN DS
Comm_HeaDeR < mode>
<mode> : = { SHORT, LONG, OFF}
Comm_HeaDeR < mode>
CMD$=“CHDR SHORT”: CALL IBWRT(SCOPE%,CMD$)
COMM_HELP_LOG
86ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
COMMUN ICAT ION
DE SCRIPTIO N
COMMAND SYN TAX
COMM_HELP, CHLP
Command/Query
The COMM_HELP command controls the level of operation of the
diagnostics utility Remote Control Assistant (see the W averunne r
Operator’s Manual), which assists in debugging remote control
progra ms . Sele cted using your W a v erunne r oscilloscop e’s front pane l
(see the Operator’s Manual), Remote Control A ssistant can log all
message transactions occurring betw ee n the external controller and the
oscillosco p e. You can view the log at any time on-screen and can
choose from four levels:
Don'tassistatall.
Log detected E rrors Only (default after pow er-on).
Log the Full Dialog betwee n the controller and the
oscillosco p e.
R
S
LogtheFullDialogandsendittoarecordingdevice
connected to the RS232 port.
The default level (i.e. the level just after power-on) is E O.
QUE R Y SYN TAX
RESPONSE FORMAT
EXAMPLE (GPIB)After sending this command, all the following commands and responses
RE L ATED COMMAN DSCOMM_HELP_LOG
LTXXX-RCM-E RevBISSUED: January 200287
Comm_HeLP?
Comm_HeLP < level>
w ill be logg e d :
CMD$=“CHLP FD”: CALL IBWRT(SCOPE%,CMD$)
P ART T WO: COMMANDS
COMMUN ICAT ION
DE SCRIPTIO N
QUE R Y SYN TAX
RESPONSE FORMAT
EXAMPLE (GPIB)The following reads the remote control log and prints it:
RE L ATED COMMAN DSCOMM_HELP
TheCOMM_HELP_LOG query returns the current contents of the log
generated bytheR emoteControlAssistant (seeCHLP description). If
the optional parameter CLR is specified , the log will be cleare d after the
transmission. Otherwise , it will be kept.
Comm_HeLP_Log? [CLR]
Comm_Help_Log < string containingthe logged text>
CMD$=“CHL?”: CALL IBWRT(SCOPE%,CMD$)PRINT
COMM_HELP_LOG?, CHL?
Query
88ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
COMMUN ICAT ION
DE SCRIPTIO N
COMMAND SYN TAX
COMM_ORDER, CORD
Command/Query
TheCOMM_ORDER command controls the byte order of waveform
data transfers. Wave form data can be sent w ith the most significant byte
(MSB) or the least significant byte (LSB) in the first position. The
default mode is to send the MSB first. COMM_ORDER ap p lie s equ a llyto
the w aveform’s descriptor and time blocks. In the descriptor some
values are 16 bits long (“word”), 32 bits long (“long” or “float”), or 64
bits long (“double”). In the time block all values are floating values, i.e.
32 bits long. When COMM_ORDER HI is spe cified , the MSB is sent
first; when COMM_ORDER LO is spe c ified,the LSB is sent first.
The COMM_ORDER? query returnsthebyte transmissionorder in
current use.
Comm_ORDer < mode>
<mode> : = { HI, LO}
: Th e initial mo de, i.e. the modeafter power -on , is HI.
NNOOTTEE:
QUE R Y SYN TAX
RESPONSE FORMAT
EXAMPLEThe order of transmission of waveform data depends on the data type.
LTXXX-RCM-E RevBISSUED: January 200289
Comm_ORDer?
Comm_ORDer < mode>
The following tableillustrates the different possibilities:
P ART T WO: COMMANDS
TYPECORD HICORD LO
Wor d<MSB><LSB><LSB><MSB>
Long or F loat<MSB><byte2><byte3><LSB><LSB><byte3><byte2><MSB>
Double<MSB><byte2>...< byte7><LSB><LSB><byte7> ...<byte2> <MSB>
RE L ATED COMMAN DS
WAVEFORM
90ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
COMMUN ICAT ION
DE SCRIPTIO N
TheCOMM_RS232 comma n d sets the pa ra meters of the RS-232-C
port for remote control.
The COMM_RS232? query reports the settings of the parameters.
NNOOTTEE:
: T his command and query is only valid when you control
COMM_RS232, CORS
Command/Query
the oscilloscope remotely using the Waverunner RS-232-C port.
PARAME T E RS
End Input characte r:Whe n receive d by the oscillo sco p e, this cha racte r is interpre ted as the
END-of-a-command message marker. The commands received will
be parsed and executed.
End Output string:The oscilloscope adds this string at the end of a response message.
When the host computer receives this string, it knows that the
oscillosco p ehas comple tedits respo nse.
Line L ength:This parameter defines the maximum number of characters sent to the
host in a single line. Remaining characters of the response are output
in sep arate ad dition a l lines . This pa ram e te r is only ap p lica b le if a line
separator has been selected.
Line Sepa rator:This parameter is use d to selec t the line-splitting mec ha n ism and to
de fine the charac ters used to split the oscillosco p e resp on se mes sa g es
into many line s. Possible line sep arators are: CR, LF, CRLF. <CR> ,
<LF> or <CR> followed by < L F> . These are sent to the host
computer after < line_length> characters.
SRQ string:This string is sent each time the oscillosco p esigna ls an SRQ to the
host computer.
Some COMM_RS232 pa rame ters req uire ASCII strings as a c tual
argu me nts. In order to facilitate the emb e ddin g of non-printable characters
into such strings, esca pe sequ en ces can be used. The back-slash character
(‘\’) is used as an escape character. The following escape seque nces are
re c ogn i z ed:
LTXXX-RCM-E RevBISSUED: January 200291
P ART T WO: COMMANDS
“\a”:
“\b”:
“\e”:
“\n”:
“\r”:
“\t”:
“\\”:
“\ddd”:
Before usingthe string, the oscilloscop ewill rep la cethe escape
sequence by the corresponding ASCII character.
For ex a m p le, the escap eseq u ences “\r”, “\13” and“\013” are all
replaced by the single ASCII character < Carriage Return> .
Bell character
Bac kspa c echaracter
Escape character
Line feed character
Carriagereturn character
Horizontaltabcharacter
The back-slash character itself
Represents one to three decimal digit characters giving
the code value of the corresponding ASCII character.
This allows any ASCII codein the rang e1 to 127 to be
inse rted.
NOTATION
EI
EO
LL
LS
SRQ
End input character
End output string
Line length
Line separator
SRQ se rvicerequ e s t
92ISSUED: January 2002L TXXX-RCM-E Rev B
Remote Control Commands and Queries
COMMAND SYN TAX
COmm_RS232 EI,<ei_char>,EO,‘<eo_string> ’,LL,<line_len g th>,LS,
<Line_sep>,SRQ,‘<srq_string>’
<ei_char> : = 1 to 126 (de fau lt: 13 = CarriageReturn)
<eo_string> : = A non-empty ASCII string of up to 20 characters
(defau l t: “\n\r”)
<line_leng th> : = 40 to 1024 (default: 256)
<line_sep> : = { OFF, CR, LF, CRLF} (default:OFF)
<srq_string> : = An ASCII string of upt o 20 characterswhich may
be empty (default: empty string)
QUE R Y SYN TAXCOmm_RS232?
RESPONSE FORMAT
COmm_RS232 EI,<ei_char>,EO,“p <eo_string> ”,LL,<line_len g th>,
LS,<line_sep>,SRQ,“<srq_string>”
EXAMPLEAfter executing thecommand
COMM_RS232 EI,3,EO, “\r\nEND\r\n”
the oscilloscope will assumethat it hasreceiv e da complete mes sa g e
each time the <E TX> (decimal value 3) is detected. Response
messages will be terminated by sending the character sequence
“<CR><LF>END<CR><LF>”.
LTXXX-RCM-E RevBISSUED: January 200293
Loading...
+ 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.