Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supercedes
that in all previously published material. Specifications a nd price change privileges reserved.
TEKTRONIX and TEK are registered trademarks of Tektronix, Inc.
Contacting Tektronix
Tektronix, Inc.
14200 SW Karl Braun Drive
P.O. Box 500
Beaverton, OR 97077
USA
For product information, sales, service, and technical support:
HIn North America, call 1-800-833-9200.
HWorldwide, visit www.tektronix.com to find contacts in your area.
This manual is both a reference and a tutorial. It is intended for use by Tektronix
instrumentation end users and application programmers who wish to develop or
modify
About This Manual
HVISA
HApplications that use VISA
This programming manual describes TekVISA, the Tektronix implementation of
the Virtual Instrument Software Architecture (VISA) Library, an interface
pendent software interface endorsed by the VXIplug&play Systems Alliance.
The manual is organized as follows:
HThe Preface and Getting Started sections briefly cover the audience and
HThe Reference section presents TekVISA operations, attributes, and events in
-compliant instrument driver software.
-compliant instrument driver software.
-inde-
conventions for this guide, present overview concepts, summarize TekVISA
features and applications, and explain how to configure TekVISA resources.
alphabetical order.
HThe Operations Summary chapter summarizes the VISA operations
implemented by Tektronix.
HThe Operations chapter describes each VISA operation including its
syntax and sample usage.
HThe Attributes Summary chapter summarizes the VISA attributes
HThe Attributes chapter describes each VISA attribute including its syntax
HThe Events chapter describes each VISA event implemented by
HThe Programming Examples section contains short programs that illustrate
usage of VISA operations, attributes, and events to accomplish specific
tasks.
HAppendices contain summary information for quick reference.
Tektronix TekVISA Programmer Manual
implemented by Tektronix.
and usage.
Tektronix including its syntax and usage.
xv
Preface
Conventions
HThe VISA Data Type Assignments appendix lists VISA data types in
alphabetical order
HThe Completion and Error Codes appendix lists operation completion
codes and error codes in alphabetical order.
HA Glossary and Index appear at the end of the manual.
This manual makes use of certain notational conventions and typefaces in
distinctive ways, as summarized in Table i.
Table i: Table of Typographic Conventions
TypefaceMeaningExample
italicsUsed to introduce terms or to
specify variables for which
actual values should be substituted.
A common I/O library called
the Virtual Instrument
Software Architecture
(VISA)
boldfaceUsed to emphasize important
points or to denote exact
characters to type or buttons
to click in step-by-step procedures.
NOTEUsed to call attention to notes
or tips in text.
<item1, item2, ...>This notation is used to desig-
nate a variable list of one or
more items separated by
commas.
CodeThis font is used to designate
blocks of code.
Menu > SubmenuThis notation is used to desig-
nate a series of cascading
menus.
The requestedKey will be
copied into the user buffer
referredtobytheaccess-
Key.
The viFindRsrc() operation
matches an expression
against the resources available for a particular interface.
1. Click OK.
NOTE. Read this carefully.
viScanf (vi, readFmt,
<arg1, arg2, ...>)
*result = m_ViStatus;
1. Choose File > Open.
xvi
The example here means:
from the File menu, choose
Open.
Tektronix TekVISA Programmer Manual
Related Manuals and Information
Refer to the following manuals for information regarding related products,
manuals, and programming specifications.
HThis programming manual resides in Adobe Acrobat format on the TekVISA
Product Software CD.
Preface
HThe AD007 GPIB
related information if you are controlling your instrumentation from a remote
PC over an Ethernet GPIB
AD007 Product Software CD.
HRefer to the Online Help and Programmer Online Guide for information to
use and program each instrument.
HGeneral information and specifications for Virtual Instrument Software
Architecture (VISA) are available from the web site of the VXIplug&play
System Alliance at http://www.vxipnp.org
to the Tektronix implementation of VISA:
NOTE. Some of the latest VISA specifications are now available at the IVI
Foundation web site at http://www.ivifoundation.org
HVPP
HAll related specifications for the VXIplug&play are available at
-4.3: The VISA Library Revision 3.0. This specification is intended
to be used in conjunction with the VPP
instrument driver development.
http://www.vxipnp.org
-LAN Adapter User Manual (071-0245-XX) provides
-LAN connection. This guide is located on the
. The following document relates
.
-3.X specifications supporting
.
HAll related specifications for the IVI are available at
Tektronix TekVISA Programmer Manual
http://www.ivifoundation.org
.
xvii
Preface
xviii
Tektronix TekVISA Programmer Manual
Getting Started
Getting Started
Product Description
Test and measurement applications require some kind of I/O library to communicate with test instrumentation. As a step toward industry
compatibility, the VXIplug&play S ystems Alliance developed a common I/O
library called the Virtual Instrument Software Architecture (VISA).VISA
provides a common standard for software developers so that software from
multiple vendors, such as instrument drivers, can run on the same platform.
An instrument driver is a library of functions that handles the details of
controlling and communicating with a specific instrument such as a Tektronix
oscilloscope. Instrumentation end users have been writing their own instrument
drivers for years.
This manual describes T ekVISA, the Tektronix implementation of the VISA
Application Programming Interface (API). TekVISA is industry
software, available with selected Tektronix instrument models, for writing
interoperable instrument drivers in a variety of Application Development
Environments (ADEs).
TekVISA implements a subset of Version 3.0 of the VISA specification for
controlling GPIB, USB, and serial (RS
remotely via an Ethernet LAN connection. TekVISA provides the interface
pendent functionality needed to control and access the embedded software of
Tektronix test and measurement equipment in the following ways:
-232) instrument interfaces locally or
-wide software
-compliant
-inde-
HUsing virtual GPIB software running locally on Windows
sation
HUsing physical GPIB controller hardware
HUsing asynchronous serial controller hardware
HOver a Local Area Network (LAN) that uses VXI
Socket, and one of the following:
HAn AD007 LAN
HAn Ethernet connection together with VXI
HAn Ethernet connection together with Socket server running on
Tektronix TekVISA Programmer Manual
-based instrument-
-11 protocol, TCP/IP
-to-GPIB adapter to GPIB controller hardware
-11 server running on
Windows
Series Oscilloscopes
Windows--based instruments such as the DPO/DSA7000 Series
Oscilloscopes
-based instruments such as the TDS7000 and TDS/CSA8000
1- 1
Getting Started
HUsing a USB connection for USB instruments such as the TDS1000B and
TDS2000B series
HUsing TekLink hardware to TekLink-enabled instruments
Features and Benefits
Applications and
Connectivity Supported
by TekVISA
TekVISA offers the following features and benefits:
HImproves ease of use for end users by providing a consistent methodology
for using instrument drivers from a variety of vendors
HProvides language interface libraries for programmers using multiple
Application Development Environments as shown in Figure 1--1, including:
HMicrosoft C/C++
HMicrosoft Visual Basic
HLabVIEW graphics software using the G language
ATLAB analysis software
HM
HProvides an Instrument Manager utility for setting up and searching
additional VISA resources
HProvides debugging utilities such as TalkerListener and CallMonitor
HAllows software installation on any number of PCs
TekVISA is beneficial in a variety of situations and applications:
HA single instrument driver can be used by multiple Application Development
Environments.
1- 2
HInstrument drivers from several vendors can be combined in a single user
application.
HUser programs running on Windows
-based instrumentation can use TekVISA
to control instrument operation via a virtual GPIB software connection,
without using any external GPIB hardware.
HUser programs running on remote PCs networked toWindows
-based
instrumentation can use TekVISA to control instrument operation via a
virtual GPIB, VXI
GPIB
-LAN hardware is needed. Only an Ethernet LAN connection is
-11 server, and Socket server connection. No external
required.
HUser programs connected locally or remotely to other non
-Windows-based
Tektronix instrumentation can use TekVISA to control instrument operation
via a GPIB, USB, or serial (RS232) connection locally, or remotely via
TCPIP directly or via a Tektronix AD007 GPIB
-LAN adapter.
Tektronix TekVISA Programmer Manual
Figures 1--1 and 1--2 illustrate the variety of software, local hardware, and
network connections to embedded instrumentation supported by TekVISA.
Application Development Environments (ADE)
C,C++
C, C++
Program
Program
VisualBasic
Visual Basic
Program
Program
LabVIEWand
LabVIEW and
LabWindows
LabWindows
MATLAB
MATLAB
Getting Started
Virtual GPIB
(GPIB8)
IVI--COM
GPIB
(GPIB0--GPIB3)
VXIplug &
play
TekVISA Input/Output Library API
ASRL
(RS232 COM1,
COM2)
Test and Measurement Instruments
Test and Measurement Instruments
LAN
(VXI--11, Socket)
TVC
Tek LinkUSB
Figure 1- 1: TekVISA Supports Multiple Development Environment s
Tektronix TekVISA Programmer Manual
1- 3
Getting Started
Remote
UNIX- based Controller
User
Application
Socket
Client
Windows- based
Oscilloscope
Windows--side
of Instrument
Socket
Client
Tek Link
User
Application
VXI--11
Client
VXI--11
Server
Ethernet
LAN
Remote
Windows- based Controller
User
Application
VISA Library
Socket
Client
Ethernet
LAN
VXI--11
Client
Embedded Software side
of Instrument
GPIB--LAN Adapter
w/VXI--11 / Ethernet Lan
Local
Windows- based Controller
User
Application
VISA Library
ASRL
GPIB
Hardwave
GPIB
Hardwave
RS--232
Hardwave
USB
USB
VXI--11
Client
ASRL
VISA Library
GPIB
Socket
Server
Virtual
GPIB
software
GPIB
connection
Figure 1- 2: TekVISA Supports Local and Remote Connectivity
Non Windows- based
Instruments
1- 4
Tektronix TekVISA Programmer Manual
Terminology
Getting Started
The VISA specification introduces a number of new terms. Refer to the Glossary
at the end of this manual for a complete list of terms and definitions. Some key
terms are discussed in the following paragraphs and illustrated in Figure 1--3.
Resources, INSTR
Resource, SOCKET
Resource, and Sessions
VISA defines an architecture consisting of many resources that encapsulate
device functionality. In VISA, every defined software module is a resource. In
general, the term resource is synonymous with the word object in objec
architectures. For VISA, resource more specifically refers to a particular
implementation or instance, in object
is the definition for how to create a particular resource.
A specialized type of resource class is a VISA instrument control (INSTR)resource class, which defines how to control a particular device. An INSTR
resource class encapsulates the various operations for a particular device together
(reading, writing, triggering, and so on) so that a program can interact with that
device through a single resource. TekVISA supports many kinds of devices
associated with the INSTR resource class: GPIB, ASRL (serial) devices, USB,
TCPIP/LAN, and TekLink.
The TCP/IP Socket (SOCKET) Resource encapsulates the operations and
properties of the capabilities of a raw network socket connection using TCP/IP.
A VISA Socket Resource like the INSTR resource, starts with the basic
operations and attributes of the VISA Resource Template. The SOCKET
Resource exposes the capability of a raw network socket connection over
TCP/IP.
Applications that use VISA can access device resources by opening sessions to
them. A session is a communication path between a software element and a
resource. Every session in VISA is unique and has its own life cycle. VISA
defines a locking mechanism to restrict access to resources for special circumstances.
-oriented terms, of a resource class, which
t-oriented
Operations, Attributes,
and Events
The Resource Manager
Tektronix TekVISA Programmer Manual
After establishing a session, an application can communicate with a resource by
invoking operations associated with the resource or by updating characteristics
of resources called attributes. Some attributes depict the instantaneous state of
the resource and others define changeable parameters that modify the behavior of
resources. A VISA system also allows information exchange through events.
VISA Resource Manager is the name given to the part of VISA that manages
resources. This management includes support for opening, closing, and finding
resources; setting and retrieving resource attributes; generating events on
resources; and so on.
1- 5
Getting Started
The VISA Resource Manager provides access to all resources registered with it.
It is therefore at the root of a subsystem of connected resources. Currently, one
Resource Manager is available by default after initialization. This is called the
Default Resource Manager. This identifier is used when opening resources,
finding available resources, and performing other operations on device resources.
raise/respond to
INSTR
Default
Resource
Manager
provides access to
Resources
(Virtual
Instruments)
operate within
Figure 1- 3: Key VISA Terminology for INSTR Resource
Events
haveAttributes
perform
Operations
Sessions
1- 6
Tektronix TekVISA Programmer Manual
Default
Resource
Manager
provides access to
Getting Started
haveAttributes
SOCKET
Resources
(Virtual
Instruments)
Virtual Instruments and
Virtual GPIB
perform
operate within
Operations
Sessions
Figure 1- 4: Key VISA Terminology for SOCKET Resource
NOTE. SOCKET connections do not support VISA Events.
SOCKET connections automatically perform a viLock() of the interface and
cannot be shared like other VISA bus types.
A virtual instrument is a name given to the grouping of software modules
(VISA resources with any associated or required hardware) to give the functionality of a traditional stand
-alone instrument. Within VISA, a virtual instrument is
the logical grouping of any of the VISA resources. TekVISA supports USB,
ASRL (serial) and GPIB virtual instruments, which work with accompanying
USBTMC, RS
-232 and GPIB hardware respectively.
In addition, TekVISA includes a specialized type of GPIB resource called virtual
GPIB. User programs running on oscilloscopes with Windows
tation, or running on a remote PC connected by LAN to such an instrument, can
access the embedded instrument software by using a virtual GPIB software
connection, without the need for any GPIB controller hardware or cables.
Tektronix TekVISA Programmer Manual
-based instrumen-
1- 7
Getting Started
What You Need to Get Started
TekVISA Installation
VISA applications that communicate with Tektronix instrumentation should use
TekVISA, the Tektronix version of VISA. You should install and configure
TekVISA on each PC that communicates with Tektronix instrumentation using
the VISA standard.
The software installation includes a utility to help you configure TekVISA
resources. The VISA Instrument Manager allows you to detect USB, GPIB, and
serial (ASRL) resource assignments, and to add or remove remote hosts (such as
VXI
-11 or Socket clients connected by Ethernet LAN or by an AD007 adapter
and associated GPIB hardware).
NOTE. If you are connecting to a network just to print screen hardcopy data, you
do not need to install or configure TekVISA software.
TekVISA comes installed on current Tektronix MS-Windows oscilloscopes as
part of the Product Software.
To install TekVISA software on a PC connected to your Tektronix oscilloscope,
follow the steps shown below on Table 1--1.
Table 1- 1: Installing TekVISA Software on a PC
Alternative Locations for Finding
TekVISA Software
The product software CD for your
MS-Windows oscilloscope
The TDSPCS1 OpenChoice PC
Communications Software CD
The OpenChoice Solutions Software
Developers’ Kit CD
The current TekVISA installation
download from the Tektronix Web site
Instructions for Installing TekVISA Software
on a PC
In your MS-Windows computer, select Start > Run,
browse the CD to the TekVISA folder, and run
setup.exe.
Follow the instructions in the installation wizard.
Click on the Developers’ Kit browser button for
Software Drivers and then for TekVISA
Unzip the downloaded file in a temporary directory of
your choice and run setup.exe.
NOTE. If you have already installed TekVISA from an earlier version of the
Tektronix Software Solutions CD or with Wavestar, you should uninstall that
version first, and then r einstall TekVISA from the most recent source.
1- 8
Tektronix TekVISA Programmer Manual
Loading...
+ 234 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.