Fluke Autoranging Combiscope Instrument Pm 3370B Users Manual 813 Titel

PM-3394B to the manual 3e68ced7-e780-4a08-9488-535798d1c4ed

2015-02-02

: Fluke Fluke-Autoranging-Combiscope-Instrument-Pm-3370B-Users-Manual-427876 fluke-autoranging-combiscope-instrument-pm-3370b-users-manual-427876 fluke pdf

Open the PDF directly: View PDF PDF.
Page Count: 297

DownloadFluke Fluke-Autoranging-Combiscope-Instrument-Pm-3370B-Users-Manual- 813-Titel  Fluke-autoranging-combiscope-instrument-pm-3370b-users-manual
Open PDF In BrowserView PDF
$XWRUDQJLQJ
&RPEL6FRSH
,QVWUXPHQW

I



30%30%30%
30%30%

SCPI Users Manual

02/- Nov-1998

®

II
TRADEMARKS
Microsoft, and Microsoft QuickBASIC are trademarks of Microsoft Corporation.
IBM is a registered trademark of International Business Machines Corporation.
CombiScope is a trademark of Fluke Corporation.
PCIIA is a trademark of National Instruments Corporation.
HPGL is a trademark of Hewlett-Packard Company.

Copyright  1996, 1998 Fluke Corporation
All rights reserved. No part of this manual may be reproduced by any means or in
any form without written permission of the copyright owner.
Printed in the Netherlands

III

CONTENTS

Page

1 ABOUT THIS MANUAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
1.1 What this Manual Contains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

2 GETTING STARTED WITH SCPI PROGRAMMING

. . 2-1

2.1 Preparations for SCPI Programming . . . . . . . . . . . . . . . . . . . . . . 2-1
2.1.1 System setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
2.1.2 Programming environment . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
2.2 Initializing the CombiScope Instrument . . . . . . . . . . . . . . . . . . . . 2-4
2.2.1 How to reset the CombiScope instrument . . . . . . . . . . . . . . 2-4
2.2.2 How to identify the CombiScope instrument . . . . . . . . . . . . 2-4
2.2.3 How to switch between digital and analog mode . . . . . . . . . 2-4
2.3 Error Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
2.4 Acquiring Traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
2.4.1 How to acquire a single shot trace . . . . . . . . . . . . . . . . . . . . 2-7
2.4.2 How to acquire repetitive traces . . . . . . . . . . . . . . . . . . . . . . 2-8
2.5 Measuring Signal Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
2.5.1 How to make a single shot measurement . . . . . . . . . . . . . 2-10
2.5.2 How to make repeated measurements . . . . . . . . . . . . . . . 2-10

3 USING THE COMBISCOPE INSTRUMENTS

. . . . . . . . . 3-1

3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
3.2 Fundamental Programming Concepts . . . . . . . . . . . . . . . . . . . . . 3-3
3.2.1 Measurement instructions . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
3.2.2 Single function programming using the instrument model . . 3-5
3.2.3 Instrument setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
3.2.4 Front panel simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7

IV
3.3 Measuring Signal Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
3.3.1 The MEASure? query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
3.3.2 Benefits of using parameters . . . . . . . . . . . . . . . . . . . . . . . . 3-9
3.3.3 Waveform measurements . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
3.3.4 Customizing settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
3.3.5 Multiple measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
3.3.6 Multiple characteristics from a single acquisition. . . . . . . . 3-15
3.3.7 Trigger control via GPIB . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16
3.3.8 Fetching characteristics from memory traces . . . . . . . . . . 3-17
3.4 Acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.1 Acquisition control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.1.1
Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.1.2
Video triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.1.3
The trigger modes . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.1.4
Pre- and post-triggering . . . . . . . . . . . . . . . . . . . . . . . .
3.4.1.5
External triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.2 Reading trace acquisitions . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.2.1
Single-shot acquisition . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.2.2
Repetitive acquisitions . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.3 Conversion of trace data . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.3.1
Conversion of 8-bit samples to integer . . . . . . . . . . . . .
3.4.3.2
Conversion of 16-bit samples to integer . . . . . . . . . . . .
3.4.3.3
Conversion to voltage values . . . . . . . . . . . . . . . . . . . .

3-18
3-18
3-20
3-23
3-25
3-27
3-28
3-29
3-30
3-30
3-31
3-32
3-33
3-34

3.5 Averaging Acquisition Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-36
3.6 Channel Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38
3.7 Signal Conditioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7.1 AC/DC/ground coupling . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7.2 Input filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7.3 Input impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7.4 Input polarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7.5 Vertical range and offset . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7.6 Autoranging attenuators . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-39
3-39
3-40
3-40
3-40
3-40
3-41

3.8 Time Base Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.8.1 Number of samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.8.2 Time base speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.8.3 Real time acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.8.4 Autoranging time base . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-42
3-42
3-42
3-43
3-44

V
3.9 Post Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-45
3.9.1 How to do post processing . . . . . . . . . . . . . . . . . . . . . . . . . 3-45
3.9.1.1
Select the source for the post processing function. . . . 3-45
3.9.1.2
Specify the settings of the post processing function. . . 3-46
3.9.1.3
Enable the post processing function. . . . . . . . . . . . . . . 3-46
3.9.1.4
Check the result of the post processing function. . . . . . 3-47
3.9.2 Mathematical calculations . . . . . . . . . . . . . . . . . . . . . . . . . 3-48
3.9.3 Differentiating and integrating traces . . . . . . . . . . . . . . . . . 3-48
3.9.4 Frequency domain transformations . . . . . . . . . . . . . . . . . . 3-49
3.9.5 Histogram functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-55
3.9.6 Frequency filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-55
3.10 Trace Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.10.1 Trace formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.10.2 Copying traces to memory . . . . . . . . . . . . . . . . . . . . . . . . .
3.10.3 Writing data to trace memory . . . . . . . . . . . . . . . . . . . . . . .
3.10.4 Reading data from trace memory . . . . . . . . . . . . . . . . . . . .

3-56
3-57
3-58
3-59
3-60

3.11 Screen/Display Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.11.1 Brightness control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.11.2 Display functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.11.2.1 Readout of measurement data . . . . . . . . . . . . . . . . . . .
3.11.2.2 Display of user-defined text . . . . . . . . . . . . . . . . . . . . .
3.11.2.3 Selection of softkey menus . . . . . . . . . . . . . . . . . . . . . .

3-61
3-61
3-61
3-62
3-65
3-65

3.12 Print/Plot Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-66
3.13 Real-Time Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-68
3.14 Auto Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-68
3.15 Status Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-70
3.15.1 Status data for the CombiScope instruments . . . . . . . . . . . 3-70
3.15.1.1 Operation status data . . . . . . . . . . . . . . . . . . . . . . . . . . 3-71
3.15.1.2 Questionable status data . . . . . . . . . . . . . . . . . . . . . . . 3-72
3.15.2 How to reset the status data . . . . . . . . . . . . . . . . . . . . . . . 3-73
3.15.3 How to enable status reporting . . . . . . . . . . . . . . . . . . . . . 3-74
3.15.3.1 Program example using the status byte (STB) . . . . . . . 3-74
3.15.3.2 Program example using a service request (SRQ) . . . . 3-75
3.15.4 How to report errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-76
3.15.4.1 Error-reporting routine . . . . . . . . . . . . . . . . . . . . . . . . . 3-76
3.15.4.2 Error-reporting using the SRQ mechanism . . . . . . . . . 3-77

VI
3.16 Saving/Restoring Instrument Setups . . . . . . . . . . . . . . . . . . . . .
3.16.1 How to restore initial settings . . . . . . . . . . . . . . . . . . . . . . .
3.16.2 How to save/restore a setup via instrument memory . . . . .
3.16.3 How to save/restore a setup via the GPIB controller . . . . .

3-78
3-78
3-78
3-78

3.17 Front Panel Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-79
3.17.1 How to simulate the pressing of a front panel key . . . . . . . 3-79
3.17.2 How to simulate the operation of a softkey menu . . . . . . . 3-80
3.18 Functions not Directly Programmable . . . . . . . . . . . . . . . . . . . . 3-81

4 COMMAND REFERENCE

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1

4.1 Notation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
4.1.1 Syntax specification notations . . . . . . . . . . . . . . . . . . . . . . . 4-1
4.1.2 Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
4.2 Command Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
4.3 Command Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13

A APPLICATION PROGRAM EXAMPLES

. . . . . . . . . . . . . A-1

A.1 Measuring Signal Characteristics . . . . . . . . . . . . . . . . . . . . . . .
A.1.1 Making automatic measurements . . . . . . . . . . . . . . . . . . .
A.1.2 Making programmed measurements . . . . . . . . . . . . . . . .
A.1.3 Reading measurement values . . . . . . . . . . . . . . . . . . . . .

A-2
A-2
A-4
A-5

A.2 Acquiring Waveform Traces . . . . . . . . . . . . . . . . . . . . . . . . . . . A-5
A.3 Saving/Recalling Instrument Setups . . . . . . . . . . . . . . . . . . . . A-6
A.3.1 Save/recall settings to/from internal memory . . . . . . . . . . A-6
A.3.2 Save/recall settings to/from computer disk memory . . . . . A-7
A.4 Making a Hardcopy of the Screen . . . . . . . . . . . . . . . . . . . . . . . A-9
A.5 Pass/Fail Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.5.1 Saving a pass/fail test setup . . . . . . . . . . . . . . . . . . . . . .
A.5.2 Restoring a pass/fail test setup . . . . . . . . . . . . . . . . . . . .
A.5.3 Running a pass/fail test . . . . . . . . . . . . . . . . . . . . . . . . . .

A-10
A-10
A-11
A-12

VII

B CROSS REFERENCES

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1

B.1 Cross Reference Front Panel Keys / Commands . . . . . . . . . . B-1
B.2 Cross Reference Softkey Menus / Commands . . . . . . . . . . . . B-3
B.2.1 ACQUIRE menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3
B.2.2 CURSORS menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-4
B.2.3 DISPLAY menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-5
B.2.4 MATHPLUS MATH menu . . . . . . . . . . . . . . . . . . . . . . . . . B-6
B.2.5 MEASURE menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-9
B.2.6 DTB (DEL’D TB) menu . . . . . . . . . . . . . . . . . . . . . . . . . . . B-9
B.2.7 SAVE/RECALL menu . . . . . . . . . . . . . . . . . . . . . . . . . . . B-10
B.2.8 SETUPS menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-10
B.2.9 TB MODE menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-11
B.2.10 TRIGGER menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-12
B.2.11 UTILITY menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-14
B.2.12 VERTICAL menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-16
B.3 Cross Reference Functions / Commands . . . . . . . . . . . . . . . B-17

C MANUAL CONVENTIONS

. . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1

C.1 Abbreviations Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1
C.2 Glossary of Symbols Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-4
C.3 List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-4
C.4 List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-5
C.5 Documents Referenced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-6

D STANDARDS INFORMATION

. . . . . . . . . . . . . . . . . . . . . . . . D-1

D.1 SCPI Conformance Information . . . . . . . . . . . . . . . . . . . . . . . . D-1
D.2 List of Implemented IEEE-488.2 Syntactical Elements . . . . . . D-2

E SUMMARY OF SYSTEM SETTINGS

. . . . . . . . . . . . . . . . . E-1

ABOUT THIS MANUAL

1-1

1 ABOUT THIS MANUAL
The SCPI Programming Manual for the CombiScope instruments describes
how to program your CombiScope instrument via the IEEE bus using SCPI
commands.

1.1 What this Manual Contains
A complete table of contents is given at the beginning of the manual.
Chapter 1

ABOUT THIS MANUAL
Explains what the SCPI programming manual for the CombiScopes
instruments contains.

Chapter 2

GETTING STARTED WITH SCPI PROGRAMMING
Tells you how to get started quickly with your CombiScope instrument.
You can execute the program examples per (sub)section or from the
beginning until the end.

Chapter 3

USING THE COMBISCOPE INSTRUMENTS
Explains how SCPI works for your CombiScope instrument from
the functional point of view. Section 3.1 is an introduction and
section 3.2 explains the fundamental programming concepts. The
other sections and subsections represent the functional use of your
CombiScope instrument.

Chapter 4

COMMAND REFERENCE
Is a complete alphabetical reference of all implemented SCPI
commands. In the beginning a command summary is given to
provide you with a quick reference.

1-2

ABOUT THIS MANUAL

Appendix A

APPLICATION PROGRAM EXAMPLES
Appendix A describes some application program examples. The
application programs are supplied on floppy.

Appendix B

CROSS REFERENCES
Appendix B gives cross references between SCPI commands and
front panel keys, softkey menu options, and instrument functions.

Appendix C

MANUAL CONVENTIONS
Appendix C explains which abbreviations and symbols are used in
the manual. It also gives a list of the tables, figures, and documents
referenced.

Appendix D

STANDARDS INFORMATION
Appendix D gives information regarding SCPI and IEEE-488.2
standards.

Appendix E

SUMMARY OF SYSTEM SETTINGS
Appendix E lists the system settings per functional group (node),
plus the applicable instrument settings per node.

A full alphabetical index is given at the end of the manual.

GETTING STARTED WITH SCPI PROGRAMMING

2-1

2 GETTING STARTED WITH SCPI
PROGRAMMING
2.1 Preparations for SCPI Programming
To program your CombiScope instrument, you need a system setup and a
programming environment. Various program examples (refer to PROGRAM
EXAMPLE:) are given in the following sections. These program examples can be
executed one at a time or chained together for a complete tutorial. The program
examples are based on the system and programming environment as described
below.

Note:

All PROGRAM EXAMPLE's in this chapter are supplied on floppy under
the file name EXGETSTA.BAS. They are chained together in order of
appearance.

2.1.1

System setup

•
•

The CombiScope instrument contains a factory-installed IEEE option.
A PC is used as controller. In the PC an IEEE-488.2 interface (GPIB) board
must be installed to turn the PC into a GPIB controller. The GPIB controller
must be connected to the CombiScope instrument via an IEEE cable.
Note:
The program examples throughout this manual have been executed
on an IBM-compatible PC with the GPIB interface board and
software of the product PM2201/03 installed. The PM2201 board is
equivalent to the PCIIA board from National Instruments.

2.1.2

•
•

Programming environment

MS-QuickBASIC is used as the programming language.
A number of standard IEEE-488.2 drivers are used to control the CombiScope
instrument via the GPIB. These drivers must be included in the application
program. Therefore, the first statement of an application program must be as
follows:
REM $INCLUDE: ’QBDECL.BAS’

Note:

The program examples throughout this manual have been executed
using the IEEE-488.2 drivers and the device handler GPIB.COM of
the product PM2201/03.

2-2

GETTING STARTED WITH SCPI PROGRAMMING

The parameters of these drivers are defined by the device handler GPIB.COM
and by the QuickBASIC program code. The following drivers and parameters are
used in the program examples:

•

The IEEE-488.2 driver "Send" is used to send a command or query to an
instrument.
CALL Send (, 
, , ) • The IEEE-488.2 driver "SendSetup" is used to prepare one or more devices to receive data bytes. The controller becomes talker and the device becomes listener. CALL SendSetup (, ) • The IEEE-488.2 driver "SendDataBytes" is used to send data bytes from a talking controller to a listening device. CALL SendDataBytes (, , ) • The IEEE-488.2 driver "Receive" is used to read a response string from an instrument. CALL Receive (,
, , ) • The IEEE-488.2 driver "SendIFC" is used to clear the GPIB interface. CALL SendIFC () • The IEEE-488.2 driver "IbTMO" is used to specify a time out period for the interface board. CALL IbTMO (, ) Explanation of the parameters used in the IEEE-488.2 drivers: • IEEE board identification inside the PC (default board address = 0). •
IEEE instrument address (default CombiScope instrument address = 8). • Array containing GPIB device addresses, terminated by the constant -1 (FFFF hex.). • A command or query string to be sent to the instrument. The "short form" commands are specified in UPPER CASE. The additional characters in lower case complete the "long form" commands. • One or more data characters to be sent to the listener device. GETTING STARTED WITH SCPI PROGRAMMING 2-3 • A response string sent by the instrument as a response to a query. • An "end of text" indication: 0 = program message to be continued (no action) 1 = end of program message (sends End-message + EOI true) • A "terminate" indication: 0 = response message to be continued (no detection of EOL character) 256 = end of response message (stops reading after EOL character) • A time out indication, e.g., 11 = 1 second, 12 = 3 seconds, 13 = 10 seconds. PROGRAM EXAMPLE: ’***** ’Initial program statements: ’***** REM $INCLUDE:’c:\pc-gpib\488driv\QBDECL.BAS’ CLS CALL SendIFC(0) CALL IbTMO(0, 13) ’Includes GPIB drivers ’Clears text from PC screen ’Clears the GPIB interface ’Sets time out at 10 seconds PROGRAMMING NOTE: The variable IBCNT% contains the number of response bytes (including NL) after reading a response message using the Receive driver. 2-4 GETTING STARTED WITH SCPI PROGRAMMING 2.2 Initializing the CombiScope Instrument 2.2.1 How to reset the CombiScope instrument The instrument itself can be reset by sending the *RST command. This sets the instrument to a fixed setup optimized for remote operation. The status and error data of the instrument can be cleared by sending the *CLS command. PROGRAM EXAMPLE: ’***** ’Reset the instrument and clear the status data: ’***** CALL Send(0, 8, "*RST", 1) ’Resets the instrument CALL Send(0, 8, "*CLS", 1) ’Clears the status data 2.2.2 How to identify the CombiScope instrument The identity of the instrument can be queried by sending the *IDN? query, followed by reading the instrument response message. The options of the instrument can be queried by sending the *OPT? query, followed by reading the instrument response message. PROGRAM EXAMPLE: ’***** ’Read and print the identity and options of ’***** response$ = SPACE$(65) CALL Send (0, 8, "*IDN?", 1) CALL Receive (0, 8, response$, 256) PRINT "Ident: "; LEFT$(response$, IBCNT%) CALL Send (0, 8, "*OPT?", 1) CALL Receive (0, 8, response$, 256) PRINT "Options: "; LEFT$(response$, IBCNT%) 2.2.3 the instrument: ’Requests for identification ’Reads the ident string ’Prints the ident string ’Requests for options ’Reads the options string ’Prints the options string How to switch between digital and analog mode After power on, a CombiScope instrument can be either in the digital or analog mode. After a *RST command the digital mode is selected. The INSTrument subsystem allows you to switch between the two modes. This can be done by specifying a predefined name (DIGital, ANALog) or the corresponding number (1 = digital, 2 = analog). PROGRAM EXAMPLE: ’***** ’Initialize and change the operating mode of the CombiScope instrument: ’***** CALL Send (0, 8, "INSTrument ANALog", 1) ’Switches to analog mode CALL Send (0, 8, "INSTrument:NSELect 1", 1) ’Switches back to digital mode GETTING STARTED WITH SCPI PROGRAMMING 2-5 2.3 Error Reporting Instrument errors are usually caused by programming or setting errors. They are reported by the instrument during the execution of each command. To make sure that a program is running properly, you must query the instrument for possible errors after every functional command. This is done by sending the SYSTem:ERRor? query or the STATus:QUEue? query to the instrument, followed by reading the response message. However, through this practice the same "error reporting" statements must be repeated after sending each SCPI command. This is not always practical. Therefore, one of the following approaches is advised: 1) Send the SYSTem:ERRor? or STATus:QUEue? query and read the instrument response message after every group of commands that functionally belong to each other. 2) Program an error-reporting routine and call this routine after each command or group of commands. For an example of an error-reporting routine, refer to section 3.14.4.1. 3) Program an error-reporting routine and use the "Service Request (SRQ) Generation" mechanism to interrupt the execution of the program and to execute the error-reporting routine. Therefore, refer to section 3.14.4.2. PROGRAM EXAMPLE: ’***** ’Read error message: ’***** er$ = SPACE$(60) CALL Send(0, 8, "SYSTem:ERRor?", 1) CALL Receive(0, 8, er$, 256) PRINT "Response to error query = "; PRINT LEFT$(er$, IBCNT%-1) ’Requests for error ’Reads error message ’Displays error message 2-6 GETTING STARTED WITH SCPI PROGRAMMING 2.4 Acquiring Traces Trace acquisitions are started via the INITiate commands. A single acquisition is done by sending a single INITiate command. Continuous acquisitions are done by sending the INITiate:CONTinuous ON command. The TRACe? query allows you to acquire a trace of signal samples from one of the following sources: • • An input channel, e.g., CH2 (input channel 2). A trace area in a memory register, e.g., M2_3 (Memory register 2, trace 3). The number of trace samples (acquisition length) can be specified using the TRACe:POINts command. If your instrument has standard memory, you can specify 512, 2048, 4096, or 8192 trace samples. If your instrument has extended memory, you can specify 512, 8192, 16384, or 32768 trace samples. A TRACe:POINts command specifies the acquisition length for all channels and memory registers. Example: Send --> TRACe:POINts CH1,8192 ’Selects 8192 sample points for all traces The number of trace sample bits can be specified using the FORMat command. This gives you the possibility to define samples of 8 bits (1 byte) or 16 bits (2 bytes). A FORMat command specifies the number of sample bits for all channels and memory registers. Example: Send --> FORMat INT,16 ’Formats 16-bits samples The format of the trace response data is as follows: # n x . . x f b . . . . . b s < NL> NewLine code (10 decimal) checksum byte over all trace bytes trace sample data bytes (see Note) trace data format byte (see Note) number of trace bytes (fbb...bbs) number of digits of x..x Note: If f=8 decimal, each trace sample is one byte (8 bits). If f=16 decimal, each trace sample is two bytes (16 bits), i.e., most significant byte (msb) + least significant byte (lsb). Example: # 4 1 0 2 6 <16> . . . <10> trace sample 512 trace sample 1 decimal 16 number of trace bytes (N) number of digits of N GETTING STARTED WITH SCPI PROGRAMMING 2.4.1 2-7 How to acquire a single shot trace In the program example, a single shot trace acquisition of 8192 8-bit samples is done with a probe connected to input channel 1. The trace sample bytes are read from the GPIB as string characters. The number of response bytes and the number of samples are printed. The TRIGger:SOURce command is used to specify input channel 1 as a trigger source. The TRIGger:LEVel command is used to reset the trigger level to e.g., 0.1 volts. PREPARATIONS: • Connect a probe to channel 1. After start up of the program you will be asked to trigger the acquisition with the open end of the probe, i.e., touch the probe or strike the probe on the table. PROGRAM EXAMPLE: ’***** ’Acquire a single shot trace: ’***** DIM tracebuf AS STRING * 16500 CALL Send(0, 8, "FORMat INTeger,8", 1) ’Formats 8-bits sample CALL Send(0, 8, "TRACe:POINts CH1,8192", 1) ’Formats 8192 sample points CALL Send(0, 8, "TRIGger:SOURce INTernal1", 1) ’Trigger-source = channel 1 CALL Send(0, 8, "TRIGger:LEVel 0.1", 1) ’Trigger-level = 0.1 CALL Send(0, 8, "INITiate", 1) ’Single shot initiation PRINT "Trigger the CombiScope instrument by touching the probe tip." PRINT ">>> Press any key when finished." WHILE INKEY$ = "": WEND CALL Send(0, 8, "*WAI", 1) ’Waits for previous commands to finish CALL Send(0, 8, "TRACe? CH1", 1) ’Queries for channel 1 trace CALL Receive(0, 8, tracebuf$, 256) ’Reads channel 1 trace ’ ’The contents of the tracebuf$ string is as follows: ’# 4 8194 <8> ... <10> ’ nr.of.digits = VAL(MID$(tracebuf$, 2, 1)) nr.of.bytes = VAL(MID$(tracebuf$, 3, nr.of.digits)) - 2 sample.length = ASC(MID$(tracebuf$, 3 + nr.of.digits, 1)) / 8 nr.of.samples = nr.of.bytes / sample.length PRINT "Number of bytes received ="; IBCNT% ’IBCNT% = number of bytes PRINT "Number of trace samples ="; nr.of.samples Note: Refer to section 3.4.3 "Conversion of trace data" about how to convert this string data. 2-8 2.4.2 GETTING STARTED WITH SCPI PROGRAMMING How to acquire repetitive traces In the program example, 5 trace acquisitions of 512 16-bit samples are done via a probe connected to channel 2. The trace sample bytes are read from the GPIB as string characters and written to the file TRACE5.DAT on the hard disk. PREPARATIONS: • Connect a probe from the Probe Adjust signal to channel 2. PROGRAM EXAMPLE: ’***** ’Acquire 5 sequential traces and store in file TRACE5.DAT: ’***** DIM tracebuf AS STRING * 1050 CALL Send(0, 8, "*RST", 1) ’Resets the instrument ’ ’After *RST a trace acquisition is defined at 512 samples of 16 bits ’(2 bytes). ’ CALL Send(0, 8, "CONFigure:AC (@2)", 1) ’Configures channel 2 CALL Send(0, 8, "SENSe:FUNCtion ’XTIMe:VOLTage2’", 1)’Switches channel 2 on OPEN "O",#1,"TRACE5.DAT" ’Opens file TRACE5.DAT FOR i=1 TO 5 CALL Send(0, 8, "INITiate", 1) ’Single initiation CALL Send(0, 8, "*WAI;TRACe? CH2", 1) ’Queries for channel 2 trace ’ ’Notice the *WAI; before TRACe?. The *WAI command takes care that the TRACe? CH2 command is ’executed when the INITiate command is finished. ’ CALL Receive(0, 8, tracebuf$, 256) ’Reads channel 2 trace PRINT #1, "Trace buffer:"; i ’Writes trace header to file PRINT #1, LEFT$(tracebuf$, IBCNT%) ’Writes trace buffer to file NEXT i CLOSE ’Closes file TRACE5.DAT Note: Refer to section 3.4.3 "Conversion of trace data" about how to convert this string data. GETTING STARTED WITH SCPI PROGRAMMING 2-9 2.5 Measuring Signal Characteristics The measurement instructions allow you to make a complete measurement. This includes the configuration of the instrument, the initiation of the trigger system, and the fetching of the acquisition data. The measurement instructions can be used at different levels, varying in processing time. The highest level is the most easy to use, but takes more time to complete than the lowest level. The following levels of measurement instructions can be used: The highest level: (easy to use) MEASure? The middle level: CONFigure + READ? (gives more programming flexibility) (equivalent to MEASure?) The lowest level: INITiate + FETCh? (to acquire more signal characteristics) (equivalent to READ?) The following table shows which measurement tasks are executed by the measurement instructions: MEASure? CONFigure Configures the instrument: YES READ? INITiate YES FETCh? YES Initiates the trigger system: YES YES Fetches the acquired data: YES YES YES 2 - 10 2.5.1 GETTING STARTED WITH SCPI PROGRAMMING How to make a single shot measurement The MEASure? query allows you to make a single-shot measurement, and the FETCh? query allows you to fetch more signal characteristics. PROGRAM EXAMPLE: ’***** ’Measure and print the AC-RMS, peak to peak, and amplitude of ’the signal on channel 1. ’***** response$ = SPACE$(30) CALL Send (0, 8, "MEASure:AC? (@1)", 1) ’Measures the AC-RMS value CALL Receive (0, 8, response$, 256) ’Reads the AC-RMS value PRINT "AC-RMS value : "; LEFT$(response$, IBCNT% -1) CALL Send (0, 8, "FETCh:PTPeak?", 1) ’Fetches the Peak-To-Peak value CALL Receive (0, 8, response$, 256) ’Reads the PTP value PRINT "Peak-To-Peak value: "; LEFT$(response$, IBCNT% - 1) CALL Send (0, 8, "FETCh:AMPLitude?", 1) ’Fetches the amplitude value CALL Receive (0, 8, response$, 256) ’Reads the amplitude value PRINT "Amplitude value : "; LEFT$(response$, IBCNT% - 1) 2.5.2 How to make repeated measurements The measurement instructions allow you to make repeated measurements. The CONFigure command allows you to configure the instrument, the READ? query allows you to make a measurement, and the FETCh? query allows you to fetch more signal characteristics. PROGRAM EXAMPLE: ’***** ’Measure and print 5x the AC-RMS, peak to peak, and ’amplitude of the signal on channel 1. ’***** response$ = SPACE$(30) CALL Send (0, 8, "CONFigure:AC (@1)", 1) ’Configures for AC-RMS FOR i = 1 TO 5 ’Performs 5 measurements CALL Send (0, 8, "READ:AC?", 1) ’Initiates AC-RMS reading CALL Receive (0, 8, response$, 256) ’Reads the AC-RMS value PRINT "AC-RMS: "; LEFT$(response$, IBCNT%-1); CALL Send (0, 8, "FETCh:PTPeak?", 1) ’Fetches the Peak-To-Peak value CALL Receive (0, 8, response$, 256) ’Reads the PTP value PRINT " / Peak-To-Peak: "; LEFT$(response$, IBCNT%-1); CALL Send (0, 8, "FETCh:AMPLitude?", 1) ’Fetches the amplitude value CALL Receive (0, 8, response$, 256) ’Reads the amplitude value PRINT " / Amplitude: "; LEFT$(response$, IBCNT%-1) NEXT i USING THE COMBISCOPE INSTRUMENTS 3-1 3 USING THE COMBISCOPE INSTRUMENTS 3.1 Introduction This chapter explains how to access the functions of the CombiScope instruments family in a remote programming environment. For that purpose, the CombiScope instrument is equipped with an IEEE-488 compatible GPIB interface and implements a full SCPI compatible command set which provides an extensive range of remote control facilities. Traditionally, there was no standard for the remote operation of instruments. A wide range of different command sets existed. Each set had its own terminology and trade-offs, based upon the implementations and corresponding limitations of the instrument. Similar functions in different instruments were controlled by different commands. And, vice versa, identical commands could easily exist in another instrument to control a different function. With new technologies and increasing complexity, other programming concepts were introduced. This caused programs with identical functions to look different when written for another instrument. The remote control of instruments became a cumbersome process, which required a high learning curve for each new instrument and each additional instrument. The time and costs to create and maintain application programs were unnecessarily high due to the lack of standardization. With the introduction of the Standard Commands for Programmable Instruments, commonly called SCPI, a lot of progress has been made in this area. The development time of an application program for SCPI-compatible instruments, like the CombiScope instrument, is considerably reduced. This is mainly achieved by the consistent programming environment for instrument control and data usage across all types of instruments that, regardless of the manufacturer, is provided by SCPI. The standardized commands allow the same functions in different types of instruments to be controlled by the same commands. For example, the query MEASure:FREQuency? acquires the frequency characteristic of the input signal, regardless of whether the instrument is a frequency counter, an oscilloscope, or any other measuring instrument. 3-2 USING THE COMBISCOPE INSTRUMENTS As the example already shows, the commands are easy to learn and selfexplanatory to both novice and expert users. The learning curve is considerably decreased for new instruments or instrument functions with which the programmer is not familiar. Efficiency is not only gained when creating or debugging new application programs. The easily understandable programs greatly simplify maintenance and modification of existing application programs that have been written by other persons or for other instrument functions. All major CombiScope instrument functions are controlled by standard SCPI commands. Although the functionality provided is the same, the way the oscilloscope is controlled via the remote interface differs in some aspects from the front panel operation. This is because the local front panel operation is designed to allow you to take maximum advantage of the interactive communication possibilities offered by the display screen. This allows for additional information and guidance during the process of local operation. The remote command set is based upon an instrument model that is easy to understand. This model provides a structured survey of the implemented instrument functions and serves as a guide towards the commands that control these functions. This other view allows for optimal and easy access of the instrument functions when operated from the remote interface. Additionally, a measurement instruction set allows for easy programming of measurement tasks for a wide variety of signal characteristics. USING THE COMBISCOPE INSTRUMENTS 3-3 3.2 Fundamental Programming Concepts The remote operation of your CombiScope instrument can be accessed using different programming concepts. The concept to be chosen depends upon the application of the instrument in the remote programming environment. Each of the four concepts has it own benefits and trade-offs. 1) Using measurement instructions Advantage: Easy to program. No instrument knowledge required to make measurements. So, you can start programming quickly and get measurement results rightaway. Trade-off: A measurement takes some time to complete, because the instrument automatically searches for optimal settings. Example: MEASure:FREQuency? Measures the frequency of the signal at channel 1. 2) Single function programming using the instrument model Advantage: Allows you to program individual functions separately through single commands. The instrument model gives the relation between the commands and the functions of the CombiScope instrument. Trade-off: Requires understanding of the remote operation of the instrument functions. Example: TRACe? CH1 Returns the acquisition trace of the signal at channel 1. 3) Programming the complete instrument setup Advantage: Simple to program. No worry about individual settings. This method can also be used to save and recall settings, which are not individually programmable. Trade-off: Processes complete instrument setups. Individual settings must be set or programmed separately. Example: *SAV 3 *RCL 3 Saves actual instrument settings to internal memory 3. Recalls instrument settings from internal memory 3. 4) Programming through front panel simulation Advantage: Gives the possibility to program settings for which no remote commands are available, i.e., to match a front panel setup. 3-4 USING THE COMBISCOPE INSTRUMENTS Trade-off: This way of programming is cumbersome and tricky, because additional information on the front panel display is not always available remotely. Example: DISPlay:MENU TRIGger Activates the TRIGGER softkey menu. SYSTem:KEY 4 Simulates the pressing of softkey 4. The effect is that TRIGGER menu option "noise" is switched on or off. 3.2.1 Measurement instructions This is a completely new approach in the remote operation of programmable instruments, which provides a set of task-oriented measurement instructions. Rather than programming every instrument setting separately with starting the acquisition and calculating the result, just specify the desired signal characteristic, and the CombiScope instrument returns the requested result. Depending upon the actual available signal, your CombiScope instrument automatically determines the optimal settings to acquire and calculate the requested result. An example of such a command is the MEASure:FREQuency? query, which not only works on oscilloscopes, but also on different types of SCPI-compatible instruments, such as counters and multimeters. With traditional oscilloscopes you had to do the following: - set up all functions of the oscilloscope separately. start the acquisition of the data. position the cursor markers. calculate the frequency from the acquired data. read the calculated frequency from the instrument. A single, simple SCPI query replaces all of the above, namely the MEASure:FREQuency? query which does the following: - - auto configures the oscilloscope to the best possible setting for the requested measurement task. Note: This process is different from the traditional AUTOSET process in that the autoset function determines the instrument settings based on the input signal only, whereas, the auto configure algorithm also takes the desired measurement task into account. starts the acquisition process. takes care that the measurement is triggered. calculates the desired characteristic from the acquired data. returns the calculated value. USING THE COMBISCOPE INSTRUMENTS 3-5 The measurement instructions are easy to use and do not require any special knowledge of the instrument. The programming concept reduces simple measurement tasks with complex instruments to simple instructions, leaving the setup complexity to the instrument. The measurement instructions are extremely useful when the application does not require the precise setting of instrument functions. The concept is extendible with separate control of parameters that are vital to the application. 3.2.2 Single function programming using the instrument model All major instrument functions such as time base, input impedance, etc, are separately programmable using "single parameter" commands. The easy to understand command set is comparable with the way instruments are traditionally controlled. This concept gives you full control over all functions and power of a modern oscilloscope. However, for maximum benefit of all the advanced features of your CombiScope instrument, you need some understanding of their remote operation. Functions of the CombiScope instrument that belong together are grouped into subsystems. There are several subsystems, each representing a particular function. The instrument model in the following figure gives an overview of the most important subsystems. DISPlay INPut SENSe TRACe CALCulate TRIGger ST7155 Figure 3.1 The Instrument Model for CombiScope instruments EXPLANATION OF THE INSTRUMENT MODEL: All functions that deal with signal conditioning are part of the INPut subsystem. In a similar way the SENSe subsystem contains the data acquisition part where the analog signal is converted into a digital value. The results of the acquisition are stored in a TRACe subsystem memory. Post-processing functions on the acquired data are available in the CALCulate subsystem. The TRIGger subsystem deals with the control of the acquisition process. The DISPlay subsystem handles the front panel display functions. • • • • • • 3-6 USING THE COMBISCOPE INSTRUMENTS Functions in a particular subsystem are always controlled by commands that begin with the name of that subsystem. For example, a command that programs the input coupling is INPut:COUPling DC. All programmable settings can be queried easily. The query form is obtained from the command by simply removing the parameter and adding a question mark. For example, the command to program the input impedance of your oscilloscope is INPut:IMPedance 50. This impedance value can be queried by sending INPut:IMPedance? which returns 50. 3.2.3 Instrument setup This concept allows you to program instrument settings with a single command. Several instrument setups can be saved, either created by remote programming or by front panel control. This concept can also be used to program instrument functions that cannot be directly accessed using individual program instructions. Complete instrument setups can be saved either in the internal memory of the oscilloscope or externally in the remote controller. A part of the instrument setup can also be saved externally. The oscilloscope is equipped with a number of internal memories in which the complete instrument set up can be saved and from which it can be restored. Send → *SAV 3 Send → *RCL 3 Saves the current set up into memory 3. Recalls the instrument set up that was saved in memory 3. Instead of using an internal oscilloscope memory, the instrument setup can be queried using the SYSTem:SET? query. The result of this query is that the oscilloscope sends a part or the complete setup in a compact block data format. Sending this data back as a parameter with the SYSTem:SET command reprograms the oscilloscope to the same settings. Example for the complete instrument settings: Send → SYSTem:SET? Read ← Send → SYSTem:SET Queries the oscilloscope for the complete instrument setup. Reads the response, which contains the requested instrument setup, from the oscilloscope. Sends the previously read instrument setup back to the oscilloscope in the same format. USING THE COMBISCOPE INSTRUMENTS 3-7 Example for the instrument cursor settings: Send → SYSTem:SET? 32 Queries the oscilloscope for the instrument settings of node 32, which are the cursor settings. Read ← Reads the cursor settings. . . Send → SYSTem:SET 3.2.4 Restores the cursor settings. Front panel simulation This concept allows you to send commands that simulate the pressing of a front panel key. This method allows the remote operation to precisely match a front panel setup. In particular, this method can be used to access instrument functions that cannot be programmed directly by remote commands. As described in the beginning of this section, there is a difference between the front panel operation and the remote control of an instrument. If you use the front panel simulation commands via the remote interface, be aware that no use can be made of the additional information that is presented on the screen of the oscilloscope. As this causes the front panel simulation method to be a tedious process, it is certainly not recommended as a common programming practice. For example, the SYSTem:KEY 507 command switches the AVERAGE function on when it was switched off before. When this function was switched on before, the AVERAGE function is switched off. The effect of the SYSTem:KEY command completely depends upon the state of the instrument at the moment the command is received. In a remote programming environment it is not immediately clear whether a state is on or off. For that reason the command SENSe:AVERage ON is much better. To select functions that cannot be programmed directly, you might use the front panel simulation commands. For example, the command SYSTem:KEY 4 switches the "noise suppression" option in the TRIGGER menu of the front panel ON or OFF. 3-8 USING THE COMBISCOPE INSTRUMENTS 3.3 Measuring Signal Characteristics As explained in section 3.2.1 "Measurement instructions", the measurement instruction set is a new approach in the remote operation of programmable instruments. This instruction set allows you to request a particular characteristic of the input signal. The CombiScope instrument then chooses the best possible settings, executes the requested task, and returns the desired result. Within the measurement instruction set, different programming levels can be distinguished. The highest level is the easiest to use, but the trade-off is less flexibility. Lower levels provide more flexibility by offering more control over the instrument functionality. This requires more knowledge about the remote operation of your instrument. The measurement instructions specify a particular task in terms of the expected signal and the desired result. The instructions refer to the signal characteristics of the signal being measured. This makes them independent from the implementation of the instrument functions. For example, when the instruction MEASure:FREQuency? is executed, it is not important whether this frequency is measured by precisely counting the signal period, or if it is calculated from a sampled waveform. For this reason, the measurement instructions provide the best compatibility among different types of instruments. But, as a trade-off, the compatibility decreases when more flexibility is needed and lower measurement instruction levels are used. 3.3.1 The MEASure? query This is the easiest instruction to use and provides the best compatibility. However, it does not offer access to the full capability of the CombiScope instrument. The MEASure? query configures the instrument for optimal settings, starts the data acquisition, and returns the result in one operation. The signal characteristics that can be acquired in this way are shown in figure 3.2. Example: MEASure:AC? This query measures the RMS voltage of the AC component at the default input channel 1. After the acquisition, the result is sent to the controller. The instrument itself selects an optimal setting for this purpose and carries out the requested measurement as "well" as possible. Moreover, it automatically starts the measurement. USING THE COMBISCOPE INSTRUMENTS 3.3.2 3-9 Benefits of using parameters The generic form of a measurement instruction is as follows: MEASure[:VOLTage]:? [[,]][,] The :VOLTage keyword is a default node, which specifies the signal characteristic to be measured, relates to the voltage component of the signal. The specifies the desired signal characteristic. The parameters can be used to provide additional information to the instrument about the expected signal and the desired result. The oscilloscope uses this information to determine the best settings for the requested task. As the syntax shows, the parameters can be left out (defaulted). In that case, the oscilloscope chooses it own settings based upon the actual available input signal and its own trade-offs. The result of defaulting parameters is that the measurement needs more time to complete. The VOLTage parameters relate to the :VOLTage node in the header. These parameters specify the expected voltage and the desired resolution: = [[,]] The expected voltage in the parameter specification is assumed to be the value at the BNC input of the oscilloscope. When a detectable probe is attached, it is assumed to be the value at the probe tip. When the parameter is defaulted, the oscilloscope performs an autorange, which needs some additional time. When a particular value was specified instead, the oscilloscope immediately selects the range next higher to the specified voltage, omitting the relative time-consuming autoranging. Notice that when voltage parameters are used, the :VOLtage node must be sent explicitly in the command header. Or, in other words, when the :VOLTage node is defaulted, the voltage parameters must also be defaulted. 3 - 10 USING THE COMBISCOPE INSTRUMENTS Examples: MEASure:AMPLitude? This query measures the amplitude of a waveform at the default input channel 1. After the acquisition, the resulting amplitude is returned. MEASure:VOLTage:AMPLitude? 10, (@2) This query measures the amplitude of a signal at channel 2 (@2). But, since it specifies the expected voltage value (10 volts), it will complete the measurement faster. In a similar way the measure function parameters provide the oscilloscope with information about the signal characteristic to be measured. The parameters that are allowed depend upon the requested signal characteristic (measure function). The measure function parameters that specify a voltage characteristic, such as :AC, :AMPLitude, :HIGH, :MINimum, etc, use the voltage parameters for that purpose. Measure functions, such as fall and rise time, frequency and period, use time units. Their expected value and desired resolution are specified in seconds or Hertz as separate measure parameters. Examples: MEASure:VOLTage:FREQuency? 10E6, (@3) This query measures the frequency of the signal at input channel 3. The expected frequency is 10 MHz, whereas, the expected voltage is defaulted. Notice that this command is equivalent to the MEASure:FREQuency? 10E6, (@3) command. MEASure:VOLTage:FREQuency? 5, 10E6, (@3) This query does the same as the previous example, except that the expected voltage is 5 volts. USING THE COMBISCOPE INSTRUMENTS 3.3.3 3 - 11 Waveform measurements The following figure shows the terms used for pulse measurements and the key words that are used as header nodes in the measurement instructions. TMAXimum MAXimum HIGH RISE OVERshoot RISE TIME FALL TIME FALL PREShoot PTPeak AMPLitude REFerence HIGH REFerence MIDDle REFerence LOW LOW RISE PREShoot FALL OVERshoot MINimum TMINimum PWIDth NWIDth PERiod Figure 3.2 ST7154 Pulse characteristics The reference high and low parameters determine the desired interval for rise time and fall time measurements. The default low and high references are 10% and 90% of the pulse amplitude (= HIGH - LOW). Default REFerence LOW =LOW + 0.1 * (HIGH - LOW) Default REFerence HIGH =LOW + 0.9 * (HIGH - LOW) In a similar way, the reference middle parameter determines the desired interval for pulse width (PWIDth, NWIDth) and duty cycle (PDUTycycle, NDUTycycle) measurements. When defaulted, the reference middle value is assumed to be at 50% of the amplitude. Default REFerence MIDDle =LOW + 0.5 * (HIGH - LOW) 3 - 12 USING THE COMBISCOPE INSTRUMENTS Examples: MEASure:FALL:TIME? (@3) Measures the time interval during which the pulse at channel 3 decreases from 90% to 10% of its amplitude. MEASure:RISE:TIME? 20,80 Measures the time interval during which the pulse at the default channel 1 increases from 20% to 80% of its amplitude. The following measure functions and parameters can be programmed: :AC :AMPLitude [:DC] :FALL :OVERshoot :PREShoot :TIME [ [, [, [,]]]] :FREQuency [ [,]] :HIGH :LOW :MAXimum :MINimum :NDUTycycle :NWIDth :PDUTycycle :PERiod [ [,]] :PTPeak :PWIDth :TMAXimum :TMINimum :RISE :OVERshoot :PREShoot :TIME [ [, [, [,]]]] Notes: - :DCYCle = alias for :PDUTycycle - :FTIMe = alias for :FALL:TIME - :RTIMe = alias for :RISE:TIME USING THE COMBISCOPE INSTRUMENTS 3.3.4 3 - 13 Customizing settings Often, you need more precise control of the measurements than possible with the MEASure? query. The combination of CONFigure and READ? is provided to allow you to program one or more settings that are vital to your application. Executing this sequence of instructions is equivalent to sending MEASure? For setting up the instrument, CONFigure uses the same measure functions and parameters as MEASure?. The CONFigure command does the instrument setup portion of MEASure?. The READ? query initiates the acquisition, performs the needed calculations, and returns the desired result. Since READ? no longer changes instrument settings, commands that are executed after CONFigure, but before READ?, are taken into effect by the acquisition. This concept allows you to perform a generic configuration through CONFigure and then customize the measurement by programming the settings that are vital to your application. Next the READ? completes the measurement process. Example: CONFigure:AC Configures the instrument to perform an RMS measurement of the AC component at the default input channel 1. SENSe:AVERage ON Sets averaging on. SENSe:AVERage:COUNT 4 Sets averaging factor at four. READ:AC? Starts the measurement and returns the averaged AC-RMS value. READ? uses the same measure functions and parameters as CONFigure. After the instrument has been set up for a particular measure function by the CONFigure command, the same measure function key words can be repeated by the READ? query header. Moreover, it is allowed to request for another signal characteristic by specifying a measure function other than that for which the instrument was configured. However, keep in mind that the instrument was set up by CONFigure for another task. As these settings are not affected by READ?, it is not guaranteed that the instrument is able to acquire the signal characteristic that is requested by READ? Example: CONFigure:AC Sets up the instrument to perform an RMS measurement of the AC component. 3 - 14 USING THE COMBISCOPE INSTRUMENTS READ? Requests to execute the default DC measurement. Since this is not possible with the chosen configuration, an execution error is generated and no result is returned. CONFigure:RISE:TIME Configures the CombiScope instrument to perform a rise time measurement. READ:RISE:OVERshoot? Requests to read the rise time overshoot. Because the CombiScope instrument is able to calculate the rise overshoot value when it is set up for a rise time measurement, the desired result is calculated and returned. A READ? also allows the same parameter sets as the corresponding CONFigure instructions. But, these sets only serve to specify the desired result. They are ignored as far as they affect instrument settings. The parameters can be sent for compatibility with the preceding CONFigure command. Example: CONFigure:RISE:TIME Configures the oscilloscope to perform a default rise time measurement (10% to 90% increase of the signal amplitude). READ:RISE:TIME? 20,80 Requests for the rise time of the 20 to 80% increase of the signal amplitude. As the CombiScope instrument is able to respond to this request, the desired rise time is calculated and returned. 3.3.5 Multiple measurements Sometimes it is necessary to perform multiple measurements of the same signal characteristic. This can be realized by executing multiple MEASure? queries. However, this implies that the relative time-consuming configuration portion of MEASure? is unnecessarily repeated. This can be easily avoided by using the CONFigure and READ? concept as described in the preceding chapter. This concept allows you to do the configuration only once by sending the CONFigure command one time. Sending multiple READ? queries next, causes the instrument to repeatedly execute the desired measurement. Example: CONFigure:FREQuency Configures the instrument to perform a frequency measurement. USING THE COMBISCOPE INSTRUMENTS 3 - 15 READ:FREQuency? Starts the acquisition and returns the measured frequency. READ:FREQuency? Starts a next acquisition and returns the new frequency result. READ:FREQuency? Etc. 3.3.6 Multiple characteristics from a single acquisition. It is often necessary to determine several signal characteristics from the last acquired waveform. Starting a new acquisition, as READ? and MEASure? do, is undesired. For that purpose, READ? is broken down into two additional instructions, which are the INITiate[:IMMediate] command and the FETCh? query. Executing this sequence of instructions is equivalent to READ?. The INITiate[:IMMediate] command starts the acquisition. FETCh? determines the requested signal characteristic and returns the result. This concept allows you to perform several different FETCh? queries on a single set of acquisition data. Example: MEASure:AC? Configures the instrument to measure the RMS value of the AC component of the signal at input channel 1, starts the acquisition, and returns the desired result. FETCh:FREQuency? Determines and returns the frequency of the signal that is acquired by the preceding MEASure? query. FETCh:RISE:TIME? Uses default parameters to determine and return the rise time of the first pulse. As distinct from the READ? query, defaulting the measure function part of the FETCh? query, causes the CombiScope instrument to return the characteristic that was requested with the last executed FETCh?, READ? or MEASure? query. For this reason, the measure function should always be explicitly specified in the header of the FETCh? query. 3 - 16 3.3.7 USING THE COMBISCOPE INSTRUMENTS Trigger control via GPIB You need a separate GPIB command to start a measurement synchronized with other instruments. This is done by sending the *TRG command or the GET (Group Execute Trigger) code. The MEASure? and READ? queries do not allow you to do so, because such a setup causes a query error. With the INITiate[:IMMediate] and FETCh? concept, it is possible to meet the requirements of such applications. Example: CONFigure:AC Configures the instrument to measure the AC-RMS voltage. TRIGger:SOURce BUS Specifies that the acquisition is to be triggered by GET or *TRG. INITiate Starts the measurement process. *TRG Triggers the acquisition. FETCh:AC? Determines and returns the AC-RMS value. USING THE COMBISCOPE INSTRUMENTS 3.3.8 3 - 17 Fetching characteristics from memory traces The FETCh? query not only allows you to determine a characteristic from the last acquired waveform, it also allows you to calculate a signal characteristic from a waveform that is stored in a trace memory element. Example: FETCh:RISE:TIME? (@M3_4) Calculates and returns the default rise time from a waveform that is stored in trace memory M3_4. FETCh:PERiod? (@M4_1) Determines and returns the period of the waveform that is stored in trace memory M4_1. Notice that such a FETCh? query operates properly only when there is valid waveform data stored in the trace memory. PROGRAM EXAMPLE: In this example the signal acquired via channel 2 is stored in memory register 1. The AC-RMS, peak-to-peak, and amplitude values of the stored signal are fetched and printed. DIM response AS STRING * 10 CALL Send(0, 8, "CONFigure:AC (@2)", 1) ’Configures for channel 2 CALL Send(0, 8, "SENSe:FUNCtion ’XTIMe:VOLTage2’", 1)’Switches channel 2 on CALL Send(0, 8, "INITiate", 1) ’Single initiation CALL Send(0, 8, "TRACe:COPY M1_2,CH2", 1) ’Copies CH2-trace to M1_2 ’ ’Now trace area 2 of memory register 1 is filled with the channel 2 trace. ’ CALL Send(0, 8, "FETCh:AC? (@M1_2)", 1) ’Fetches AC-RMS of M1_2 CALL Receive(0, 8, response$, 256) ’Enters AC-RMS value PRINT "AC-RMS value : "; response$ ’Prints AC-RMS value CALL Send(0, 8, "FETCh:PTPeak? (@M1_2)", 1) CALL Receive(0, 8, response$, 256) PRINT "Peak-To-Peak value: "; response$ ’Fetches Peak-To- Peak of M1_2 ’Enters Peak-To-Peak value ’Prints Peak_to_peak value CALL Send(0, 8, "FETCh:AMPLitude? (@M1_2)", 1) ’Fetches amplitude of M1_2 CALL Receive(0, 8, response$, 256) ’Enters amplitude value PRINT "Amplitude value : "; response$ ’Prints amplitude value 3 - 18 USING THE COMBISCOPE INSTRUMENTS 3.4 Acquisition 3.4.1 Acquisition control Several commands exist to control the acquisition process. The following diagram shows the possible states of the acquisition process, and the way they are affected by commands. IDLE state *RST ABORt power on INIT or INIT:CONT ON No Yes INITiated state No Yes INIT:CONT ON Wait for TRIGger state BUS IMMediate INTernal TRIGger :SOURce TRIGger :LEVel :SLOPe Wait for trigger Wait for complete LINE Acquisition completed Start acquisition Acquisition ST7186 Figure 3.3 The Trigger Model for acquisitions The trigger model shows that after a *RST command, the instrument is in the IDLE state. An acquisition doesn’t start until an INITiate command is received. Initiation of the oscilloscope occurs by sending the INITiate[:IMMediate] command USING THE COMBISCOPE INSTRUMENTS 3 - 19 or by setting INITiate:CONTinuous to ON. The INITiate[:IMMediate] command causes the CombiScope instrument to perform one complete acquisition cycle. Upon completion of the cycle the instrument returns to the IDLE state. The INItiate:CONTinuous command is used to select whether the instrument is continuously initiated or not. When INItiate:CONTinuous is set to ON, the instrument immediately exits IDLE and starts an acquisition cycle. On completion of each cycle, the instrument does not return to the IDLE state, but immediately starts another acquisition cycle. Before the acquisition takes place, the trigger conditions must be satisfied. These conditions are programmable to suit the needs of your application, as described in the next section. After a *RST command, there are no trigger conditions to be met. So, an INITiate command causes the CombiScope instrument to immediately trigger the acquisition. Executing the measurement instructions MEASure? and READ? causes the acquisition to become initiated automatically. No separate INITiate commands are needed. When the FETCh? instruction is used, the instrument must have been initiated either by a preceding INITiate[:IMMediate] command, or implicitly by a READ? or MEASure? instruction. When the CombiScope instrument receives the ABORt command, any acquisition that is in progress is aborted immediately, and the instrument returns to the IDLE state. The same occurs when *RST is received. The ABORt command distinguishes from *RST in that *RST also resets the instrument settings, whereas, ABORt does not. For example, when INITiate:CONTinuous is set to ON, a *RST command not only aborts the pending acquisition and forces the instrument to the IDLE state, but it also sets INITiate:CONTinuous to OFF, preventing the acquisition to initiate again. Since ABORt does not affect the instrument settings, an aborted acquisition cycle is immediately initiated again. When the instrument is in the IDLE state, the "no-pending operation" flag that is associated with the acquisition is set True. The *OPC and *OPC? commands use this flag to signal their "Operation Completed" response. Notice that if INITiate:CONTinuous is set to ON, the instrument does not return to the IDLE state when an acquisition cycle has completed. This means that no "Operation Completed" response is generated after the *OPC and *OPC? commands. 3 - 20 3.4.1.1 USING THE COMBISCOPE INSTRUMENTS Triggering After the measurement is initiated, the CombiScope instrument starts the real acquisition when the trigger conditions are satisfied, e.g., when the selected trigger event occurs. The trigger conditions can be ignored during a specific holdoff time, which can be programmed using the TRIGger:HOLDoff command. During the hold-off time the event detector is inhibited from acting on any trigger. Trigger Type The TRIGger:TYPE command selects the type of triggering, which can be programmed to EDGE triggering (normal trigger mode), VIDeo triggering (refer to section 3.4.1.2 "Video triggering"), LOGic, or GLITch triggering. After a *RST command, the trigger type is EDGE. Note: Logic state, pattern, or glitch settings cannot be programmed using SCPI commands. Trigger Source The TRIGger:SOURce command selects the source for the trigger event. The receipt of the GPIB interface message GET (Group Execute Trigger) or the common command *TRG serves as the trigger event when BUS is selected as trigger source. The trigger event is determined by the AC line voltage when LINE is selected, and is derived from the input signal when INTernal is programmed as trigger source. For the 2-channel CombiScope instruments, EXTernal can be programmed as the trigger source. In that case, channel 4 is selected as external trigger input. A numeric suffix is used to specify the channel number. For example, TRIGger:SOURce INT2 selects the signal at input channel 2 to trigger the acquisition. When IMMediate is selected, an acquisition does not wait for a trigger event. So, an INITiate command causes the acquisition to begin immediately. After a *RST command, the trigger source is IMMediate, which means no trigger is required. Trigger Level The TRIGger:LEVel command allows you to set the trigger level for all input channels. Programming the trigger level automatically switches off level peakpeak. The trigger level can be programmed only when the TRIGger:SOURce is INTernal. The TRIGger:LEVel:AUTO command allows you to switch level peakpeak on or off. Switching on level peak-peak, deactivates the trigger level. After a *RST command the TRIGger:LEVel is set to its maximum value and level peakpeak is switched off. USING THE COMBISCOPE INSTRUMENTS 3 - 21 Trigger Slope The TRIGger:SLOPe command allows you to define the trigger edge for all input channels, which can be POSitive, NEGative, or EITHer. After a *RST command the TRIGger:SLOPe is set to POSitive. PROGRAM EXAMPLE: CALL Send(0, 8, "CONFigure:PTPeak (@2)", 1) ’Configures channel 2 CALL Send(0, 8, "SENSe:FUNCtion 'XTIMe:VOLTage2'", 1) ’Sets channel 2 ON CALL Send(0, 8, "TRIGger:SOURce INTernal2", 1) ’Trigger source = channel 2 CALL Send(0, 8, "TRIGger:LEVel 0.2", 1) ’Trigger level = 0.2 V 'The TRIGger:LEVel command also switches level peak-peak off. CALL Send(0, 8, "TRIGger:SLOPe NEGative", 1) ’Trigger slope = negative CALL Send(0, 8, "INITiate", 1) ’Single initiation CALL Send(0, 8, "FETCh:PTPeak? (@2)", 1) ’Queries for peak-to-peak response$ = " " CALL Receive(0, 8, response$, 256) ’Enters peak-to-peak PRINT "Measured peak-to-peak = "; response$ ’Prints peak-to-peak Trigger Coupling The TRIGger:LPASs and TRIGger:HPASs commands allow you to select the Main Time Base (MTB) trigger coupling by programming a fixed cutoff frequency. The possible trigger coupling options AC coupling, DC coupling, Low Frequency reject, and High Frequency reject are mutually exclusive. The TRIGger:LPASs and TRIGger:HPASs commands are also mutually exclusive. So, activating the Low-Pass filter will switch off the High-Pass filter, and vice versa. After a *RST command, the cutoff frequency is 10 Hertz, which selects trigger coupling AC. Note: When the trigger source is INTernal, signal coupling for one input channel (n) can be programmed to AC, DC, or GROund using the INPut:COUPling command. 3 - 22 USING THE COMBISCOPE INSTRUMENTS DC COUPLING (0 Hz cutoff frequency): DC coupling causes the signal to be passed over the full bandwidth (from 0 Hz to 60/100/200 MHz). 0dB -3dB DC COUPLING DC FULL BANDWIDTH FREQ. ST7427 Figure 3.4 DC Coupling PROGRAM EXAMPLE: *** *** Select DC coupling on input signal channel 2. SENSe:FUNCtion:ON "XTIMe:VOLTage2" Sets CH2 on. INPut2:COUPling DC Sets CH2 input signal DC coupled. TRIGger:SOURce INTernal2 Sets trigger source = CH2. *** *** Select DC coupling on MTB triggering. TRIGger:FILTer:LPASs:STATe ON Sets Low-Pass filter on + cutoff frequency = 0 Hz; this selects MTB trigger DC coupling. AC COUPLING (10 Hz cutoff frequency): 0dB -3dB AC COUPLING 10Hz AC coupling causes the signal to be passed from 10 Hz to the full bandwidth frequency (60/100/200 MHz). FULL BANDWIDTH FREQ. ST7426 Figure 3.5 AC Coupling PROGRAM EXAMPLE: *** *** Select AC coupling on input signal channel 3. SENSe:FUNCtion:ON "XTIMe:VOLTage3" Sets CH3 on. INPut3:COUPling AC Sets CH3 input signal AC coupled. TRIGger:SOURce INTernal3 Sets trigger source = CH3. *** *** Select AC coupling on MTB triggering. TRIGger:FILTer:LPASs:STATe ON Sets Low-Pass filter on + cutoff frequency = 0 Hz; this selects MTB trigger DC coupling. TRIGger:FILTer:LPASs:FREQuency 10 Sets cutoff frequency = 10 Hz; this selects MTB trigger AC coupling. USING THE COMBISCOPE INSTRUMENTS 3 - 23 LF-REJECT (30 KHz cutoff frequency): LF reject (HF passed) causes the signal to be passed from the cutoff frequency (30 KHz) to the full bandwidth frequency (60/100/200 MHz). LF -REJECT 0dB -3dB 30kHz FULL BANDWIDTH FREQ. ST7428 Figure 3.6 LF Reject PROGRAM EXAMPLE: TRIGger:FILTer:LPASs:STATe ON TRIGger:FILTer:LPASs:FREQuency 3E+4 Sets Low-Pass filter on + cutoff frequency = 0 Hz (DC coupling). Sets cutoff frequency = 30 KHz; this selects MTB trigger LF-reject. HF-REJECT (30 KHz cutoff frequency) HF reject (LF passed) causes the signal to be passed from 0 Hz to the cutoff frequency (30 KHz). HF-REJECT 0dB -3dB 30kHz FULL BANDWIDTH FREQ. ST7429 Figure 3.7 HF Reject PROGRAM EXAMPLE: *** *** Select HF-reject on MTB triggering. TRIGger:FILTer:HPASs:STATe ON Sets High-Pass filter on; this selects MTB trigger HF-reject. 3.4.1.2 Video triggering TV video triggering enables stable triggering on video frames and lines from various TV standards without adjusting the trigger level, and can be selected by programming TRIGger:TYPE VIDeo. Video triggering can be programmed on signals with a positive or negative signal polarity using the TRIGger:VIDeo:SSIGnal command. 3 - 24 USING THE COMBISCOPE INSTRUMENTS The video trigger mode can be programmed to field1, field2, or lines using the TRIGger:VIDeo:FIELd... commands. The video trigger line can be programmed using the TRIGger:VIDeo:LINE command. The video system can be selected using the TRIGger:VIDeo:FORMat:... commands. The following standard video systems are supported: - NTSC : 525 lines per frame - PAL : 625 lines per frame - SECAM : 625 lines per frame - HDTV : 1050/1125/1250 lines per frame 1) Select video triggering and video standard. Examples: TRIGger:TYPE VIDeo Selects TV video triggering. TRIGger:VIDeo:FORMat:TYPE SECAM Selects the SECAM standard with 625 lines per frame. TRIGger:VIDeo:FORMat:LPFRame 1125 Selects the HDTV standard with 1125 lines per frame. 2) Select video "lines" triggering and program the line to trigger on. Examples: TRIGger:VIDeo:FIELd:SELect ALL Selects the video lines trigger mode. TRIGger:VIDeo:LINE 512 Selects video line number 512. 3) Select video "field1/2" triggering and program the line to trigger on. Examples: TRIGger:VIDeo:FIELd:SELect NUMBer Selects video field triggering. TRIGger:VIDeo:FIELd:NUMBer 2 Selects the video field2 trigger mode. TRIGger:VIDeo:FORMat:TYPE PAL Selects the PAL standard with 625 lines per frame. TRIGger:VIDeo:LINE 123 Selects video line number 123. As a result the video mode is automatically switched to field1 (field1 = lines 1 .. 312). TRIGger:VIDeo:LINE 325 Selects video line number 325. As a result the video mode is automatically switched to field2 (field2 = lines 313 .. 625). TRIGger:VIDeo:FIELd:NUMBer 1 Selects the video field1 trigger mode. As a result the video line number is automatically switched to 13 (= 325 - 625/2). USING THE COMBISCOPE INSTRUMENTS 3.4.1.3 3 - 25 The trigger modes A combination of the INITiate:CONTinuous and TRIGger:SOURce command allows you to define the following trigger modes: INITiate :CONTinuous TRIGger :SOURce >>>Single-shot<<< Generates one sweep, regardless of any trigger settings (valid after *RST). OFF IMMediate >>>Single-shot<<< Generates one sweep, triggered using trigger settings. OFF INTernal or LINE Trigger mode: >>> Single-shot <<< Generates one sweep, externally triggered OFF via channel 4 (only for PM33x0B). EXTernal >>>Auto trig<<< Generates continuous sweeps, independent of any trigger settings. ON IMMediate >>>Normal trig<<< Generates continuous sweeps, triggered using trigger settings. ON INTernal or LINE >>> Normal trig <<< Generates continuous sweeps, externally ON triggered via channel 4 (only for PM33x0B). >>>Single-Shot<<< Generates one sweep triggered by *TRG or GET, regardless of any trigger settings. Table 3.1 ON or OFF The TRIGger modes EXTernal BUS 3 - 26 USING THE COMBISCOPE INSTRUMENTS Only in the single-shot and multiple-shot trigger mode (INITiate:CONTinuous OFF), the bits 3 (SWEeping) and 5 (Waiting for TRIGger) in the OPERation status are valid. Also the Operation Complete bit (OPC bit 0) in the standard Event Status Register (ESR) is valid. This allows you to detect whether the instrument is armed (initiated), triggered (busy with acquisition), or finished with the last acquisition, i.e., ready for the next acquisition. SINGLE-SHOT MODE (TB MODE - single): Commands: CONFigure:AC Configures instrument and sets single-shot mode. OPERATION STATUS BITS: bit 5 Wait for TRIG bit 3 SWEeping OPC idle state (after *RST) 0 0 0 Wait for trigger state (INIT received) Wait for complete (triggered) 1 1 0 0 0 0 = armed or busy Finished with acquisition 0 0 1 = ready STATE DESCRIPTION: MULTIPLE-SHOT MODE (TB MODE - multi): OPERATION STATUS BITS: bit 5 Wait for TRIG bit 3 SWEeping OPC idle state (after *RST) 0 0 0 Wait for trigger state (INIT received) 1 0 0 = armed Wait for complete (triggered) 0 1 0 = busy Finished with acquisition 0 0 1 = ready STATE DESCRIPTION: The bits 3 (SWEeping) and 5 (Waiting for TRIGger) also reflect the acquisition status, when the "SINGLE ARM'D" button on the front panel was pressed. Commands: SYSTem:KEY 101 DISPlay:MENU TBMode SYSTem:KEY 1 Performs AutoSet. Displays TBMODE menu. Sets INIT:CONT OFF and sets multiple-shot mode. USING THE COMBISCOPE INSTRUMENTS 3.4.1.4 3 - 27 Pre- and post-triggering When pre-triggering is selected, the real trace acquisition begins before the moment that the trigger occurs. Triggering occurs when the trigger conditions are satisfied and the instrument leaves the "Wait for TRIGger" state as shown in the trigger diagram of figure 3.3. In a similar way, post-triggering causes the acquisition to begin after the moment that the trigger occurs. trigger moment SENSe:SWEep:OFFSet:TIME pre trigger Trace time axis end begin total acquisition time SENSe:SWEep:TIME trigger moment Figure 3.8 ST7190 Pre-triggering SENSe:SWEep:OFFSet:TIME post trigger Trace total acquisition time SENSe:SWEep:TIME Figure 3.9 time axis end begin ST7191 Post-triggering Pre- and post-triggering are programmed with the SENSe:SWEep:OFFSet:TIME command. A positive parameter value specifies a post-trigger delay, whereas, a negative value results in a pre-trigger view. After *RST, the SENSe:SWEep:OFFSet:TIME is set to -0.005, which results in a pre-trigger view of 5 ms. Because the *RST value of the total acquisition time (SENSe:SWEep:TIME) is 10 ms, the trigger point is positioned in the middle of the trace. PROGRAM EXAMPLE: CALL Send(0, 8, "SENSe:SWEep:OFFSet:TIME 0.001", 1) CALL Send(0, 8, "SENSe:SWEep:OFFSet:TIME -1E-3", 1) ’1 ms post-trigger ’1 ms pre-trigger 3 - 28 3.4.1.5 USING THE COMBISCOPE INSTRUMENTS External triggering External triggering is only possible for the PM33x0B CombiScope instruments. Channel 4 is used as the external trigger channel with the following view possibilities: - attenuator positions 0.1 and 1 V/div (AMP key). - trigger slope positive or negative (EXT TRIG key). - trigger coupling AC or DC (AC/DC key). The view facility of the external trigger channel is switched on by sending the SENSe:FUNCtion:ON "XTIMe:VOLTage4" command, or by sending the SYSTem:KEY 812 command to simulate the pressing of the TRIG VIEW key on the front panel. Note: The view facility of the external trigger channel can only be switched on when: • EXTernal or INTernal4 (CH4) is programmed as the trigger source. • Peak detection is off. Autoset scans for the presence of a signal on channel 1, 2, and the external trigger input. If there is a signal present on the external trigger input, the EXTernal trigger channel is selected as trigger source, and the external trigger view facility becomes active. Limitation: The amplitude of the external trigger signal must be high enough for the sensitivity of the external trigger input (0.1 or 1 V/div.). USING THE COMBISCOPE INSTRUMENTS 3.4.2 3 - 29 Reading trace acquisitions Once acquisitions are completed, the resulting traces ares placed in TRACe memory, as shown in the following figure. INPut TRACe SENSe memory @1 INPut[1] :VOLTage[1] CH 1 @2 INPut2 :VOLTage2 CH 2 :SWEep @3 INPut3 :VOLTage3 CH 3 @4 INPut4 :VOLTage4 CH 4 Main Time Base ST7160 Figure 3.10 The trace acquisition flow The last acquired trace at input channel 1 is placed in the TRACe memory element named CH1. The trace acquired at channel 2 in CH2, etc. This trace data can be read by using the TRACe[:DATA]? query. Example: TRACe? CH2 Returns the trace that was last acquired at input channel 2. When new acquisitions are executed, the previously stored traces are not automatically saved, but overwritten by the new result. When these traces need to be saved, they have to be copied into other TRACe memory elements, before a new acquisition is initiated. Refer to section 3.10.2 "Copying traces to memory" for a description about how to copy traces. As response to the TRACe? query the data is returned as block data. Section 3.4.3 "Conversion of trace data" specifies the coding of this data and describes how to convert this data into voltage values. 3 - 30 3.4.2.1 USING THE COMBISCOPE INSTRUMENTS Single-shot acquisition PROGRAM EXAMPLE: In this example a single-shot trace acquisition is done via channel 1. The trace bytes are entered as characters in the string response$. DIM response AS STRING * 1033 CALL Send(0, 8, "*RST", 1) ’Dimensions trace buffer ’Resets the instrument ’Trigger source becomes IMMediate ’Number of trace samples becomes 512 ’Number of trace sample bits becomes 16 ’Configures for optimal AC-RMS settings ’Initiates single acquisition ’Requests for channel 1 trace data CALL Send(0, 8, "CONFigure:AC", 1) CALL Send(0, 8, "INITiate", 1) CALL Send(0, 8, "*WAI;TRACe? CH1", 1) ’ ’Notice the *WAI; before TRACe?. The *WAI command takes care that the ’TRACe? CH1 command is executed when the INITiate command is finished. ’ CALL Receive(0, 8, response$, 256) ’Reads the channel 1 trace data 3.4.2.2 Repetitive acquisitions PROGRAM EXAMPLE: In this example 10 trace acquisitions are done via channel 1. The trace bytes are entered as characters in the string response$. The 10 trace buffers are written to the file TRACE10 on the hard disk. Triggering is done via the GPIB by sending the *TRG command. ’Dimensions trace buffer ’Resets the instrument ’Trigger source becomes IMMediate ’Number of trace samples becomes 512 ’Number of trace sample bits becomes 16 CALL Send(0, 8, "CONFigure:AC (@1)", 1) ’Configures for optimal AC-RMS settings. CALL Send(0, 8, "TRIGger:SOURce BUS", 1) ’Trigger source = GPIB OPEN "O",#1,"TRACE10" ’Opens file TRACE10 FOR i=1 TO 10 ’10 sequential trace acquisitions CALL Send(0, 8, "INITiate", 1) ’Initiates an acquisition CALL Send(0, 8, "*TRG", 1) ’Triggers via the GPIB CALL Send(0, 8, "*WAI;TRACe? CH1", 1) ’Requests for channel 1 trace ’ ’Notice the *WAI; before TRACe?. The *WAI command takes care that ’the TRACe? CH1 command is executed when the INITiate command is finished. ’ CALL Receive(0, 8, response$, 256) ’Reads the channel 1 trace PRINT #1, response$ ’Writes the trace buffer to file NEXT i ’Next trace acquisition CLOSE ’Closes file TRACE10 DIM response AS STRING * 1033 CALL Send(0, 8, "*RST", 1) USING THE COMBISCOPE INSTRUMENTS 3.4.3 3 - 31 Conversion of trace data The trace data is sent as a block of binary codes. Trace samples can be formatted to consist of 8 bits (1 byte) or 16 bits (2 bytes) codes, which can be selected by the FORMat command. Refer to section 3.10.1 "Trace formatting" for a further explanation of this command. After *RST the samples are sent as 2 byte codes. When samples are formatted as two bytes, the most significant byte (msb) is sent first, followed by the least significant byte (lsb). The sample values that are sent in the block, are coded according to the two’s complement notation. The relation between the screen positions, the values of the trace samples and the decimal value of the corresponding binary codes, is shown in the figure below. Screen position (Ps) top Trace sample value (Ts) 32767 (127) 32767 (127) 25600 (100) 25600 (100) 1 (1) 0 (0) screen mid range Decimal value of byte code -1 (-1) 1 (1) 0 (0) 65535 (255) -25600 (-100) 39936 (156) -32768 (-128) 32768 (128) trace range bottom ST7187 Note: Numbers between parenthesis apply to single byte format. Figure 3.11 Relation between screen position and trace value The value of the trace points relate to the vertical position of the corresponding sample on the screen of the CombiScope instrument. As the figure above shows, the sample with value 25600 corresponds with the top position of the screen. Similarly, the samples with values -25600 and 0 correspond to the bottom and mid-position respectively. This applies to trace samples that are formatted to consist of 16 bits (2 bytes). The values that apply to the 8 bit (1 byte) format are placed between parenthesis. The ADC allows trace acquisitions that are somewhat outside the vertical screen boundaries. Trace acquisitions use the full dynamic range of the ADC. This results in a dynamic trace range of 65535 points, whereas the screen range is limited to 51200 points. 3 - 32 3.4.3.1 USING THE COMBISCOPE INSTRUMENTS Conversion of 8-bit samples to integer As an example a conversion of a trace of 512 "8-bit" samples is shown. The format is as follows: trace bytes # 3 5 1 4 <8> . . . trace sample 512 trace sample 1 byte with decimal value 8 number of trace bytes (514) number of digits of 514 PROGRAM EXAMPLE: In this example a trace acquisition of 1 byte samples is done. Thereafter, the trace data is read and converted to integer samples in the array "trace", and the number of trace bytes and trace samples is printed. The conversion from single byte value to integer is done as follows (refer to figure 3.12): If byte ≥ 128 then integer = byte - 256. Example: byte = 255 --> integer = 255 - 256 = -1. DIM trace(512) ’Array of 512 integers DIM response AS STRING * 520 ’Trace response buffer CALL Send(0, 8, "*RST", 1) ’Resets the instrument CALL Send(0, 8, "FORMat INTeger,8", 1) ’Data format of 8-bits samples CALL Send(0, 8, "INITiate", 1) ’Single shot initiation CALL Send(0, 8, "*WAI;TRACe? CH1", 1) ’Queries for channel 1 trace CALL Receive(0, 8, response$, 256) ’Reads the channel 1 trace PRINT "Number of read bytes ="; IBCNT% ’IBCNT% = number of read bytes ’ ’The contents of the response$ string of this example will be as follows: ’ # 3 5 1 4 <8> ... <10> ’<10> is terminating LF ’ nr.of.digits = VAL(MID$(response$, 2, 1)) nr.of.bytes = VAL(MID$(response$, 3, nr.of.digits)) - 2 PRINT "Number of trace bytes ="; nr.of.bytes sample.length = ASC(MID$(response$, 3 + nr.of.digits, 1)) nr.of.samples = nr.of.bytes / (sample.length / 8) PRINT "Number of trace samples ="; nr.of.samples FOR i = 1 TO nr.of.samples trace(i) = ASC(MID$(response$, i + 3 + nr.of.digits, 1)) IF trace(i) > 127 THEN trace(i) = trace(i) - 256 END IF NEXT i USING THE COMBISCOPE INSTRUMENTS 3.4.3.2 3 - 33 Conversion of 16-bit samples to integer As an example a conversion of a trace of 512 "16-bit" samples is shown. The format is as follows: trace bytes # 4 1 0 2 6 <16> . . . trace sample 512 trace sample 1 byte with decimal value 16 number of trace bytes (1026) number of digits of 1026 PROGRAM EXAMPLE: In this example a trace acquisition of 2 byte samples is done. Thereafter, the trace data is read and converted to integer samples in the array "trace", and the number of trace bytes samples is printed. The conversion from double byte (byte1 = msb and byte2 = lsb) to integer is done as follows (refer to figure 3.12): If byte1 < 128 then integer = byte1 * 256 + byte2. If byte1 ≥ 128 then integer = (byte1 - 256) * 256 + byte2. Example: byte1 = 255 & byte2 = 32 --> integer = (255 - 256) * 256 + 32 = - 224. DIM trace(512) DIM response AS STRING * 1033 CALL Send(0, 8, "*RST", 1) ’Array of 512 integers ’Trace response buffer ’Resets the instrument ’Sets 16 bit sample data format ’Single shot initiation ’Queries for channel 1 trace ’Reads the channel 1 trace ’IBCNT% = length of trace buffer CALL Send(0, 8, "INITiate", 1) CALL Send(0, 8, "*WAI;TRACe? CH1", 1) CALL Receive(0, 8, response$, 256) PRINT "Number of trace bytes ="; IBCNT% ’ ’The contents of the response$ string of this example will be as follows: ’# 4 1 0 2 6 <16> ... <10> ’ nr.of.digits = VAL(MID$(response$, 2, 1)) nr.of.bytes = VAL(MID$(response$, 3, nr.of.digits)) - 2 PRINT "Number of trace bytes ="; nr.of.bytes sample.length = ASC(MID$(response$, 3 + nr.of.digits, 1)) nr.of.samples = nr.of.bytes / (sample.length / 8) PRINT "Number of trace samples ="; nr.of.samples FOR i = 1 TO nr.of.samples J = 2 * i + 2 + nr.of.digits ’Pointer to next sample byte1 = ASC(MID$(response$, J, 1)) ’Most Significant Byte byte2 = ASC(MID$(response$, J + 1, 1)) ’Least Significant Byte IF byte1 < 128 THEN trace(i) = byte1 * 256 + byte2 ELSE trace(i) = (byte1 - 256) * 256 + byte2 END IF NEXT i 3 - 34 3.4.3.3 USING THE COMBISCOPE INSTRUMENTS Conversion to voltage values Screen positions correspond to voltage values. This relation is shown in the figure below, and is determined by the settings that are programmed by the SENSe:VOLTage:RANGe:PTPeak and SENSe:VOLTage:RANGe:OFFSet commands. Amplitude value (Vs) Screen position (Ps) 0 Volt Trace sample value (Ts) 32767 (127) -OFFSet+PTPeak/2 top 100% -OFFSet mid 0% 25600 (100) OFFSet PTPeak -OFFSet-PTPeak/2 -100% bottom 0 (0) -25600 (-100) -32768 (-128) ST7188 Figure 3.12 Relation between screen position and amplitude value The relation between the screen position Ps and the corresponding voltage amplitude Vs is expressed by the equations: Vs = (Ps * PTPeak) / 200 - OFFSet Vs = (Ps * PTPeak) / 51200 - OFFSet (for 8-bit sample traces) (for 16-bit sample traces) As explained in section 3.4.3, there is also a relation between the screen position Ps and the value Ts of a trace sample. This relation is expressed by the equations: Ps = Ts Ps = (Ts / 25600) * 100 = Ts / 256 (for 8-bit sample traces) (for 16-bit sample traces) Eliminating Ps from the preceding equations results in a relation that can be used to calculate the voltage value Vs from a trace sample Ts. This relation is expressed by the equations: Vs = (Ts / 200) * PTPeak - OFFSet Vs = (Ts / 51200) * PTPeak - OFFSet (for 8-bit sample traces) (for 16-bit sample traces) USING THE COMBISCOPE INSTRUMENTS 3 - 35 PROGRAM EXAMPLE: In this program example a trace of 512 samples from the actual signal at input channel 1 is read. The received data block is converted to an array of voltages. After each sample conversion the voltage value is printed. This program example works for traces of 512 samples, consisting of 8 bits (1 byte) or 16 bits (2 bytes) samples. Note: The program is supplied on floppy under file name EXCNVTRC.BAS. DIM sample(512) DIM response AS STRING * 1033 DIM peaktop AS STRING * 10 DIM offs AS STRING * 10 ’ CALL Send(0, 8, "*RST", 1) CALL Send(0, 8, "CONFigure:AC (@1)", 1) ’Array of sample voltages ’Trace data response string ’Peak-to-peak response string ’Offset response string ’Resets the instrument ’Configures for optimal AC-RMS settings ’Signal-offset also becomes zero ’Initiates single acquisition ’Requests channel 1 trace ’Reads channel 1 trace CALL Send(0, 8, "INITiate", 1) CALL Send(0, 8, "*WAI;TRACe? CH1", 1) CALL Receive(0, 8, response$, 256) ’ nr.of.digits = VAL(MID$(response$, 2, 1)) nr.of.bytes = VAL(MID$(response$, 3, nr.of.digits)) - 2 sample.length = ASC(MID$(response$, 3 + nr.of.digits, 1)) nr.of.samples = nr.of.bytes / (sample.length / 8) CALL Send(0, 8, "SENSe:VOLTage:RANGe:PTPeak?", 1) ’Queries ptp CALL Receive(0, 8, peaktop$, 256) ’Reads ptp ptpeak = VAL(LEFT$(peaktop$, IBCNT%)) ’IBCNT% = length CALL Send(0, 8, "SENSe:VOLTage:RANGe:OFFSet?", 1) ’Queries offset CALL Receive(0, 8, offs$, 256) ’Reads offset offset = VAL(LEFT$(offs$, IBCNT%)) ’IBCNT% = length IF sample.length = 1 THEN FOR i = 1 TO nr.of.samples ’1-byte samples trace% = ASC(MID$(response$, i + 3 + nr.of.digits, 1)) IF trace% > 127 THEN trace% = trace% - 256 END IF sample(i) = trace% / 200 * ptpeak - offset PRINT sample(i); NEXT i ELSE FOR i = 1 TO nr.of.samples ’2-byte samples J = 2 * i + 2 + nr.of.digits ’Pointer to next sample byte1 = ASC(MID$(response$, J, 1)) ’M.S.B. byte2 = ASC(MID$(response$, J + 1, 1)) ’L.S.B. IF byte1 < 128 THEN trace% = byte1 * 256 + byte2 ELSE trace% = (byte1 - 256) * 256 + byte2 END IF sample(i) = trace% / 51200 * ptpeak - offset PRINT sample(i); NEXT i END IF 3 - 36 USING THE COMBISCOPE INSTRUMENTS 3.5 Averaging Acquisition Data Acquired traces and measured signal characteristics can be averaged over a number of acquisitions. The preprocessing AVERAGE function of the CombiScopes instruments can be enabled by using the SENSe:AVERage[STATe] command. When this function is set to ON, averaging is done according to the following formula: AVG n = ∑ ( X1 + .. + Xn ) ⁄ n In the expression, n specifies the number of acquisitions that is averaged. This parameter can be programmed by using the SENSe:AVERage:COUNt command. X represents the acquisition result to be averaged. Example: Send → SENSe:AVERage:COUnt 16 Send → SENSe:AVERage ON ’ This sets the average count factor at 16, which means 16 sequential acquisitions are averaged. ’ This enables the AVERAGE function. When SENSe:AVERage is set to ON and an acquisition is initiated, the CombiScope instrument takes n (SENSe:AVERage:COUNt) successive acquisitions, as shown in the figure on the next page. When sufficient acquisitions are taken, the final averaged result is returned. Intermediate results cannot be queried. PROGRAM EXAMPLE: Acquire the trace of the actual signal on channel 1 and measure the amplitude and frequency (averaged over 4 acquisitions). DIM trace AS STRING * 1033 ’Dimensions trace string DIM amplitude AS STRING * 10 ’Dimensions amplitude string DIM frequency AS STRING * 10 ’Dimensions frequency string CALL Send(0, 8, "CONFigure:AC (@1)", 1) ’Configures for AC-RMS CALL Send(0, 8, "SENSe:AVERage:COUNt 4", 1) ’Average factor = 4 CALL Send(0, 8, "SENSe:AVERage ON", 1) ’Averaging is turned on CALL Send(0, 8, "INITiate", 1) ’Initiates the averaging acquisition CALL Send(0, 8, "*WAI;TRACe? CH1", 1) ’Queries for channel 1 trace CALL Receive(0, 8, trace$, 256) ’Enters channel 1 trace ’The trace samples are averaged over 4 sequential trace acquisitions. CALL Send(0, 8, "READ:AMPLitude?", 1) ’Reads the amplitude CALL Receive(0, 8, amplitude$, 256) ’Enters the amplitude CALL Send(0, 8, "FETCh:FREQuency?", 1) ’Fetches the frequency CALL Receive(0, 8, frequency$, 256) ’Enters the frequency ’The amplitude and frequency are averaged over 4 sequential measured values. USING THE COMBISCOPE INSTRUMENTS 3 - 37 The following diagram shows the possible states of the acquisition process when "averaging" is on, and the way they are affected by commands. IDLE state *RST ABORt power on INIT or INIT:CONT ON No Yes INITiated state No Yes INIT:CONT ON Wait for AVERage state Yes No SENSe:AVERage:COUNt LINE TRIGger :SOURce INTernal IMMediate TRIGger :LEVel :SLOPe Wait for trigger Wait for complete 1 acquisition + averaging ST7189 Figure 3.13 The Trigger Model during acquisition averaging 3 - 38 USING THE COMBISCOPE INSTRUMENTS 3.6 Channel Selection Input channels can be switched on or off by using the SENSe:FUNCtion[:ON] or SENSe:FUNCtion:OFF commands. An input channel is selected by specifying the parameter "XTIMe:VOLTage", where the numeric suffix specifies the input channel number. After a *RST command, channel 1 is turned on and the other channels off (including the EXTernal input for PM33x0A). Addition of two channels can be selected by specifying the "XTIMe:VOLTage:SUM" parameter as follows: > Addition of CH1 and CH2: "XTIMe:VOLTage:SUM 1,2" > Addition of CH3 and CH4: "XTIMe:VOLTage:SUM 3,4" Note: Enabling of the addition of input channels (e.g. CH3+CH4), automatically switches channel 3 and channel 4 on. Disabling of the addition of two channels (e.g. CH3+CH4), automatically switches channel 3 and channel 4 off, provided at least one channel remains on. Programming tip: If CH1+CH2 is on and CH3 and CH4 are off, CH1+CH2 cannot be programmed off by sending: SENSE:FUNCtion:OFF "XTIME:VOLTage:SUM 1,2" Instead, send the command: SENSe:FUNCtion:ON "XTIME:VOLTage2" ’Sets CH2 on INPut SENSe TRACe :FUNCtion memory :OFF @1 INPut[1] :VOLTage[1] "XTIMe:VOLTage1" CH 1 [:ON] :OFF @2 INPut2 :VOLTage2 "XTIMe:VOLTage2" CH 2 [:ON] :SWEep :OFF @3 INPut3 :VOLTage3 "XTIMe:VOLTage3" CH 3 [:ON] :OFF @4 INPut4 :VOLTage4 "XTIMe:VOLTage4" CH 4 [:ON] Main Time Base ST7158 Figure 3.14 Input channel control PROGRAM EXAMPLE: CALL Send(0, 8, "SENSe:FUNCtion 'XTIMe:VOLTage:SUM 1,2'", 1) ’Sets CH1+CH2 on CALL Send(0, 8, "SENSe:FUNCtion:ON ’XTIMe:VOLTage2’", 1)’ ’Sets CH2 on, CH1+CH2 off, CH1 remains off. USING THE COMBISCOPE INSTRUMENTS 3 - 39 3.7 Signal Conditioning The INPut subsystem allows you to condition the input signals, such as AC/DC/GROund coupling, input filtering, and input impedance selection. In the digital mode, the SENSe:VOLTage:RANGe:AUTO command allows you to enable autoranging of the attenuation for each of the input channels separately. SENSe INPut :FUNCtion :OFF @1 INPut[1] :VOLTage[1] "XTIMe:VOLTage1" [:ON] :OFF @2 INPut2 :VOLTage2 "XTIMe:VOLTage2" [:ON] :SWEep :OFF @3 INPut3 :VOLTage3 "XTIMe:VOLTage3" [:ON] :OFF @4 INPut4 :VOLTage4 "XTIMe:VOLTage4" [:ON] Main Time Base ST7159 Figure 3.15 3.7.1 Signal conditioning AC/DC/ground coupling The INPut:COUPling command allows you to set the vertical input coupling at AC, DC, or GROund for each input channel separately. After a *RST command, all input channels are DC coupled. PROGRAM EXAMPLE: CALL Send(0, 8, "INPut:COUPling AC", 1) CALL Send(0, 8, "INPut2:COUPling GROund", 1) ’Sets channel 1 AC coupled ’Sets channel 2 ground coupled 3 - 40 3.7.2 USING THE COMBISCOPE INSTRUMENTS Input filtering The INPut:FILTer command allows you to turn the common low-pass filter (bandwidth limiter) on or off for all input channels at the same time. The cutoff frequency is fixed at 20 MHz. After a *RST command, the filter is turned off. PROGRAM EXAMPLE: CALL Send(0, 8, "INPut:FILTer ON", 1) ’Turns the filter on CALL Send(0, 8, "INPut:FILTer:FREQuency?", 1) ’Requests for the filter frequency response$ = " " CALL Receive(0, 8, response$, 256) ’Reads the filter frequency PRINT "Filter freq. = "; response$ ’Prints: Filter freq. = 2.00E+07 3.7.3 Input impedance The INPut:IMPedance command allows you to specify the input impedance low (50 Ω) or high (1 MΩ) for each input channel separately. After a *RST command, the impedance of each input channel is 1 MΩ. PROGRAM EXAMPLE: CALL Send(0, 8, "INPut4:IMPedance 50", 1) 3.7.4 ’Sets channel 4 impedance at 50Ω Input polarity The INPut:POLarity command allows you to set the polarity of the signal on the input channel 2 and 4. The polarity can be set to NORMal (default) or INVerted (inverted signal). PROGRAM EXAMPLE: CALL Send(0, 8, "INPut2:POLarity NORMal", 1) ’Sets INV CH2 off CALL Send(0, 8, "INPut4:POLarity INVerted", 1) ’Sets INV CH4 on 3.7.5 Vertical range and offset The SENSe:VOLTage:RANGe:PTPeak command allows you to specify the peak-to-peak range of the signal acquisition over all 8 divisions of the display screen for each input channel separately. From this peak-to-peak value the vertical sensitivity per division is calculated as follows: = / 8. After a *RST command, the peak-to-peak value is set at 1.6V for channel 1, which complies to a vertical sensitivity of 200 mV. USING THE COMBISCOPE INSTRUMENTS 3 - 41 Because the programmed PTPeak and OFFSet values directly affect the trace values, they can be used to calculate the voltage amplitude of the corresponding trace samples. As explained in section 3.4.3.3 "Conversion to voltage values", the voltage amplitude of a trace sample can be calculated from the equations: Vs = (Ts / 200) * PTPeak - OFFSet Vs = (Ts / 51200) * PTPeak - OFFSet where and (for 8-bit sample traces) (for 16-bit sample traces) Ts = the value of the trace sample Vs = the corresponding voltage amplitude The SENSe:VOLTage:RANGe:OFFSet command allows you to specify the vertical offset for each input channel. After a *RST command, the vertical offset for each input channel is zero. PROGRAM EXAMPLE: CALL Send(0,8 "SENSe:VOLTage2:RANGe:PTPeak .8", 1) ’This sets the peak-to-peak range at 800 mV. ’So, the vertical sensitivity = 800 / 8 = 100 mV. ’ CALL Send(0,8 "SENSe:VOLTage2:RANGe:OFFSet .1", 1) ’This sets a positive vertical offset of 100 mV, i.e., 1 division. 3.7.6 Autoranging attenuators The AUTO RANGE function automatically selects the vertical input sensitivity to keep the signal amplitude between 2 and 6.4 divisions on the screen. Autoranging attenuators work independently on the following acquisition channels: > Input channel 1, 2, 3, and 4 for the PM33x4B CombiScope instruments. > Input channel 1, and 2 for the PM33x2B CombiScope instruments. Auto attenuation uses a peak-to-peak calculation to determine the maximum and minimum value of an acquisition, regardless of the input coupling. When auto attenuation is switched on for an input channel , the input signal is automatically forced to AC coupling. Still, it is possible to switch to DC coupling by programming the INPut:COUPling DC command. However, in that case, the proper operation cannot be guaranteed. LIMITATION: Auto attenuation is limited to 50 mV minimum per division. This minimum value is used as the noise level to prevent auto attenuation from trying to adjust noise on an open input channel. PROGRAM EXAMPLE: CALL Send(0, 8, "INITiate:CONTinuous ON", 1) CALL Send(0, 8, "SENSe:FUNCtion 'XTIMe:VOLTage2'", 1) CALL Send(0, 8, "SENSe:VOLTage2:RANGe:AUTO ON", 1) ’Sets auto attenuation for channel 2 ON and switches to AC signal coupling ’Auto triggering ’Sets CH2 on 3 - 42 USING THE COMBISCOPE INSTRUMENTS 3.8 Time Base Control In the digital mode, the SENSe:SWEep:TIME:AUTO command allows you to enable autoranging of the main timebase (MTB). 3.8.1 Number of samples The TRACe:POINts command allows you to set the number of sample points, which is the total acquisition length for all traces. The number of samples is limited to discrete values; refer to the TRACe:POINts command reference for a detailed specification of these values. After a *RST command, the number of samples is 512. Note: If the number of samples is changed, the contents of all trace memories is cleared. So, all previously stored traces are lost! PROGRAM EXAMPLE: CALL Send(0, 8, "*RST", 1) ’Acquisition length = 512 samples. CALL Send(0, 8, "TRACe:POINts CH1,8192", 1) ’Acquisition lengthd = 8192 samples. 3.8.2 Time base speed The SENSe:SWEep:TIME command specifies the time base of a sweep, which is the time duration of one complete trace acquisition. Because the SENSe:SWEep:TIME values are limited in the digital mode by permitted MTB values, only particular values can be specified with this command. Refer to the SENSe:SWEep:TIME command reference for a detailed specification of these values. Together with the number of trace points (TRACe:POINTs), the SENSe:SWEep:TIME command determines the Main Time Base (MTB). The MTB is expressed in seconds per division. Since there are 50 points in each division, the MTB can be calculated from the following equation: MTB = 50 * SENSe:SWEep:TIME / (TRACe:POINts -1 ) USING THE COMBISCOPE INSTRUMENTS 3 - 43 PROGRAM EXAMPLE: CALL Send(0, 8, "SENSe:SWEep:TIME?, 1) CALL Receive(0, 8, STIME$, 256) CALL Send(0, 8, "TRACe:POINts? CH1, 1) CALL Receive(0, 8, TPOINTS$, 256) SWETIM = VAL(STIME$) TRAPOI = VAL(TPOINTS$) MTB = 50 * SWETIM / (TRAPOI-1) PRINT "Main Time Base ="; MTB ’Requests sweep time ’Reads sweep time ’Requests number of trace points ’Reads number of trace points ’Converts string to variable ’Converts string to variable ’Calculates the MTB ’Prints the MTB In a similar way, the time value Ts that is associated with a trace sample point can be calculated from the following expression: Ts = * SENSe:SWEep:TIME / (TRACe:POINts - 1) where is the point number of the sample in the trace. 3.8.3 Real time acquisition Since there is a physical limit to the maximum sample rate of the ADC, traces with a duration which is less than 200 ns cannot be sampled within one real-time acquisition. To allow you to go below the 200 ns limit, the CombiScope instrument uses particular random sampling techniques, where points in the requested trace are collected from a number of successive acquisitions. The result returned is a reconstruction of the original signal out of several acquisitions, which is not real time. When real time acquisition needs to be guaranteed, the command SENSe:SWEep:REALtime[:STATe] must be set to ON. This disables the random sampling techniques. The trade-off is that the SENSe:SWEep:TIME range is limited to 200 ns. After *RST the :REALtime command is set to OFF. The "peak detection" function allows the Analog-to-Digital Converters (ADC) to operate at their highest speed, even when a lower time base speed is selected. The result is that maximum and minimum peaks of the signal are detected, even at lower time base speeds. This is called oversampling. The SENSe:SWEep:PDETection[:STATe] command allows you to switch peak detection on or off. PROGRAM EXAMPLE: CALL Send(0, 8, "*RST", 1) CALL Send(0, 8, "SENSe:SWEep:REALtime ON", 1) CALL Send(0, 8, "SENSe:SWEep:PDETection ON", 1) ’Real time mode off ’Real time mode on ’Sets peak detection on. 3 - 44 3.8.4 USING THE COMBISCOPE INSTRUMENTS Autoranging time base The AUTO RANGE function of the Main Time Base (MTB) adjusts the time base automatically, so that two to six waveform periods are displayed on the screen. If a waveform doesn't contain enough information to calculate its period, the time base is adjusted to acquire a minimum of two periods. One period of a signal is determined by three successive crossings of the hysteresis band with the input signal. The level of the hysteresis band can be set using the TRIGger:LEVel command. X1 HYSTERESIS X3 TRIGGER LEVEL X2 ST7430 PERIOD LENGTH Figure 3.16 Definition of a signal period LIMITATION: When operating with an acquisition length of 512 points, the maximum input frequency is 25 MHz. For all other acquisition lengths, the maximum input frequency is 50 MHz. When the input frequency is greater than the maximum alias detection frequency, it is no longer possible to detect aliasing. PROGRAM EXAMPLE: CALL Send(0, 8, "INITiate:CONTinuous ON", 1) CALL Send(0, 8, "TRIGger:SOURce INTernal1", 1) CALL Send(0, 8, "SENSe:SWEep:TIME:AUTO ON", 1) ’Auto triggering ’Sets CH1 trigger source ’Sets auto time base on USING THE COMBISCOPE INSTRUMENTS 3 - 45 3.9 Post Processing TRACe CH 1 M1_1 M2_1 M3_1 M50_1 CH 2 M1_2 M2_2 M3_2 M50_2 CH 3 M1_3 M2_3 M3_3 M50_3 CH 4 M1_4 M2_4 M3_4 M50_4 CALCulate1 SENSe CALCulate2 ST7161 Figure 3.17 3.9.1 Post processing control How to do post processing The post processing functions CALCulate1 and CALCulate2 comply with the front panel functions MATH1 and MATH2 of the CombiScope instrument. They work only in the digital mode. The use of the CALCulate functions is as follows: 1 Select the source for the post processing function. 2 Specify the settings of the post processing function. 3 Enable the post processing function. 4 Check the result of the post processing function. 3.9.1.1 Select the source for the post processing function. Select the trace that is to be sourced into the CALCulate function by sending the CALCulate:FEED command. Examples: Send → CALCulate2:FEED "CH3" Send → CALCulate:FEED "M2_1" ’Channel 3 = source for CALC2 ’M2_1 = source for CALC1 Empty traces may not be selected as input trace. A memory register 1 location (M1_ j) may not be specified as the source (feed) for CALCulate1 and a memory register 2 location (M2_ j) may not be the source (feed) for CALCulate2. After a *RST command, CH1 becomes the input trace for both CALculate functions. Note: CH3 and CH4 cannot be selected as source for the PM33x0B CombiScope instruments. 3 - 46 USING THE COMBISCOPE INSTRUMENTS CALCulate TRACe CH 1 M1_1 M2_1 M3_1 M50_1 CH 2 M1_2 M2_2 M3_2 M50_2 CH 3 M1_3 M2_3 M3_3 M50_3 CH 4 M1_4 M2_4 M3_4 M50_4 CALCulate[1] SENSe CALCulate2 CALCulate:FEED "M3_2" ST7162 CALCulate2:FEED "M2_4" Figure 3.18 3.9.1.2 Post processing feed definition Specify the settings of the post processing function. When desired, specify the settings of the post processing function to be used. The following settings can be programmed: - the filter type of the FFT function RECTanguler | HAMMing | HANNing - the width of the low-pass filter window 3, 5, 7, .., 39, 41 points - the width of the differential window 3, 5, 7, .., 127, 129 points Example: Send → CALCulate2:TRANsform:FREQuency:WINDow HAMMing ’Defines the Hamming filter for the FFT process. 3.9.1.3 Enable the post processing function. Enable the desired post processing function by using the :STATe command of the calculate function concerned. The following post processing functions are available: STANDARD AVAILABLE: - mathematical calculations :MATH - frequency filtering :FILTer:FREQuency - frequency domain transformations (FFT) :TRANsform:FREQuency OPTIONAL: - histogram transformation :TRANsform:HISTogram - integrating traces :INTegral - differentiating traces :DERivative (alias :DIFFerential) Example: Send → CALCulate2:TRANsform:FREQuency:STATe ON ’Enables FFT The post processing is automatically executed when a trace that is fed into the CALCulate function is changed. If a mathematical function is switched on, the other functions are automatically switched off. USING THE COMBISCOPE INSTRUMENTS 3.9.1.4 3 - 47 Check the result of the post processing function. The results of the post processing functions :MATH :TRANsform:FREQuency :TRANsform:HISTogram are stored in M1_1 for CALCulate1 and in M2_1 for CALCulate2, regardless of the input (feed) trace. The results of the post processing functions :FILTer:FREQuency :INTegral :DERivative (or :DIFFerential) are stored in M1_n or M2_n, depending of the input source. When CHn or Mi_n is the input trace for CALCulate1, the result is placed in M1_n (n = 1, 2, 3, 4). When CHn or Mi_n is the input trace for CALCulate2, the result is placed in M2_n (n = 1, 2, 3, 4). Example: Send → CALCulate2:FEED "CH3" Send → CALCulate2:INTegral:STATe ON ’The result is that the integral of the channel 3 trace is placed in M2_3. When the result of a calculation is saved in a trace memory location, the other trace locations of the same memory register are used by the calculate process. Data stored in these locations may be destroyed. For example, a CALculate1 process that stores the result in M1_2, may also destroy the contents of M1_1, M1_3, and M1_4. The result of a CALCulate function that is stored in a trace memory can be read into the controller by using the TRACe? query. Example: Send → TRACe? M2_1 Read ← Note: ’Requests for M2_1 trace ’Reads M2_1 trace The result of a CALCulate block can be used as source for the other CALCulate block, but not as source for the same CALCulate block. PROGRAM EXAMPLE: STRING * 1033 ’Dimensions trace buffer "CALCulate2:FEED ’CH3’", 1) ’Channel 3 = source CALC2 "CALCulate2:TRANsform:FREQuency:WINDow HAMMing", 1) "CALCulate2:TRANsform:FREQuency:STATe ON", 1) ’Enables FFT-Hamming CALL Send(0, 8, "TRACe? M2_1", 1) ’Requests for M2_1 trace CALL Receive(0, 8, response$, 256) ’Reads the M2_1 trace DIM response CALL Send(0, CALL Send(0, CALL Send(0, AS 8, 8, 8, 3 - 48 3.9.2 USING THE COMBISCOPE INSTRUMENTS Mathematical calculations Mathematical calculations can be performed on 2 traces using the CALCulate1:MATH and CALCulate2:MATH functions. These functions comply with the front panel features MATH1 and MATH2 respectively. The calculation can be an addition (+), a subtraction (-), or a multiplication (*). The attenuation of the resulting trace is automatically set higher than the sum of the attenuations of the individual traces. PROGRAM EXAMPLE: CALL Send(0, 8, "CALCulate:MATH (CH1+CH2)", 1) ’Channel 1 + channel 2 CALL Send(0, 8, "CALCulate:MATH:STATe ON", 1) ’Math function enabled ’The resulting trace (CH1 + CH2) is stored in M1_1. CALL Send(0, 8, "CALCulate2:MATH (M1_1 - CH2)", 1) ’M1_1 - channel 2 ’The resulting trace (which is the CH1 trace) is stored in M2_1. The first argument in the expression that defines the mathematical operation to be performed, is a trace that may be specified either implicitly, or explicitly by its trace name. A trace is specified implicitly when the keyword IMPLied is used as argument in the expression. When IMPlied is specified, the trace that is programmed with the CALCulate:FEED command is used as the first argument in the expression. The trace that determines the second argument must always be specified explicitly by its trace name. PROGRAM EXAMPLE: CALL Send(0, 8, "CALCulate:FEED ’CH3’", 1) ’Channel 3 = input source CALL Send(0, 8, "CALCulate:MATH (IMPLied+CH2)", 1)’Channel 3 + channel 2 CALL Send(0, 8, "CALCulate:MATH:STATe ON", 1) ’Math function enabled ’The resulting trace (CH3 + CH2) is stored in M1_1. 3.9.3 Differentiating and integrating traces The INTegral function performs a point-to-point integration on a trace. The result of the integration process is a trace. Each point in the trace is the integral up to the corresponding point in the original (input) trace. The DERivative (DIFFerential) function calculates the differential quotient of the trace points. Each point in the resulting trace is the derivative of the corresponding point in the original (input) trace. The width of the differential window can be programmed from 3 to 129 points in increments of 2 points by the CALCulate:DERivative:POINts command. After a *RST command, the number of points is 5. USING THE COMBISCOPE INSTRUMENTS 3 - 49 Scaling can be adjusted with the "CURSORS TRACK and delta" knobs via the MATHPLUS - PARAM menu option. PROGRAM EXAMPLE: CALL Send(0, 8, "CALCulate:INTegral:STATe ON", 1) ’Integral CALC1 on CALL Send(0, 8, "CALCulate2:DERivative:POINts 35", 1)’35 differential points CALL Send(0, 8, "CALCulate2:DERivative:STATe ON", 1) ’Differential CALC2 on 3.9.4 Frequency domain transformations The result of an FFT (Fast Fourier Transformation) calculation is displayed as a trace of amplitude values (vertically) versus frequency values (horizontally). The vertical result can be expressed as a relative or an absolute amplitude value. The CALCulate:TRANsform:FREQuency:TYPE command selects between the RELative and ABSolute result. The DISPlay:WINDow:TEXT:DATA? query allows you to read the calculated amplitude and frequency value. RELATIVE FFT: A relative FFT calculation consists of a frequency (Hz) and an amplitude in (dB), relative to the frequency component with the largest amplitude. ABSOLUTE FFT: An absolute FFT calculation consists of a frequency (Hz) and an amplitude in dBm (dB with respect to 1 milliwatt), dBµV (dB with respect to 1 microvolt), or Vrms (Volt RMS) as selected via the front panel CURSORS - READOUT softkey menu. The following FFT window functions can be selected CALCulate:TRANsform:FREQuency:WINDow command: using the • The FFT RECTangular function transforms a repetitive time amplitude trace into its power spectrum. • The FFT HAMMing and HANNing functions reduce the side lobes by applying a Hamming respectively Hanning window to the input signal. This improves the visibility of the minor frequency components if the limited area is not accurately selected. The resulting FFT trace is a MIN/MAX (envelope) trace, which means that each trace point is determined twice (one for the MINimum envelope and one for the MAXimum envelope). The FFT trace points are scaled between +4 and -4 divisions on the screen. So, the samples values that are returned as response to a TRACe? query are shifted 4 divisions upwards. The values of the resulting FFT trace points are between -0 dB and -80 dB. This results in the following relation between screen position and sample value: 3 - 50 screen range USING THE COMBISCOPE INSTRUMENTS top - - - - ------------------mid - - - - ------------------bottom - - Figure 3.19 Trace sample value 16-bits 8-bits 100 25600 75 19200 50 12800 25 6400 0 0 - 25 - 6400 - 50 - 12800 - 75 - 19200 - 100 - 25600 Trace point value - 0 dB - 10 dB - 20 dB - 30 dB - 40 dB - 50 dB - 60 dB - 70 dB - 80 dB trace range Relation between screen position and FFT value TRACE POINT VALUES: FFT trace sample values, as entered with the TRACe:DATA? query, can be converted to FFT point value as follows: Subtract from the sample value the offset value for 4 divisions: - for 8-bit samples: 4 * 25 = 100 - for 16-bit samples: 4 * 6400 = 25600 Multiply the result with the following correction factor: - for 8-bit samples: -10(dB) / -25 = 0.4 - for 16-bit samples: -10(dB) / -6400 = 0.0015625 • • So, the conversion from a trace sample value (Ts) to a trace point value (Ps) is expressed by the equations: - for 8-bit samples: Ps = (Ts - 100) * 0.4 - for 16-bit samples: Ps = (Ts - 25600) * 0.0015625 Note: For an explanation of Ts and Ps, refer to section 3.4.3 "Conversion of trace data". When relative FFT calculation is selected, the amplitude trace point values represent the relative strength of the frequency components. The component with the highest amplitude is taken as the reference level, referred to as the 0 dB level. When absolute FFT calculation is selected, the amplitude trace point values depend on the absolute reference level as selected via the CURSORS - READOUT front panel menu, which can be one of the following: - dBm (reference = 1 mW) with REFerence IMPedance of 50Ω - dBm (reference = 1 mW) with REFerence IMPedance of 600Ω - dBµV (reference = 1 µV) - Vrms (reference = RMS signal amplitude) USING THE COMBISCOPE INSTRUMENTS 3 - 51 Absolute FFT amplitudes are calculated from the true signal using the information on the actual attenuator setting in the range from 5 V/div. to 2 mV/div. This results in an offset value to be added to the relative FFT amplitude for each attenuator setting. In any attenuator setting, the reference level for the absolute FFT value is calculated from a peak-to- peak amplitude of a sine wave on a screen of 6.34 divisions. This amplitude equals an RMS value of: 6,34 ⁄ 2 2 ≈ 2,24 This level is used as the reference level (top of screen) for the FFT amplitude display. For any attenuator setting, the reference level can be calculated as follows: 2,24 * Examples: At 20mV/div. : At 100mV/div.: 2.24 2.24 * 20 ≈ 44.8 mVrms * 100 ≈ 224 mVrms For a 50Ω system, a signal amplitude of 224 mVrms corresponds to the following signal power: 2 P = ( 0,224 ) ⁄ 50 ≈ 0,001 W ≈ 1 mW This can also be expressed as a signal level of 0dBm at 50Ω impedance. The same voltage measured in a 600Ω system corresponds to the following power level: 2 P = ( 0,224 ) ⁄ 600 ≈ 0,0000836 W ≈ 83,6 µW This can be calculated as a signal level of: 10 10 10 * log ( 83.6E-6 ⁄ 1 mW ) = 10 * log ( 83.6E-3 ) ≈ – 10.7 dBm Vrms offset calculation: A signal of 1 mW at 50Ω impedance is taken as voltage reference at 100 mV/div. From this signal the RMS voltage is calculated as follows: Urms = ( P *R ) = ( 1E-3 *50 ) = 0,2236068 For a whole screen of 10 divisions, Urms = 2.236068. Depending on the attenuator setting, the Vrms offset voltage is calculated as follows: Vrms offset = attenuation * Urms Example for attenuator setting 0.5 V/div.: Vrms offset = 0,5 *2,236068 = 1,118034 3 - 52 USING THE COMBISCOPE INSTRUMENTS dBm - 50Ω offset calculation: From the Vrms offset value the dBm-50Ω offset value is calculated as follows: 10 dBm – 50Ω offset = 20 * log ( Vrms offset ⁄ 0,2236068 ) Note: ( P *R ) = ( 1E-3 *50 ) = 0,2236068 Example for attenuator setting 0.5 V/div.: 10 dBm – 50Ω offset = 20 * log ( 1,118034 ⁄ 0,2236068 ) = 13,9794 dBm - 600Ω offset calculation: From the Vrms offset value the dBm-600Ω offset value is calculated as follows: 10 dBm – 600Ω offset = 20 * log ( Vrms offset ⁄ 0,7745967 ) Note: ( P *R ) = ( 1E-3 *600 ) = 0,7745967 Example for attenuator setting 0.5 V/div.: 10 dBm – 600Ω offset = 20 * log ( 1,118034 ⁄ 0,7745967 ) = 3,1875874 dBµV offset calculation: From the Vrms offset value the dBµV offset value is calculated as follows: 10 dBµV offset = 20 * log ( Vrms offset ⁄ 1.0E-6 ) Note: 0 dBµV = 1 µV (1.0E-6 V) at 50Ω impedance. Example for attenuator setting 0.5 V/div.: 10 dBµV offset = 20 * log ( 1,118034 ⁄ 1E-6 ) = 120,9691 USING THE COMBISCOPE INSTRUMENTS 3 - 53 SUMMARY OF CALCULATED OFFSET VALUES: ATTENUATOR SETTING: 5 2 1 V/div ,, ,, Vrms: dBm-50Ω: dBm-600Ω: dBµV: + 11.18034 + 4.4721359 + 2.236068 + 33.9794 + 26.0206 + 20.0 + 23.187588 + 15.228787 + 9.2081872 + 140.9691 + 133.0103 + 126.9897 ,, ,, ,, + + + 1.118034 0.4472136 0.2236068 + 13.9794 + 6.0206 0.0 + 3.1875874 - 4.771213 - 10.791813 + 120.9691 + 113.0103 + 106.9897 50 20 10 mV/div ,, ,, + + + 0.1118034 0.0447214 0.0223607 - 6.0206 - 13.979392 - 20.0 - 16.812413 - 24.771206 - 30.791813 + 100.9691 + 93.010308 + 86.989708 5 2 ,, ,, + + 0.0111803 0.0044721 - 26.020632 - 33.97947 - 36.812444 - 44.771282 + 80.96907 + 73.01023 0.5 0.2 0.1 Note: The PROGRAM EXAMPLE on the next page shows how it is programmed. TRACE POINT FREQUENCIES: The horizontal frequency values (in Hz per point) are calculated from the trace sample index (point number of the sample in the trace), the acquisition length (TRACe:POINts), and the MTB (calculated from the SENSe:SWEep:TIME) by the following equation: Fs = ( * 1250) / (TRACe:POINts * MTB * 50) Restriction: Only trace sample data can be queried from trace memories; no trace administration data, such as acquisition length and MTB value. This means that these values must be queried from the actual input channel signal, which is taken as the source for the FFT process. So, take care that the acquisition length nor the MTB is changed between activating the post processing function and reading the trace memory where the post processing trace is stored. 3 - 54 USING THE COMBISCOPE INSTRUMENTS PROGRAM EXAMPLE: The following program example converts a relative or absolute FFT trace of 512 samples of 1 or 2 bytes from the signal on channel 1 via the MATH1 feature as follows: Before running this program, first make the FFT selections desired via the front panel, such as: > MATH - MATH1 "on" and "fft". > CURSORS "on" and "m1.1". > MATH - PARAM - FILTER "hamming", "hanning", or "rectang". > MATH - PARAM - READOUT "rel" to select relative FFT. > MATH - PARAM - READOUT "abs" to select absolute FFT. + CURSORS - READOUT "dBm + 50Ω", "dBm + 600Ω", "dBµV", or "Vrms". • • Request the following values: > The acquisition length using the TRACe:POINts? CH1 query. > The sweep time to calculate the MTB using the SENSe:SWEep:TIME? query. MTB = (sweep_time * 50) / (acquisition_length - 1). The calculation factor to determine the sample point frequencies is determined as follows: calc = 1250 / (acquisition_length * MTB * 50). > The peak-to-peak voltage to calculate the attenuation using the SENSe:VOLTage:RANGe:PTPeak? query. Attenuation = peak-to=peak / 8. > The FFT type, i.e., ABSolute or RELative, using the CALCulate:TRANsform:FREQuency:TYPE? query. • Read the FFT trace from memory register m1.1 using the TRACe? M1_1 query. • Convert and print the frequency and amplitude values of the FFT trace sample points according to the formulas as explained before. Note: The program prints the calculated values in groups of 20 sample points on the screen of your computer. Note: The program is supplied on floppy under file name EXFFTTRC.BAS. USING THE COMBISCOPE INSTRUMENTS 3.9.5 3 - 55 Histogram functions The HISTogram function calculates an amplitude distribution of the incoming trace. The number of points in the histogram trace is 512. Each point in the histogram specifies the number of times that a data point of the incoming trace is within a particular amplitude belt. Since there are 512 histogram points, there are also 512 amplitude belts. The range of the amplitude belts is determined by the selected peak-to-peak range (SENSe:VOLTage:RANGe:PTPeak) and is expressed by the following equation: amplitude belt = peak-to-peak range / 512 Notice that a histogram contains 512 valid data points. The number of points (TRACe:POINts) of the trace memory location where the histogram is stored, may exceed this value. In that case the values of the trace positions above 512 have to be ignored. The histogram is displayed on the screen in the area between +3 and -2 divisions vertically, and between the third and the seventh division horizontally. The horizontal axis represents the amplitude in volts. The vertical axis represents the number of occurrences of an amplitude in percents. PROGRAM EXAMPLE: CALL Send(0, 8, "CALCulate:TRANsform:HISTogram:STATe ON", 1) ’This turns the histogram function on. 3.9.6 Frequency filtering The FILTer function performs digital low-pass filtering to suppress undesired frequency noise. The width of the filter window can be programmed from 3 to 41 points in increments of 2 points. After a *RST command, the number of points is 19. PROGRAM EXAMPLE: CALL Send(0, 8, "CALCulate:FILTer:FREQuency:POINts 35", 1) ’35 filter points CALL Send(0, 8, "CALCulate:FILTer:FREQuency:STATe ON", 1) ’Filter CALC1 on 3 - 56 USING THE COMBISCOPE INSTRUMENTS 3.10 Trace Memory The trace memory of the CombiScopes instruments consists of space for channel acquisition traces (CH1 to CH4) and memory register traces (M1 to M8 and M9 to M50 extended). The amount of acquisition and register space depends on the following: • Whether the CombiScope instrument is equipped with standard or with extended memory. • The specified acquisition length (number of trace samples) with the TRACe:POINts command. Example: Send → TRACe:POINts CH1,8192 This command specifies an acquisition length of 8192 samples for all traces. Notes: - Only the following trace acquisition lengths can be programmed: 512, 2024 (2K), 4096 (4K), 8192 (8K), 16384 (16K), or 32768 (32K) - If a different acquisition length is programmed, the contents of all acquisition and register space is cleared. So, all previously stored traces are lost! - After a *RST command, the number of trace samples is 512. - The resulting traces of the post processing functions are always stored in memory register 1 for CALCulate1 functions and in memory register 2 for CALCulate2 functions. TRACe CH 1 M1_1 M2_1 M3_1 M50_1 CH 2 M1_2 M2_2 M3_2 M50_2 CH 3 M1_3 M2_3 M3_3 M50_3 CH 4 M1_4 M2_4 M3_4 M50_4 SENSe ST7163 Note: For standard memory, 8 memory registers are available (M1 to M8). For extended memory, 50 memory registers are available (M1 to M50). Figure 3.20 Note: Trace memory control CH3 and CH4 cannot be selected as the source for the PM33x0B CombiScope instruments. Instead the external channel can be selected, e.g., M1_E. USING THE COMBISCOPE INSTRUMENTS 3 - 57 The following table shows the relation between the trace acquisition length (TRACe:POINts) and the available channel (CHx) and memory traces (Mx). TRACe:POINts STANDARD: 512 2K 4K 8K EXTENDED: 512 8k 16K 32K CHANNELS: MEMORY REGISTERS: 4 4 2 1 (PM33x0B) (2+EXT) (2+EXT) (2) (1) M1 .. M8 M1 .. M2 M1 .. M2 M1 .. M2 4 4 2 1 (PM33x0B) (2+EXT) (2+EXT) (2) (1) M1 .. M50 M1 .. M2 M1 .. M2 M1 .. M2 Examples: - Standard memory 4K acquisition length allows, for example: CH1 + M1_1 + M2_1 + CH3 + M1_3 + M2_3 - Extended memory 32K acquisition length allows, for example: CH2 + M1_2 + M2_2 Table 3.2 Relation between acquisition length and available trace memory Note: Delayed Time Base (DTB) acquisition traces are only saved in the CH1 to CH4 memory, when the acquisition length is 512 samples. DTB acquisitions can only be defined via front panel operations. 3.10.1 Trace formatting The FORMat command allows you to format the resolution of trace sample values. The resolution is determined by specifying the number of bits used to code the sample values of all trace acquisitions. Trace samples can be programmed to be formatted as 16 bits (2 bytes) or as 8 bits (1 byte). After a *RST command, the number of trace sample bits is 16 (2 bytes). Notice that the contents of acquisition and register space is not cleared when a different trace format is programmed. PROGRAM EXAMPLE: CALL Send(0, 8, "*RST", 1) CALL Send(0, 8, "FORMat INTeger,8", 1) ’Length of trace samples = 16 bits ’Length of trace samples = 8 bits 3 - 58 3.10.2 USING THE COMBISCOPE INSTRUMENTS Copying traces to memory The TRACe:COPY command allows you to copy the contents of a memory register to another memory register. This allows you to fill a memory register with traces from one of the following sources: • Copy an acquisition trace from one of the input channels. Example: Send → TRACe:COPY M1_2,CH2 Note: • ’ Copies from CH2 to M1_2 The result of this command is also that the acquisition traces of other channels (CHn) are copied into M1_n, provided channel CHn is on. So, all previously stored traces in M1 are lost! Copy a previously stored trace from another trace memory register. Example: Send → TRACe:COPY M2_2,M1_2 Note: ’ Copies from M1_2 to M2_2 The result of this command is also that all stored traces of M2_N are copied into M1_n, provided a trace was stored before. So, all previously stored traces in M2 are lost! PROGRAM EXAMPLE: ’Channel 1 on ’Channel 2, 3, 4 off CALL Send(0, 8, "SENSe:FUNCtion ’XTIMe:VOLTage3’", 1) ’Channel 3 also on CALL Send(0, 8, "*RST", 1) CALL Send(0, 8, "TRACe:COPY M2_1,CH1", 1) ’ The result is that the acquisition traces of the channels 1 and 3 are copied to M2_1 respectively M2_3. CALL Send(0, 8, "TRACe:COPY M3_1,M2_1", 1) ’The result is that the previously stored traces in M2_1 and M2_3 are copied to M3_1 respectively m3_3. USING THE COMBISCOPE INSTRUMENTS 3.10.3 3 - 59 Writing data to trace memory The TRACe command allows you to write data from the controller into a memory register. The following possibilities are available: • Write a previously read trace using the TRACe? query. Example: Send → TRACe? CH3 ’Queries for CH3 trace Read ← ’Reads trace data block Send → TRACe M2_3, ’Writes data block to M2_3 The result is that trace area M2_3 is filled with the acquisition trace of channel 3. Programming note: The fixed command part (TRACe M2_3,) and the variable must be sent separately. So, no EOI (End Or Identify) detection in between. Also the must be sent without EOI detection and detection of the EOL (End Of Line) code, because the could contain the EOL character, e.g., code 10 for CR. • Write a trace of identical constants (range = -32767 ... 32767). Example: Send → TRACe M2_4,1028 ’1028 = 1024 + 4 = 0404 hex. This command fills all memory register M2_4 locations with the constant 0404 hexadecimal for 16-bit samples, and with 04 hexadecimal for 8-bit samples. Note: A trace can only be written to memory register space (Mi_n) and not to acquisition space (CHn). PROGRAM EXAMPLE: DIM response AS STRING * 2000 CALL Send(0, 8, "TRACe? CH1", 1) CALL Receive(0, 8, response$, 256) length = IBCNT% ’Dimensions trace buffer ’Requests for channel 1 trace ’Reads the channel 1 trace ’IBCNT = number of data bytes CALL Send(0, 8, "TRACe M2_3,", 0) ’Sends fixed command part without EOI CALL Send(0, 8, LEFT$(response$,length), 0) ’Sends variable without EOI CALL Send(0, 8, "", 1) ’Sends dummy string with EOI detection 3 - 60 3.10.4 USING THE COMBISCOPE INSTRUMENTS Reading data from trace memory The TRACe? query allows you to read the contents from one of the following trace memory registers: • • An acquisition trace from one of the input channels (CH1 to CH4). • The result of a post processing function; CALCulate1 in M1 and CALCulate2 in M2 (refer to section 3.9 "Post processing"). Previously stored trace data from one of the memory registers (M1 to M8 or to M50). This can be either an acquisition trace or a trace of constant values (refer to section 3.10.3). PROGRAM EXAMPLE: ’***** ’Read the actual channel 1 trace into trace1$ and the filtered ’channel 1 trace into trace2$. ’***** DIM trace1 AS STRING * 2000 ’Dimensions trace buffer 1 DIM trace2 AS STRING * 2000 ’Dimensions trace buffer 2 CALL Send(0, 8, "TRACe? CH1", 1) ’Requests for channel 1 trace CALL Receive(0, 8, trace1$, 256) ’Reads channel 1 trace into trace1$ CALL Send(0, 8, "CALCulate:FEED ’CH1’", 1) ’Input source = CH1 CALL Send(0, 8, "CALCulate:FILTer:FREQuency:STATe ON", 1) ’Enables frequency filtering; the filtered channel 1 trace is stored in M1_1. CALL Send(0, 8, "TRACe? M1_1", 1) CALL Receive(0, 8, trace2$, 256) ’Requests for M1_1 trace ’Reads M1_1 trace into trace2$ USING THE COMBISCOPE INSTRUMENTS 3 - 61 3.11 Screen/Display Functions 3.11.1 Brightness control The DISPlay:BRIGhtness command allows you to control the brightness of the trace(s) displayed on the screen of your CombiScope instrument on a scale from 0.0 (low) to 1.0 (high). After a *RST command, the brightness intensity is 0.18. PROGRAM EXAMPLE: CALL Send(0, 8, "DISPlay:BRIGhtness .3", 1) 3.11.2 ’Sets brightness at 0.3. Display functions The DISPlay:WINDow and DISPlay:MENU commands allow you to use the following display functions: • The WINDow1 functions use the front panel screen display of MEAS1/MEAS2, CURSORS, and MATH-FFT to read measurement data from the CombiScope instrument (refer to section 3.11.2.1). • The WINDow2 function to write user-defined text on the screen (refer to section 3.11.2.2). • The MENU function to display softkey menus on the screen (refer to section 3.11.2.3). The layout of the display areas on the screen is as follows: WINDow[1] MENU WINDow2 Figure 3.21 Screen layout of display functions 3 - 62 3.11.2.1 USING THE COMBISCOPE INSTRUMENTS Readout of measurement data The DISPlay:WINDow[1]:TEXT:DATA? query allows you to acquire measured data as displayed on the upper line(s) of the screen of your CombiScope instrument. The following measured data values can be selected by specifying the number in the query: NUMBER : MEASUREMENT VALUE: 1, 2 10, 11, 12, 13, 20, 21, 30, 40, 51, 52 60, 61 MEAS1, MEAS2 data CURSORS data MATH - FFT frequency, amplitude MEAS1/MEAS2 DATA: The MEAS1 and MEAS2 functions must be enabled and selected via front panel control. MEAS1 data is read by sending the DISPlay:WINDow:TEXT1:DATA? query and MEAS2 data by sending the DISPlay:WINDow:TEXT2:DATA? query, followed by reading the response strings. The format of a response string is as follows: ,, DESCRIPTION: DC voltage AC-RMS voltage minimum voltage maximum voltage peak-to-peak voltage low level voltage high level voltage overshoot percentage preshoot percentage frequency period time pulse width rise time fall time duty cycle percentage delay time between 2 channels dc rms min max pkpk low high over pre freq T puls rise fall duty del : V V V V V V V % % Hz s s s s % s USING THE COMBISCOPE INSTRUMENTS Example: Send → *RST Send → DISPlay:MENU MEASure Send → SYSTem:KEY 2;KEY 4 Send → DISPlay:WINDow:TEXT1:DATA? Read ← pkpk,6000E-04,V 3 - 63 ’Switches MEAS1 & 2 off ’Switches MEASURE menu on ’Switches MEAS1 and MEAS2 on ’Requests MEAS1 data ’Response = peak-to-peak 0.6 volt. CURSORS DATA: The CURSORS function offers a wide variety of voltage and time readouts. The following readout selections can be made via the CURSORS - READOUT softkey menu: : TYPE: UNIT: DESCRIPTION: 10 11 12 13 20 21 30 40 dV dY V1 V2 Vdc dT F dX phase V U V V V s Hz U 51 52 T1-trg T2-trg Voltage difference (delta-V) between the cursors. Vertical voltage (X-deflection on). Absolute voltage of cursor 1 to ground. Absolute voltage of cursor 2 to ground. DC voltage Time difference (delta-T) between the cursors. Frequency (1/dT) in Hertz. Horizontal voltage (X-deflection on). The phase between two channels in degrees Celsius. (* stands for degrees ° sign) The time between cursor 1 and the trigger event. The time between cursor 2 and the trigger event. * s s MATH - FFT DATA: The MATH1/MATH2 - FFT functions offer the readout of the relative or absolute frequency and amplitude. The following readout selections can be made via the CURSORS - READOUT and MATH - FFT - PARAM softkey menus: : TYPE: UNIT: DESCRIPTION: 60 61 FFT-freq FFT-ampl Hz variable FFT frequency in Hertz. FFT amplitude in: - Relative FFT selected: dB - Absolute FFT selected: dBm, dbµV, V (Vrms) 3 - 64 USING THE COMBISCOPE INSTRUMENTS PROGRAM EXAMPLE: Read and print the DC and frequency characteristic of the actual signal using the MEAS1 and MEAS2 functions. The program stops to let you make the requested MEAS selections. DIM response AS STRING * 30 CALL Send(0, 8, "DISPlay:MENU MEASure", 1) ’Displays MEASURE menu ’ ’***** Enable MEAS1 & MEAS2 and select MEAS1-DC and MEAS2-frequency. ’ PRINT ">>> Press the LOCAL key, set MEAS1 function on, and select MEAS1-volt-dc." PRINT ">>> Set MEAS2 function on and select MEAS2-time-freq." PRINT ">>> Press any key on the controller keyboard when finished." WHILE INKEY$ = "": WEND CALL Send(0, 8, "DISPlay:WINDow:TEXT1:DATA?", 1) ’Queries for volt-dc CALL Receive(0, 8, response$, 256) ’Reads volt-dc value PRINT "Measured volt-dc = "; LEFT$(response$, IBCNT% - 1) CALL Send(0, 8, "DISPlay:WINDow:TEXT2:DATA?", 1) ’Queries for time-freq CALL Receive(0, 8, response$, 256) ’Reads time-freq value PRINT "Measured time-freq = "; LEFT$(response$, IBCNT% - 1) USING THE COMBISCOPE INSTRUMENTS 3.11.2.2 3 - 65 Display of user-defined text The DISPlay:WINDow2:TEXT commands allow you to define and clear the user text on the screen area of your CombiScope instrument. After a *RST command, the display of the previously defined user text is turned off. PROGRAM EXAMPLE 1: (text as string data) CALL Send(0, 8, "DISPlay:WINDow2:TEXT:STATe ON", 1) ’Enables display of text CALL Send(0, 8, "DISPlay:WINDow2:TEXT:DATA ’Remote control’", 1) ’ ’Displays the text: Remote control on the screen of your CombiScope instrument. PROGRAM EXAMPLE 2: (text as block data) CALL Send(0, 8, "DISPlay:WINDow2:TEXT:CLEar", 1) ’Clears the text CALL Send(0, 8, "DISPlay:WINDow2:TEXT:DATA #01.25 k", 0)’Displays: 1.25 k CALL Send(0, 8, CHR$(25), 0) ’Displays: Ω CALL Send(0, 8, " CH1", 1) ’Displays: CH1 ’ ’Displays the text: 1.25 kW CH1 on the screen of your CombiScope instrument. Note: 3.11.2.3 The ASCII character 25 (= ↓ ) is displayed as Ω on the screen of your CombiScope instrument. Selection of softkey menus The DISPlay:MENU commands allow you to select and enable the display of a softkey menu. If a menu is selected via the DISPlay:MENU command, the display is automatically enabled. After a *RST command, the display of softkey menus is turned off. PROGRAM EXAMPLE: CALL Send(0, 8, "DISPlay:MENU CURSors", 1) CALL Send(0, 8, "DISPlay:MENU:STATe OFF", 1) ’Selects and displays the CURSORS menu. ’Switches the CURSORS menu display off. 3 - 66 USING THE COMBISCOPE INSTRUMENTS 3.12 Print/Plot Functions The HCOPy:DEVice command allows you to select a hardcopy device. The following selections can be made: DEVICE: TYPE: NOTE: Plotter Plotter Plotter Plotter Plotter Plotter Plotter Printer Printer Printer Printer Printer Generator HPGL HP7440 HP7550 HP7475A HP7470A PM8277 PM8278 FX80 HP2225 LQ1500 HPLASER HP540 DUMP_M1 HPGL plot data format Epson FX80 compatibles (9 points) ThinkJet Epson LQ150 compatibles (24 points) HP LaserJet series II & III HP DeskJet (new style protocol) Trace dump to one of the arbitrary waveform generators PM5138, PM5139, or PM5150. The HCOPy:DATA? query allows you to request a hardcopy of the picture on the screen of your CombiScope instrument. The response data is formatted according to the current printer/plotter options, which can be selected via the front panel UTILITY menu. After a *RST command, the option "plotter; HPGL" is selected. The response data to a HCOPy:DATA? query can be sent to a connected plotter or printer to make a hardcopy. The response data is sent as block data of indefinite length and is therefore, preceded by the preamble #0 of 2 bytes. This preamble must be removed from the beginning of the block data, before sending it to a plotter or printer device. USING THE COMBISCOPE INSTRUMENTS DSO 1) read response data send plot/print data PLOTTER PRINTER 2) send HCOPy:DATA? 3) data buffer CONTROLLER Figure 3.22 3 - 67 1) Send the query HCOPy:DATA? via the GPIB. 2) Read the block response data via the GPIB. 3) Send the print/plot data part to the printer/plotter. ST7219 Hardcopy of screen on printer/plotter PROGRAM EXAMPLE: Select one of the supported GPIB plotters, set its address at 22 and connect the plotter via IEEE to the controller. Create a screen picture on the DSO that you want to plot and run the following program. DIM addr(2) DIM response AS STRING * 15000 CALL IBTMO(0, 13) ’Dimensions address array. ’Dimensions response string. ’Timeout at 10 seconds. CALL Send(0, 8, "HCOPy:DEVice PM8277", 1) ’Selects the PM8277 plotter CALL Send(0, 8, "HCOPY:DATA?", 1) ’Requests for hardcopy data. CALL Receive(0, 8, response$, 256) ’Reads the hardcopy data. length = IBCNT% ’IBCNT = number of read bytes PRINT "Number of hardcopy bytes ="; length ’***** ’The first 2 characters of the response block data are #0 (preamble for indefinite length). ’They must not be sent to the plotter; so, send characters 3 until 3+length-2. ’***** CALL Send(0, 22, MID$(response$, 3, length - 2), 0) ’No End detection CALL Send(0, 22, "", 1) ’End of data block 3 - 68 USING THE COMBISCOPE INSTRUMENTS 3.13 Real-Time Clock The real-time clock keeps track of the current date and time. The date and time are stamped on acquired waveforms to be sent to a computer or to be output to a hardcopy device. The time of stamping is also the time of the acquisition trigger. The SYSTem:TIME command sets the time in hours, minutes, and seconds. Only a 24-hours time format is supported. The format of the displayed time cannot be selected. The SYSTem:DATE command sets the date in years, months, and days. PROGRAM EXAMPLE: Sets the time to 25 minutes and 36 seconds past 2 o'clock in the afternoon. CALL Send(0, 8, "SYSTem:DATE 1993,12,15", 1) Sets the date to 15 december 1993. CALL Send(0, 8, "SYSTem:TIME 14,25,36", 1) 3.14 Auto Calibration Calibration is only possible when the CombiScope instrument is warmed up. The instrument data is calibrated automatically by sending the *CAL? or the CALibration? query. The internal calibration lasts several minutes. A "0" result is returned after correct calibration, and a "1" result is returned when the calibration failed. Notice that the response to the calibration query is only returned when the calibration has completed. During the calibration process bit 0 "Calibrating" is set in the operation status condition register. This bit cannot be read during the execution of the *CAL? or CALibration? query, because these queries are sequential commands. This bit can be read after sending the CALibration command, which is an overlapped command. The completion of the CALibration command is reported in the standard Event Status Register (ESR) bit 0 (OPC bit set to 1). When the calibration is finished, bit 8 in the QUEStionable status reports a possible calibration error (if set to 1). Note: Execute calibration only when it is needed, e.g., when a message on the screen of your CombiScope instrument requests to do so. USING THE COMBISCOPE INSTRUMENTS 3 - 69 PROGRAM EXAMPLE: ’***** ’Calibrate the instrument and print the calibration result. ’***** CALL Send (0, 8, "*CAL?", 1) ’Starts the calibration CALL IbTMO(0, 0) ’Disables the time out mechanism response$ = " " CALL Receive (0, 8, response$, 256) ’Waits for the calibration to finish and reads the result. ’ CALL IbTMO(0, 13) ’Sets time out back to 10 seconds IF LEFT$(response$, 1) = "0" THEN ’0 = okay PRINT "Calibration okay" ELSE ’1 = wrong PRINT "Calibration not successful" ENDIF PROGRAMMING NOTE: Status bit 0 in the operation status can be used to generate a Service Request (SRQ) when the calibration is finished, i.e., when bit 0 becomes zero. This gives you the advantage that the program can do something else until the SRQ is generated. Therefore, program the following: ON PEN GOSUB ServReq PEN ON ’Defines "ServReq" routine call after SRQ ’Enables SRQ mechanism Send → STATus:OPERation:NTRansition 1 ’Sets bit 0 (Calibration) true in the case of negative transition (from 1 to 0). Send → STATus:OPERation:ENABle 1 ’Enables bit 0 for being reported in the standard status byte (STB). Send → *SRE 128 ’Enables bit 7 (OPER) in Service Request Enable (SRE) register for generation of an SRQ. Send → *RST Send → *CLS Send → CALibration ’Resets the instrument ’Clears the status data ’Starts auto calibration 3 - 70 USING THE COMBISCOPE INSTRUMENTS 3.15 Status Reporting Status reporting is done via the status reporting system, which is completely described in chapter 5 "THE STATUS REPORTING SYSTEM" of the SCPI Users Handbook. The following figure shows the principle of the standard Status Byte (STB) register and the Service Request Generation (SRQ) mechanism: Standard Event Status OPERation Status QUEStionable Status Error/ Event Queue Not Used Output Queue Service Request Generation SRQ RQS read by Serial Poll RQS ESB OPER MAV QUES bit2 bit1 Status Byte Reg. bit0 MSS MSS read by *STB? & Logical OR & & & & & & 7 Figure 3.23 3.15.1 5 4 3 2 1 0 Service Request Enable Register *SRE *SRE? ST7164 The status reporting model for CombiScope instruments Status data for the CombiScope instruments The following status data applies to the CombiScope instruments: • • • • • For the meaning of the bits of the OPERation status, refer to section 3.15.1.1. For the meaning of the bits of the QUEStionable status, refer to section 3.15.1.2. For the meaning of the bits of the standard Event Status Register, refer to the command reference for the *ESR? query. The message output queue can contain about 250 data bytes. The error/event queue can contain 20 error messages before it overflows. USING THE COMBISCOPE INSTRUMENTS 3.15.1.1 3 - 71 Operation status data CONDition filter EVENt ENABle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 CALibrating 0 RANGing SWEeping 0 wait for TRIGger 0 0 Digital mode Pass/Fail valid Pass/Fail status 0 0 0 0 0 STATus:OPERation :CONDition? :PTRansition(?) :NTRansition(?) :EVENt? :ENABle(?) ST7442 Figure 3.24 The Operation Status structure BIT: MEANING: 0 2 3 5 8 9 10 CALibrating This bit is set during the time that the instrument is performing a calibration. RANGing This bit is set during the time that the instrument is autoranging (autosetting). SWEeping This bit is set when the sweep (a data acquisition) is in progress. This bit is reset to zero when the data acquisition is finished. At the same time, the OPC bit (0) in the standard Event Status Register (ESR) is set. Only valid for multiple-shot mode (INITiate:CONTinuous OFF). Waiting for TRIGger This bit is set when the trigger system is initiated (INITiate) and waiting for a trigger to start an acquisition. This bit is reset to zero as soon as the instrument is triggered and the acquisition started. Only valid for single-shot and multiple-shot mode (INITiate:CONTinuous OFF). Digital mode This bit is set when the CombiScope instrument is in the digital mode. Pass/Fail valid This bit is set when the pass/fail status at bit 10 is valid. Pass/Fail status This bit is set if the pass/fail test has failed. If bit 9 = 1 and bit 10 = 0, the test has passed. If bit 9 = 1 and bit 10 = 1, the test has failed. Table 3.3 The Operation Status bits 3 - 72 3.15.1.2 USING THE COMBISCOPE INSTRUMENTS Questionable status data CONDition filter EVENt ENABle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VOLTage 0 0 0 TEMPerature 0 0 0 CALibration Overload 50Ω 0 0 0 0 0 0 STATus:QUEStionable:CONDition? :PTRansition(?) :NTRansition(?) :EVENt? :ENABle(?) ST7157 Figure 3.25 The Questionable Status structure BIT: MEANING: 0 4 8 9 VOLTage This bit is set if a digital sample value is clipped at the maximum or minimum value while a FETCh? query is done on the sample array. This bit is also set if a FETCh? query did not succeed because the shape of the waveform did not match the measure function request. Example: FETCh:FREQuency? in the case of only half a sine wave. TEMPerature This bit is set by the instrument if the difference between the current temperature and the temperature at the moment of the last calibration exceeds a certain level. This is an indication that the instrument must be calibrated. The temperature is sensed internally about half an hour after power on. This bit is reset after power on and after calibrating. CALibration This bit is set by the instrument when an internal calibration did not complete successfully. This bit is reset after power on and after successful calibration. Overload 50Ω This bit is set by the instrument when any 50Ω input terminator is overloaded. This bit is reset after power on, or if none of the input terminators is overloaded. Table 3.4 The Questionable Status bits USING THE COMBISCOPE INSTRUMENTS 3.15.2 3 - 73 How to reset the status data The *CLS command allows you to clear the following status data structures: • • All event status registers, such as the following: - standard event status register (ESR) - status byte register (STB) - operation event status register (STATus:OPERation:EVENt) - questionable event status register (STATus:QUEStionable:EVENt) The Error/event queue. The STATus:PRESet command presets the filters and enable register of the operation and questionable status data in such a way that device-dependent events are reported. The result is as follows: STATUS REGISTER DATA STRUCTURE PRESET VALUE OPERation ENABle register PTRansition filter NTRansition filter ENABle register PTRansition filter NTRansition filter 0000 hex. 7FFF hex. 0000 hex. 0000 hex. 7FFF hex. 0000 hex. QUEStionable Note: A *RST command does not affect the contents of: - event registers - event enable registers - output queues - transition filters PROGRAM EXAMPLE: CALL Send(0, 8, "*CLS", 1) CALL Send(0, 8, "STATus:PRESet", 1) ’Clears the event registers + error/event queue ’Presets the enable register + filters 3 - 74 3.15.3 USING THE COMBISCOPE INSTRUMENTS How to enable status reporting The principle of using the status reporting mechanism is explained by showing two program examples. In the first example the standard Status Byte (STB) is checked to signal "operation completed". In the second example the SRQ mechanism is used to signal "operation completed" by generating a Service Request. 3.15.3.1 Program example using the status byte (STB) PROGRAM EXAMPLE: In this example the standard status byte (STB) is checked to detect whether or not a "CONFigure:AC" + "INITiate" operation is completed. If completed, the program continues by fetching and printing the AC-RMS value. CALL IBTMO(0, 13) ’Timeout at 10 seconds CALL Send(0, 8, "*RST", 1) ’Resets the instrument CALL Send(0, 8, "*ESE 1", 1) ’Enables OPC-bit (0) in ESE ’"OPeration Completed" is reported in bit 5 (ESB) of the STB after sending *OPC. ’ CALL Send(0, 8, "CONFigure:AC", 1) ’Automatic configuration CALL Send(0, 8, "*OPC", 1) ’This command forces the instrument to set the OPC bit ’when all pending operations have been finished. ’ CALL Send(0, 8, "INITiate", 1) ’Single initiation ESB.bit.set = 0 result$ = SPACE$(3) WHILE ESB.bit.set = 0 CALL Send(0, 8, "*STB?", 1) ’Requests for the STB CALL Receive(0, 8, result$, 256) ’Reads the STB IF (VAL(result$) AND 32) THEN ’ESB = bit 5 (value 32) ESB.bit.set = 1 ’Operation completed END IF WEND CALL Send(0, 8, "FETCh:AC?", 1) ’Fetches AC-RMS value result$ = SPACE$(30) CALL Receive(0, 8, result$, 256) ’Reads AC-RMS value PRINT "AC-RMS value = "; result$ ’Prints AC-RMS value USING THE COMBISCOPE INSTRUMENTS 3.15.3.2 3 - 75 Program example using a service request (SRQ) PROGRAM EXAMPLE: In this example the "Service Request" mechanism is used to detect whether or not a "CONFigure:AC" + "INITiate" operation is completed. If completed, an SRQ is generated to continue with fetching and printing the AC-RMS value. SRQ.detected = 0 ON PEN GOSUB ServReq ’Defines SRQ-routine PEN ON ’Enables SRQ-routine CALL IBTMO(0, 13) ’Timeout at 10 seconds CALL Send(0, 8, "*RST", 1) ’Resets the instrument CALL Send(0, 8, "*ESE 1", 1) ’Sets OPC-bit in ESR ’"OPeration Completed" is reported in bit 5 (ESB) of STB after sending *OPC. ’ CALL Send(0, 8, "*SRE 32", 1) ’Sets ESB-bit in SRE-register ’SRQ generation after "OPeration Completed" is enabled. ’ CALL Send(0, 8, "CONFigure:AC", 1) ’Automatic configuration CALL Send(0, 8, "INITiate", 1) ’Single initiation CALL Send(0, 8, "*OPC", 1) ’This command forces the instrument to set the OPC bit in the STB ’when all pending operations have been finished. ’ WHILE SRQ.detected = 0 ’Do something else while waiting for SRQ; continue when SRQ.detected = 1. WEND CALL Send(0, 8, "FETCh:AC?", 1) ’Fetches AC-RMS value result$ = SPACE$(30) CALL Receive(0, 8, result$, 256) ’Reads AC-RMS value PRINT "AC-RMS value = "; result$ ’Prints AC-RMS value END ’ ServReq: PRINT "Service request generated because of Operation Completed." CALL ReadStatusByte(0, 8, sbyte%) ’Serial polls for the status byte to reset the SRQ-mechanism. ’ PRINT "STB byte ="; sbyte% CALL Send(0, 8, "*ESR?", 1) ’Queries for the contents of the Event Status Register to clear the OPC-bit. ’ resp$ = " " CALL Receive(0, 8, resp$, 256) PRINT "ESR byte = "; resp$ SRQ.detected = 1 RETURN 3 - 76 3.15.4 USING THE COMBISCOPE INSTRUMENTS How to report errors Instrument errors usually caused by programming or setting errors, can be reported by the instrument during the execution of each command. To make sure that a program is running properly, you should query the instrument for possible errors after every functional command. This is done by sending the SYSTem:ERRor? query or the STATus:QUEue? query to the instrument, followed by reading the response message. However, through this practice the same "error reporting" statements must be repeated after sending each SCPI command. This is not always practical. Therefore, one of the following approaches is advised: 1) Send the SYSTem:ERRor? or STATus:QUEue? query and read the instrument response message after every group of commands that functionally belong to each other. 2) Program an error-reporting routine and call this routine after each command or group of commands. For an example of an error-reporting routine, refer to section 3.16.4.1. 3) Program an error-reporting routine and use the "Service Request (SRQ) Generation" mechanism to interrupt the execution of the program and to execute the error-reporting routine. Therefore, refer to section 3.16.4.2. 3.15.4.1 Error-reporting routine Send the SYSTem:ERRor? or STATus:QUEue? query and read the instrument response after every group of commands that functionally belong to each other, by calling an error-reporting routine after each group of commands. PROGRAM EXAMPLE: DIM response AS STRING * 30 CALL Send (0, 8, "CONFigure:AC (@1)", 1) FOR i = 1 TO 20 CALL Send (0, 8, "READ:AC?", 1) CALL Receive (0, 8, response$, 256) PRINT "AC-RMS: "; response$ GOSUB ErrorCheck NEXT i ’***** ’***** REST OF THE APPLICATION ’***** END ErrorCheck: CALL Send (0, 8, "SYSTem:ERRor?", 1) CALL Receive (0, 8, response$, 256) PRINT "Error: "; response$ RETURN ’Configures for AC-RMS ’Performs 20 measurements ’Reads the AC-RMS value ’Prints the AC-RMS value ’Checks for instrument errors ’Queries for a system error ’Reads the instrument error ’Prints the instrument error USING THE COMBISCOPE INSTRUMENTS 3.15.4.2 3 - 77 Error-reporting using the SRQ mechanism Program an error-reporting routine and use the "Service Request (SRQ) Generation" mechanism to interrupt the execution of the program to execute the error-reporting routine. PROGRAM EXAMPLE: ON PEN GOSUB ErrorCheck PEN ON ’***** ’***** APPLICATION PROGRAM ’***** END ’ *************************************************** ’ Subroutine reading all errors from the error queue. ’ *************************************************** SUB ErrorCheck er$ = SPACE$(1) WHILE LEFT$(er$, 1) <> "0" ’Loop until 0, ’No error" CMD$ = "SYSTem:ERRor?" CALL Send(0, 8, CMD$, 1) ’Sends error query er$ = SPACE$(60) CALL Receive(0, 8, er$, 256) ’Reads error string PRINT "Error = "; er$ ’Displays error string WEND END SUB 3 - 78 USING THE COMBISCOPE INSTRUMENTS 3.16 Saving/Restoring Instrument Setups This level of programming involves all functions in the CombiScopes instruments, i.e., complete instrument setups are processed. This allows you to program one or more functions that are not individually programmable. The following possibilities can be programmed: • • • Restoring initial settings. Saving/restoring complete setups via internal memory. Saving/restoring complete or partical setups via the GPIB controller. 3.16.1 How to restore initial settings Initial settings can be restored by sending the *RST command. This resets the instrument-specific functions to a default state and selects the digital mode. PROGRAM EXAMPLE: CALL Send(0, 8, "*RST", 1) ’Resets the instrument (for reset values, refer to the *RST command in the command reference). 3.16.2 How to save/restore a setup via instrument memory Complete instrument setups can be stored and recalled via one of the internal memories of the CombiScope instrument. The settings in recall memory 0 are the initial settings. The settings in the recall memories 1 through 10 are user programmable. PROGRAM EXAMPLE: CALL Send(0, 8, "*SAV 3", 1) CALL Send(0, 8, "*RCL 3", 1) 3.16.3 ’Saves the complete instrument setup into memory 3. ’Recalls the complete instrument setup from memory 3. How to save/restore a setup via the GPIB controller Complete instrument setups or a part of the setup (node) can be stored and recalled via the external memory of the controller using the SYSTem:SET? query (store setup) and SYSTem:SET command (recall setup). PROGRAM EXAMPLE: ’Reserves space for instrument settings ’Queries for the complete instrument setup ’'(no parameter specified) 8, settings$, 256) ’Reads the instrument settings ’IBCNT% = number of settings bytes "SYSTem:SET ", 0) ’Sends the command header (note the space) ’EOI checking disabled (0) LEFT$(settings$, length), 1) ’Sends the instrument settings ’EOI checking enabled (1) DIM settings AS STRING * 350 CALL Send(0, 8, "SYSTem:SET?", 1) CALL Receive(0, length = IBCNT% CALL Send(0, 8, CALL Send(0, 8, USING THE COMBISCOPE INSTRUMENTS 3 - 79 3.17 Front Panel Simulation The use of "front panel simulation" commands must be restricted to special applications or front panel functions that are not supported by SCPI commands. Bear in mind the differences between different instruments from the same family, as described in the beginning of this chapter. It is possible to simulate the pressing of a key on the front panel by using the SYSTem:KEY command. It is also possible to detect whether or not a key has been pressed. This is done via bit 6 (URQ) of the Event Status Register (*ESR? query). The last key pressed can be queried by using the SYSTem:KEY? query. Furthermore, it is better to use the DISPlay:MENU command to switch a softkey menu ON or OFF. The pressing of a softkey can be simulated with the SYSTem:KEY 1 to 6 command. Since the role of each softkey is determined by a previously selected menu, this will be a tedious and cumbersome process. Still it might be of interest for simple applications. Example: The command sequence *RST;DISPlay:MENU ACQuire;:SYSTem:KEY 2 resets the instrument (e.g., digital mode on and peak detection off), switches the softkey menu ACQUIRE on, and simulates the pressing of softkey 2, which causes peak detection to be switched on. 3.17.1 How to simulate the pressing of a front panel key The SYSTem:KEY commands allow you to simulate the pressing of a front panel key. The front panel key numbering (not the rotary knobs) is roughly divided into the following matrix of rows and columns. column: 1 2 3 13 row 1 row 2 101 201 102 202 103 203 113 213 row 3 row 4 row 7 1 2 . . 6 302 402 . . 702 303 304 . . 703 313 413 . . 713 row 8 801 802 803 813 Note: The number positions 1 to 6 represent the softkeys. 3 - 80 USING THE COMBISCOPE INSTRUMENTS PROGRAM EXAMPLE: CALL Send(0, 8, "*RST", 1) ’Resets the instrument CALL Send(0, 8, "SYSTem:KEY 104", 1) ’Enables the UTILITY softkey menu CALL Send(0, 8, "SYSTem:KEY 2", 1) ’Selects the PROBE option CALL Send(0, 8, "SYSTem:KEY 5", 1) ’Selects the PROBE CORR option CALL Send(0, 8, "SYSTem:KEY 4", 1) ’Selects the 10:1 option CALL Send(0, 8, "SYSTem:KEY 104", 1) ’Disables the UTILITY softkey menu ’In this example the probe correction factor for input channel 1 is set at 10:1 via softkey menu UTILITY. AUTOSET SIMULATION: CALL Send (0, 8, "SYSTem:KEY 101", 1) ’Simulates Autoset Autoset scans for the presence of a signal on channel 1, 2, and the external trigger input. If there is a signal present on the external trigger input, the EXTernal trigger channel is selected as trigger source, and the external trigger view facility becomes active. If the external trigger is the only signal available, external trigger view and channel 1 (CH1) are switched on. 3.17.2 How to simulate the operation of a softkey menu The MEASure:MENU command allows you to enable or disable the display of the softkey menus. The "SYSTem:KEY 1 to 6" command allows you to simulate the pressing of one of the softkeys 1 to 6. PROGRAM EXAMPLE: CALL Send(0, 8, "*RST", 1) ’Resets the instrument CALL Send(0, 8, "DISPlay:MENU UTIL", 1) ’Enables the UTILITY softkey menu CALL Send(0, 8, "SYSTem:KEY 2;KEY 5;KEY 4", 1) ’Selects the PROBE + PROBE CORR + 10:1 options. CALL Send(0, 8, "DISPlay:MENU:STATe OFF", 1) ’Disables the UTILITY softkey menu ’In this example the probe correction factor for input channel 1 is set at 10:1 via softkey menu UTILITY. USING THE COMBISCOPE INSTRUMENTS 3 - 81 3.18 Functions not Directly Programmable Not all front panel functions are individually programmable with SCPI commands. However, the SYSTem:SET and *SAV/*RCL commands can be used to access the following functions: - Cursor functions Logic Triggering Event functions DTB functions X pos Display menu functions Pass/Fail functions see CURSORS menu (appendix B.2.2) see TRIGGER menu (appendix B.2.10) see TB MODE menu (appendix B.2.9) see DTB (DEL’D TB) menu (appendix B.2.6) see X POS button see DISPLAY menu (appendix B.2.3) see MATHPLUS MATH menu (appendix A5 and B.2.4.) Other functions and keys that are not individually programmable with SCPI commands are accessible using the SYSTem:KEY command. They are: - Roll mode Trigger noise TEXT OFF key STATUS key MAGNIFY keys ENVELOPE MULTiple-shot DISPlay:MENU TBMode;:SYSTem:KEY 3 toggles on/off DISPlay:MENU TRIGger;:SYSTem:KEY 4 toggles on/off SYSTem:KEY 801 selects next option SYSTem:KEY 201 toggles on/off SYSTem:KEY 210/211 selects previous/next step DISPlay:MENU ACQuire;:SYSTem:KEY 3 toggles on/off DISPlay:MENU TBMode;:SYSTem:KEY 1 (up)or 2 (down) (after INITiate:CONTinuous OFF) COMMAND REFERENCE 4-1 4 COMMAND REFERENCE In the first section the notation conventions concerning the specification of the syntax and data types are given. In the second section a summary of all commands and associate parameters is given in alphabetical order. This gives you a quick reference of the SCPI commands. In the third section detailed descriptions of all commands and queries for the CombiScopes instruments instruments are given. The IEEE.2 commands/queries (beginning with a *) are listed first, followed by the SCPI commands and queries in alphabetical order. 4.1 Notation Conventions 4.1.1 Syntax specification notations The method that is used in this manual to specify the syntax of the commands is based on the EBNF notations. To be able to correctly spell the commands, you need to be familiar with the concept of this notation. The notation form uses 3 types of symbols that need to be distinguished: Meta symbols Meta symbols have a particular meaning. They don’t specify any literal or message element, but serve a particular purpose. Example: | is the symbol for alternative. 0 | 1 means either 0 or 1. Non-terminal symbols Non-terminal symbols are message elements that are specified elsewhere. They are placed between the < > signs. Example: means a boolean value. Terminal symbols Terminal symbols consist of a sequence of literals that use the standard ASCII character set. Any ASCII symbol that is not a meta symbol or a non-terminal symbol is considered to be a literal. 4-2 COMMAND REFERENCE Notes: (1) A message that is specified as a sequency of literals can be sent to the instrument in any upper or lower case combination. The case of the characters has no semantical meaning. (2) Upper and lower case characters in a syntax specification are used to distinguish between the short and long form of a mnemonic. Upper case specifies the mandatory short form of a mnemonic. The lower case characters specify the remaining part of the (optional) long form. (3) Literals that are non-printable ASCII characters are underlined. For example, the symbol NL is used to specify the New Line character (0A hexadecimal). (4) Some syntax specifications use the control symbol ^. The characters that follow this symbol specify a special message that is concurrently sent with the preceding data byte. For example, NL^End specifies that the NL code is sent concurrently with the End message (via the EOI line of the GPIB interface). META SYMBOL: MEANING: EXPLANATION: = Is defined to be Specifies equality. Example: = FLUKE | Alternative Specifies an "either" "or" choice. Example: = 0 | 1 < ... > Non-terminal symbol A non-terminal is a message element whose syntax specification is defined elsewhere. Example: A node can be specified as INPut. The definition of = [1] | 2 is specified at another line or even somewhere else. [ ... ] Default This means that the syntax may or may not contain the message element in between the square brackets, without changingthesemanticalmeaning.Example: MEASure[:VOLTage][:DC]? means that MEASure:VOLTage:DC? is the same as MEASure? or MEASure:VOLTage? or MEASure:DC? { ... } Repetition Specifies that the message element in between the curly brackets may be repeated 0 or more times. Example: {,} specifies a comma separated sequence of one or more ’s. COMMAND REFERENCE 4-3 Notes: (1) A space character that needs to be part of a message is specified as SP. Spaces within a syntax specification that are not specified as SP are used for formatting purposes to improve the readability; they don’t have any semantical meaning. Note: The only exception to this rule is the program header separator, which separates the header from the parameter part in a message. For reasons of readability, this required syntactical element is not specified in any syntax definition. Sending a SP in between the header and parameter part will satisfy this requirement. Example: The syntax specification INPut:STATe ON requires a SP character in between the STATe node and the ON parameter. This message is sent as INPut:STATeSPON. Sending INPut:STATeON causes a Command Error. (2) Except for the program header separator, any message from the Command Summary and Command Specification sections can be sent to the instrument exactly as defined by the syntax specification. However, these specifications do not reflect all details of the flexible syntax structure that is allowed when creating composite messages. (3) The characters > and < in a string expression are considered as meta symbols. When these characters are to be sent as literals in a string, they are placed between quote characters. Example: The specification "CH", where = [1] | 2, specifies the following strings: "CH" | "CH1" | "CH2" , but "Number ">" 2" specifies the string characters Number > 2. 4.1.2 Data types = | | Decimal Numeric Data. = {} Notation for specifying a decimal number, e.g., -179. = [+] | - = is the same format as , except that it uses an explicit decimal point and may or may not be preceded by a sign, e.g., -179.56. = is the same format as , except that an exponent is added, e.g., -1.7956 E + 02. 4-4 = COMMAND REFERENCE {} Integer notation that specifies a number. = | | | Any decimal or non-decimal numeric data type. = #H {} is one of the characters 0 .. 9 or A .. F. = #Q {} is one of the digits 0 .. 7. = #B { } = 0 | 1 = 0 | 1 | OFF | ON 0 equals OFF; 1 equals ON. = | This is used to transfer data that consists of any arbitrary 8 bit codes. = #0 {} This data type is of indefinite length and must be terminated by NL^END. = Any arbitrary 8 bit data byte code. = # {} This data type is of definite length. specifies the number of bytes of . specifies the number of bytes. = One of the ASCII characters 0 .. 9. = { | _ | } is any alphabetic ASCII character. = = Sequence of ASCII characters placed between single or double quotes. Examples: "This is a string" ’This also’ ( @ ) Example: (@2) COMMAND REFERENCE 4-5 4.2 Command Summary The following list is a summary of all commands and parameters in alphabetical order, beginning with the common commands. The corresponding queries of the commands are not listed. If a command has no query, this is reported in the column NOTES as "no query". If only a query exists, it is reported in the column NOTES as "query only". COMMAND: PARAMETERS: *CAL? *CLS *ESE *ESR? *IDN? *OPC *OPT? *RCL *RST *SAV *SRE *STB? *TRG *TST? *WAI NOTES: query only response = 0 | 1 no query range = 0 .. 255 query only query only response to *OPC? is always 1 query only range = 0 .. 10 no query range = 1 .. 10 range = 0 .. 255 query only no query query only no query 4-6 COMMAND: COMMAND REFERENCE PARAMETERS: NOTES: ABORt no query CALCulate :DERivative :POINTs :STATe :FEED =[1] | 2 alias = :DIFFerential range = 3, 5, .., 129 :FILTer [:GATE] :FREQuency :POINts :STATe :INTegral :STATe :MATH [:EXPRession] :STATe :TRANsform :FREQuency :STATe :TYPE :WINDow :HISTogram :STATe CALibration [:ALL] CONFigure [:VOLTage] | MAX | MIN "" | MAX | MIN = CHn | Mi_n n = 1 .. 4 i = 1 .. 8 (standard memory) i = 9 .. 50 (extended memory) range = 3, 5, .., 41 ( ) = CHn | Mi_n = + | - | * ABSolute | RELative RECTangular | HAMMing | HANNing response = 0 | 1 see Note 1, 2, and 3 [[(),] ] [,] COMMAND REFERENCE COMMAND: DISPlay :BRIGhtness :MENU [:NAME] :STATE :WINDow[1] :TEXT :DATA? :WINDow2 :TEXT[1] :CLEAR :DATA :STATe PARAMETERS: NOTES: | MAXimum | MINimum = 0.00 .. 1.00 TBMode | TRIGger | DMODe | SETups | CURSors | ACQuire | DISPlay | MATH | MEASure | SAVE | RECall | UTIL | VERTical = 1 | 2 | 10 | 11 | 12 | 13 | 20 | 21 | 30 | 40 | 51 | 52 | 60 | 61 query only no query | FETCh [:VOLTage] ? [[(),] ] [,|] FORMat [:DATA] HCOPy :DATA? :DEVice INITiate [:IMMediate] :CONTinuous 4-7 [,] see Note 1, 2, 3, and 4 response = INTeger,8 (for 8-bit samples) INTeger,16 (for 16-bit samples) query only response = HPGL | HP7440 | HP7550 | HP7475A| HP7470A | PM8277 | PM8278 | FX80 | LQ1500 | HP2225 | HPLASER | HP540 | DUMP_M1 no query 4-8 COMMAND: INPut :COUPling :FILTer [:LPASs] [:STATe] :FREQuency? :IMPedance :POLarity INSTrument :NSELect [:SELect] COMMAND REFERENCE PARAMETERS: NOTES: = [1] | 2 | 3 | 4 AC | DC | GROund | MAXimum | MINimum NORMal | INVerted | MAXimum | MINimum DIGital | ANALog query only response = 2E+7 = 50 | 1E6 = 2 | 4 = 1 | 2 MEASure [:VOLTage] ? [[(),] ] [,] see Note 1, 2, and 3 response = READ [:VOLTage] ? [[(),] ] [,] see Note 1, 2, and 3 response = COMMAND REFERENCE COMMAND: SENSe :AVERage [:STATe] :COUNt :TYPE? :FUNCtion [:ON] :OFF :STATe? :SWEep :OFFSet :TIME :PDETection :REALtime [:STATe] :TIMe :AUTO :VOLTage [:DC] :RANGe :AUTO :OFFSet :PTPeak STATus :OPERation [:EVENt]? :CONDition? :ENABle :NTRansition :PTRansition :PRESet :QUEStionable [:EVENt]? :CONDition? :ENABle :NTRansition :PTRansition :QUEue [:NEXT]? PARAMETERS: | MAXimum | MINimum 4-9 NOTES: = 2, 4, .., 4096 response = SCAL "XTIMe:VOLTage<...>" "XTIMe:VOLTage<...>" "XTIMe:VOLTage<...>" no query no query query only <...> = [1] | 2 | 3 | 4 <...> = :SUM 1,2 <...> = :SUM 3,4 | MAXimum | MINimum + = post-trigger delay time - = pre-trigger view time | MAXimum | MINimum over 10 divisions = [1] | 2 | 3 | 4 | MAXimum | MINimum | MAXimum | MINimum over 8 divisions query only query only range = 0 .. 32767 range = 0 .. 32767 range = 0 .. 32767 no query query only query only range = 0 .. 32767 range = 0 .. 32767 range = 0 .. 32767 query only 4 - 10 COMMAND REFERENCE COMMAND: PARAMETERS: SYSTem :BEEPer :STATe :COMMunicate :SERial :CONTrol :DTR ON | STANdard :RTS ON | STANdard [:RECeive] | TRANsmit :BAUD :BITS :PACE :PARity [:TYPe] :DATE :ERRor? :KEY :SET :SET? :TIME :VERSion? TRACe :COPY [:DATA] :POINts XON | NONE EVEN | ODD | NONE ,, | MAXimum | MINimum ,, NOTES: 75 | 110 | 150 | 300 | 600 | 1200 | 2400 | 4800 | 9600 | 19200 | 38400 7|8 ,, query only = 1 .. 6 101 .. 113 | .. | 801 .. 813 response = ,, query only alias = DATA , = Mi_n = CHn | Mi_n | EXT n = 1 .. 4, E i = 1 .. 8 (standard) i = 1 .. 50 (extended) , [, | MAXimum | MINimum] (standard) = 512 | 2048 | 4096 | 8192 (extended) = 512 | 8192 | 16384 | 32768 COMMAND REFERENCE COMMAND: PARAMETERS: TRIGger [:SEQuence[1] | STARt] :FILTer :HPASs :FREQuency 3E4 :STATe :LPASs :FREQuency 0 | 10 | 3E4 :STATe :HOLDoff :LEVel :AUTO :SLOPe :SOURce :TYPE :VIDeo :FIELd [:NUMBer] :SELect :FORMat [:TYPE] :LPFRame :LINE :SSIGnal | MINimum | MAXimum | MAXimum | MINimum POSitive | NEGative | EITHer IMMediate | INTernal | LINE | BUS | EXTernal EDGE | VIDeo | LOGic | GLITch 4 - 11 NOTES: 30 KHz = HF-reject 0 = DC coupling 10 = AC coupling 30000 = LF-reject = [1] | 2 | 3 | 4 1|2 ALL | NUMBer 1/2 = field1/field2 ALL = lines triggering NUMBer = field triggering PAL | SECAM | NTSC | HDTV 525 | 625 | 1050 | 1125 | 1250 | MINimum | MAXimum POSitive | NEGative video standard number of lines per frame from 1 to 1250 signal polarity 4 - 12 Note 1: = Note 2: :AC :AMPLitude [:DC] :FALL :OVERshoot :PREShoot :TIME :FREQuency :HIGH :LOW :MAXimum :MINimum :NDUTycycle :NWIDth :PDUTycycle :PERiod :PTPeak :PWIDth :TMAXimum :TMINimum :RISE :OVERshoot :PREShoot :TIME COMMAND REFERENCE [ [,]] [ [,[, [,]]] [ [,]] [] [] [] [ [,]] [] [ [, [, [,]]] :DCYCle = alias for :PDUTycycle :FTIMe = alias for :FALL:TIME :RTIMe = alias for :RISE:TIME Note 3: = Note 4: = @1 | @2 | @3 | @4 @CH1 | @CH2 | @CH3 | @CH4 @Mi_1 | @Mi_2 | @Mi_3 | @Mi_4 i = 1 .. 8 (standard memory) i = 1 .. 50 (extended memory) COMMAND REFERENCE 4 - 13 4.3 Command Descriptions The description of corresponding commands and queries is combined. Each command/query description starts on a new page. A description consists of the following parts: COMMAND HEADER Syntax: Specifies the syntax of a command or query (header + parameters) to be placed on the GPIB. Different programming languages (such as BASIC, C, Pascal) have different ways of representing data that is to be output onto the GPIB. It is up to the programmer to determine the methods to output the command required for the programming language used. Alias: Specifies alternative syntax possibilities. Query form: Specifies the syntax of the corresponding query (optional). Response: Specifies the response of the instrument to a query (optional). Description: Describes what the command/query does. limitations: Specifies possible limitations with respect to using and operation. Example: Program examples are included with each command description. ONLY THE COMMAND STRING IS GIVEN. No other programming details are shown, because the method used to send the command string differs, depending upon the GPIB drivers and programming language used. Notation used: Send → Example: Send → *OPT? Read ← Example: Read ← IEEE:0:0,MP:0:0 This means: send the query *OPT? to the instrument. This means: read the response IEEE:0:0,MP:0:0 from the instrument. 4 - 14 COMMAND REFERENCE Errors: Specifies possible error numbers plus their meaning. The error number, plus the corresponding text can be requested by sending the SYSTem:ERROR? or STATus:QUEue? query. Front panel compliance: Specifies the compliance with front panel operations. PROGRAMMING NOTES: • It is advised to send the commands *RST and *CLS first, before executing the programming examples in this chapter. In this way the oscilloscope is reset to default settings (*RST) and the status data cleared (*CLS). • Be aware of coupled commands during command execution. Coupling information is described in the command descriptions. Coupling means that an instrument may change other functions or values, which are not directly programmed by sending this command. Example: The vertical sensitivity is derived from the programmed peak-topeak value (SENSe:VOLTage:RANGe:PTPeak). The programmed trigger level (TRIGger:LEVel) is adapted to the vertical sensitivity to keep the signal display on the screen. • In the remote state the front panel keys will have no effect on programmed settings. Local front panel control can be obtained by pressing the LOCAL key, provided the instrument is not programmed Locally Locked Out (LLO). After power on the oscilloscope is in its local state, i.e., controlled via the front panel. • All commands and queries are sequential commands, except the INITiate, INITiate:CONTinuous, and CALibration command (overlapped commands). Note; Overlapped commands are commands that can be executed in overlap with other commands. Sequential commands are commands that are completed first, before a next command is executed. COMMAND REFERENCE *CAL? CALibration Syntax: *CAL? Response: 0|1 0 Calibration okay. 1 Calibration not okay. 4 - 15 Description: This query performs an automatic internal self-calibration and reports the result of that calibration. No external means or operator interface is needed. The response indicates whether or not the instrument completed the self-calibration without error. A response of 0 indicates that the calibration executed successfully. A response of 1 indicates that the calibration was not successful. A possible calibration error is also reported via bit 8 in the QUEStionable status. If bit 8 = 0, the calibration was successful. If bit 8 = 1, the calibration went wrong. The *CAL? query is the equivalent of the CALibration[:ALL]? query. Limitation: The calibration process will last a couple of minutes. During this time bit 0 in the OPERation status is set, indicating that calibration is busy. This status information can only be requested, if the calibration was started via the front panel. This is because the *CAL? query is a sequential command. So, a next command or query in the same program message is not executed until the calibration process is completed. Until then, no response to a next query is obtained. Example: Send → *CAL? Response is held up during calibration. Read ← IF = 1 THEN PRINT "calibration not successful." Front panel compliance: The *CAL? query is the remote equivalent of the front panel CAL key. 4 - 16 COMMAND REFERENCE *CLS Clear Status Syntax: *CLS Description: The *CLS command clears the following status data structures: 1. Clears all Event Status Registers, such as the following: - Standard Event Status Register (*ESR?) - Status Byte Register (*STB?) - Operation Event Status register (STATus:OPERation:EVENt) - Questionable Event Status Register (STATus:QUEStionable:EVENt) 2. Clears the Error/Event Queue. 3. Cancels the effect of the *OPC command and the *OPC? query; any request for the OPC flag is cancelled. Note: When the *CLS command is entered as the first command in a new program message, it also clears the Output Queue and as a consequence, the MAV-bit in the Status Byte Register. Example: Send → *CLS Clears the status data. COMMAND REFERENCE *ESE Event Status Enable Syntax: *ESE Query form: *ESE? Response: 4 - 17 Description: The command sets and the query reports the contents of the standard Event Status Enable register (ESE). The range of the 8-bit ESE contents is between 0 and 255 decimal. The contents of the standard Event Status Enable (ESE) register determine which bits in the standard Event Status Register (ESR) are enabled to be summarized in the Status byte Register (STB). The contents of the standard ESE register are cleared at Power on. Example: Send → *ESE 17 Send → *ESE? Read ← 17 Enables the EXE (Execution Error) and the OPC (Operation Complete) bits to be summarized in the Status Byte Register. Alternative commands *ESE #B10001 and *ESE #H11. The bits 4 (= EXE bit) and 0 (=OPC bit) are set. 4 - 18 COMMAND REFERENCE *ESR? Event Status Register Syntax: *ESR? Response: Description: The *ESR? query reports the contents of the standard Event Status Register (ESR) and clears it. The range of the 8-bit ESR contents is between 0 and 255 decimal. PON URQ CME EXE DDE QYE RQC OPC 7 6 5 4 3 2 1 0 The meaning of the bits is as follows: bit 7: PON = Power ON bit 5: CME = Command Error bit 3: DDE = Device Dependent Error bit 1: RQC = Request Control • • • • ESR • • • • bit 6: URQ = User Request bit 4: EXE = Execution Error bit 2: QYE = Query Error bit 0: OPC = Operation Complete Notes: - PON indicates that the power supply has been turned off and on since the last time the register was read or cleared. Bit 7 (PON) is always set true at power on. - URQ indicates that the user has requested attention, e.g., to return the instrument to local. - Bit 1 (RQC) is not used (always 0). - OPC indicates that the device has completed all previously started actions. Example: Send → *ESR? Read ← 28 28 is equal to the binary value #B11100 (16 + 8 + 4 decimal),which means that the bits 4 (EXE), 3 (DDE), and 2 (QYE) are set. So, an execution error, a devicedependent error and a query error have occurred since the last time the register was read. COMMAND REFERENCE 4 - 19 *IDN? Identification Syntax: *IDN? Response: ,,, E.g., FLUKE E.g., PM3394B Always 0 :: Firmware identification, consisting of: - Software type, e.g., SW3394BIM (I=IEEE, M=Math Plus) - Software version, e.g., V4.0 - Software date (year-month-day) Mask identification, e.g., UHM V1.0 UFO identification, e.g., UFO V2.0 Description: The *IDN? query reports the identification of the instrument. The response to the *IDN? query consists of the fields above in Arbitrary ASCII Response Data format. This implies that the *IDN? query must be the last query in a program message unit, because the arbitrary ASCII response data is terminated with the New Line character (10 decimal). The parameter identifies the type, version, and date of the instrument firmware. The parameter identifies the version of the Universal Host Mask processor software. The parameter identifies the version of the Universal Front processor software. Example: Send → *IDN? Read ← FLUKE,PM3384B,0,SW3394BIM V4.0 1996-10-02:UHM V1.0:UFO V2.0 Front panel compliance: The *IDN? query is the remote equivalent of the Maintenance option of the UTILITY menu. 4 - 20 COMMAND REFERENCE *OPC Operation Complete Syntax: *OPC Query form: *OPC? Response: 1 Description: The *OPC command causes the instrument to set the operation complete bit (OPC) in the standard Event Status Register (ESR), when all pending operations have been finished. When the *OPC command is received, the OPC bit is set in the *ESR register when all pending operations have been completed. The OPC bit is cleared, along with the other bits in the *ESR register, when the *ESR? query is executed. PON URQ CME EXE DDE QYE RQC OPC 7 6 5 4 3 2 1 0 ESR The *OPC? query places the ASCII character 1 in the output queue when all pending operations are finished. So, when the *OPC query is received, the instrument holds off the GPIB handshake as long as it is addressed as talker and there are device operations pending. Operations exist, as for example INITiate:CONTinuous ON, that never complete. Sending *OPC? during this operation prevents the instrument from responding to further program messages. Note: The *RST command, the *CLS command, and power on cancel the effect of an *OPC command or an *OPC? query. Restrictions: Be careful. The GPIB controller may interrupt the program by means of timeout. So, verify first whether the timeout period is long enough to cover the operation time of the instrument. Example: Send → *RST;*CLS Send → INITiate:CONTinuous ON Send → *OPC;*ESR? Read ← 0 . Send → INITiate:CONTinuous OFF Send → *OPC;*ESR? Read ← 1 Resets instrument clears status data. Continuous initiation. Indicates that the instrument is busy sweeping. No initiation any more. Indicates that the instrument has finished sweeping. COMMAND REFERENCE 4 - 21 *OPT? Option identification Syntax: *OPT? Response:

Navigation menu