Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication
supersedes that in all previously published material. Specifications and price change privileges reserved.
TEKTRONIX and TEK are registered trademarks of Tektronix, Inc.
Contacting
Tektronix, Inc.
14150 SW Karl Braun Drive
P.O. Box 50
Beaverton, OR 97077
USA
For product information, sales, service, and technical support:
In North America, call 1-800-833-9200.
Worl dwi
Tektronix
0
de, visit www.tektronix.com to find contacts in your area.
iiFCA3000, FCA3100, MCA3000 Series Programmer Manual
Preface
This programmer manual covers the Tektronix FCA3000, FCA3100, and
MCA3000 Series Timer/Counter/Analyzer instruments. It provides information
on operating
or USB interface.
your instrument using the General Purpose Interface Bus (GPIB)
The program
Getting Started. This section introduces you to the programming information
and provid
control.
Syntax an
provides tables that list all the commands by functional groups, and describes
all commands in alphabetical order.
Status and Events. This section discusses the status and event reporting
system for the GPIB interfaces. This system informs you of certain significant
events that occur within the instrument. Topics that are discussed include
registers, queues, event handling sequences, synchronization methods, and
messages that the instrument may return, including error messages.
Programming examples. This section provides example s of C code used to
take measurements with the instruments.
Appendices. The appendices contain miscellaneous information such as a
list of reserved words, a table of the factory initialization (default) settings,
and
mer m anual contains the following sections:
es basic information about setting up your instrument for remote
d Commands. This section describes the command syntax structure,
interface specifications.
FCA3000, FCA3100, MCA3000 Series Programmer Manualiii
Preface
ivFCA3000, FCA3100, MCA3000 Series Programmer Manual
Getting Started
Setting Up the Instrument
Setting the GPIB Address
Standby Power and
Remote Access
Testing the Bus
The default GPIB address of the instrument is 10. Push USER OPT > Interface
to see the active address above the soft key button labeled GPIB address.
To change the instrument GPIB address, push GPIB address and enter a new
address value between 0 and 30. The GPIB address is stored in nonvolatile
memory and remains until you change it.
You can also set the GPIB address remotely by using a GPIB command.
When the instrument is in REMOTE mode, you cannot power it off from the
power button. You must first push the Esc button to enter Local mode, and then
push the Power button.
To test that the instrument is operational over the bus, send the *IDN? command
to identify the instrument and the *OPT? command to identify which features
are available.
FCA3000, FCA3100, MCA3000 Series Programmer Manual1-1
Interface Functions
Interface Fun
ctions
Table 1-1: In
CodeDescription
SH1Source handshake: The instrument can exchange data with other instruments or
AH1Acceptor handshake: The instrument can exchange data with other instruments
C0Control function: The instrument does not function as a controller.
T6
L4
terface function summary
a controller using the bus handshake lines DAV, NRFD, and NADC.
or a controller using the bus handshake lines DAV, NRFD, and NADC.
Talker function: The instrument can send responses and the results of its
measurem
Listen
controller. L4 has the following functions:
ents to other devices or to the controller. T6 has the following functions:
Basic tal
No talke
Send out
Automat
Basic listener
No listen only
ker
r only
a status byte as response to a serial poll from the controller
ic unaddressing as a talker when it is addressed as a listener
er function: The instrument can receive programming instructions from the
Automatic unaddressing as listener when addressed as a talker
SR1Service request: The instrument can call for attention from the controller, such as
when a measurement is complete d and a result is available.
RL1
PP0
DC1Device clear function: The controller can reset the instrument by sending the
DT1
E2
Remote/local function: You can control the instrument manually (locally) from the
nt panel or remotely from the controller. The LLO, local-lock-out function, can
fro
disable the LOCAL button on the front panel.
Parallel poll: The instrument does not have any parallel poll facility.
interface message DCL (Device clear) or SDC (Selective Device Clear).
Device trigger function: You can start a new measurement from the controller by
ending the interface message GET (Group Execute Trigger).
s
us drivers: The GPIB interfa ce has tri-state bus drivers.
B
1-2FCA3000, FCA3100, MCA3000 Series Programmer Manual
Using the USB Interface
Using the USB I
nterface
The instrume
same command set as the GPIB interface.
The USB inte
standard USBTMC (Universal Serial Bus Test and Measurement Class) revision
1.0, with the subclass USB488, revision 1.0. The full specification for this
protocol is at www.usb.org.
A valid driver for this protocol must be installed to be able to communicate over
USB. We recommend NI-VISA version 3.2 or above, which is available from
National Instruments (www.ni.com) for several operating systems. The Windows
version is supplied on the product CD.
In order to test the communication and send single commands, use the National
Instruments utility supplied with the NI-VISA drivers to open a VISA session to
send an
Remote or Local.
party application programs, such as LabView, normally support USB
Third
communication directly, for example through the Instrument I/O Assistant.
om specific programs using USB communication can be written in C/C++,
Cust
supported by libraries and lib-files supplied w ith the NI-VISA driver (default
location C:\VXIPNP\WinNT\). A sample program is in included in the Examples
section. (See page 4-9, USB Communication (Example #4).)
nt is equipped with a USB full speed interface, which supports the
rface is a full speed interface (12 Mbit/s), supporting the industry
d receive data from the instrument, and also set control signals such as
Instruments connected to the USB bus are identified by a unique vendor identifier,
the instrument model number and the instrument serial number. The structure
of the instrument identifier string is:
“USB0::0x0699::0x3003::######::INSTR”
Where:
0x0699 is the vendor identifier code for Tektronix instruments
0x3003 is the instrument model (based on the last four digits of the model
number)
###### is the instrument serial number
Use this string to identify the instrument vendor, model, or serial number when
searching for or connecting to a specific instrument.
FCA3000, FCA3100, MCA3000 Series Programmer Manual1-3
Using the USB Interface
1-4FCA3000, FCA3100, MCA3000 Series Programmer Manual
Syntax and Commands
Command Syntax
You can control the operations and functions of the instrument through the GPIB
port or the USB 2.0 device port using commands and queries. The related topics
listed below
also describe the conventions that the instrument uses to process them. See the
Command Groups topic in the table of contents for a listing of the commands by
command group, or use the index to locate a specific command.
describe the syntax of these commands and queries. The topics
Backus-Naur Form
Notation
This documentation describes the commands and queries using Backus-Naur
Form (BNF) notation. The following table lists the BNF notation symbols.
Table 2-1: Symbols for B ackus-Naur form
SymbolMeaning
<>
=
|Exclusive OR
{ }Group; one element is required
[]
.. .
( )Comment
Command and Query Structure
mmands consist of set commands and query commands (usually called
Co
commands and queries). Commands modify instrument settings or tell the
instrument to perform a specific action. Queries cause the instrument to return
data and status information.
Defined element
Is defined as
Optional; can be omitted
Previous element(s) may be repeated
Most commands have both a set form and a query form. The query form of the
command differs from the set form by its question mark at the end. For example,
the set command
Not all commands have both a set and a query form. Some commands have set
only and some have query only.
Messages
FCA3000, FCA3100, MCA3000 Series Programmer Manual2-1
A command message is a command or query name followed by any information
the instrument needs to execute the command or query. Command messages may
contain five element types, defined in the following table.
ACQuisition:HOFF has a query form ACQuisition:HOFF?.
Command Syntax
Commands
Table 2-2: Comm
SymbolMeaning
<Header>
<Mnemonic>
<Argument
<Comma>A single c
<Space>
>
and message elements
This is the basic command name. If the header ends with a question
mark, the command is a query. The header may begin with a colon
(:) characte
the beginning colon is required. Never use the beginning colon with
command headers beginning with a star (*).
This is a header subfunction. Some command headers have only one
mnemonic. I
character always separates them from each other.
This is a qu
Some commands have no arguments while others have multiple
arguments. A <space> separates arguments from the header. A
<comma> se
commands. Optionally, there may be white space characters before
and after the comma.
A white space character is used between a command header and the
related argument. Optionally, a white space may consist of multiple
white sp
r. If the command is concatenated with other commands,
f a command header has multiple mnemonics, a colon (:)
antity, quality, restriction, or limit associated with the header.
parates arguments from each other.
omma is used between arguments of multiple-argument
ace characters.
Commands cause the instrument to perform a specific function or change one of
the settings. Commands have the structure:
A command header consists of one or more mnemonics arranged in a hierarchical
or tree structure. The first mnemonic is the base or root of the tree and each
subsequent mnemonic is a level or branch off the previous one. Commands at a
higher level in the tree may affect those at a lower level. The leading colon (:)
always returns you to the base of the command tree.
You can specify a query command at any level within the command tree unless
otherwise noted. These branch queries return information about all the mnemonics
below the specified branch or level.
You can clear the Output Queue and reset the instrument to accept a new command
or query by using the selected Device Clear (DCL) function.
2-2FCA3000, FCA3100, MCA3000 Series Programmer Manual
Command Entry
Command Syntax
The following rules apply when entering commands:
You can enter commands in upper or lower case.
You can precede any command with white space characters. White space
characters include any combination of the ASCII control characters 00 through
09 and 0B through 20 hexadecimal (0 through 9 and 11 through 32 decimal).
The instrument ignores commands consisting of any combination of white
space characters and line feeds.
Abbreviating
tenating
Conca
You can abbreviate many instrument commands. The syntax of each command
shows the minimum acceptable abbreviations in capitals. For example, you
can enter the command
or calc:aver:coun.
Abbreviation rules may change over time as new instrument models are
introduced. Thus, for the most robust code, use the full spelling.
You can concatenate any combination of set commands and queries using a
semicolon (;). The instrument executes concatenated commands in t he order
received.
CALCulate:AVERage:COUNt as CALC:AVER:COUN
FCA3000, FCA3100, MCA3000 Series Programmer Manual2-3
Command Syntax
When concatena
ting commands and queries, you must follow these rules:
1. Separate completely different headers by a semicolon and by the beginning
colononallco
the commands
into the following single command:
10
CALCULATE:AVERAGE:COUNT 20;INPUT:ATTENUATION 10
2. If concaten
mmands except the first one. For example, you can concatenate
CALCULATE:AVERAGE:COUNT 20 and INPUT:ATTENUATION
ated commands have headers that differ by only the last mnemonic,
you can abbreviate the second command and eliminate the beginning colon.
For example, you can concatenate the commands
INPUT:ATTENUATION 10
and INPUT:COUPLING DC into a single command:
INPUT:ATTENUATION 10; COUPLING DC
The longer version works equally well:
INPUT:A
TTENUATION 10;INPUT:COUPLING DC
3. Never precede a star (*) command with a colon:
INPUT:ATTENUATION 10;*OPC
Any commands that follow are processed as if the star command
was not there. For example, the commands
10;*OPC;INPUT:COUPLING DC
t coupling to DC.
inpu
set the input attenuation to 10X and set the
INPUT:ATTENUATION
Message Terminator
Argument Types
Enumeration
This documentation uses <EOM> (End of Message) to represent a message
terminator. An incoming end of message terminator can be one of the following:
END message (EOI asserted concurrently with the last data byte). The last
data byte may be an ASCII line feed (LF) character.
Combining LF and EOI.
The instrument always terminates outgoing messages with LF and EOI.
Commands use arguments such as enumeration, numeric, quoted string and block.
Each of these arguments are listed in detail below.
Enter these arguments as unquoted text words. Like key words, enumeration
arguments follow the same convention where the portion indicated in uppercase is
required and that in lowercase is optional.
For example:
INPUT:COUPLING DC
2-4FCA3000, FCA3100, MCA3000 Series Programmer Manual
Command Syntax
Numeric
Quoted String
Many instrumen
t commands require numeric arguments. The syntax shows the
format that the instrument returns in response to a query. This is also the preferred
format when sending the command to the instrument though any of the formats
will be accepted. This documentation represents these arguments as described
below.
Table 2-3: Numeric arguments
SymbolMeaning
<Integer>
<Decimal data>Floating point value with or without an exponent
Most nume
ric arguments are automatically forced to a valid setting, by either
Signed integer value
rounding or truncating, when an invalid number is input, unless otherwise noted
in the command description.
Some co
mmands accept or return data in the form of a quoted string, which is
simply a group of ASCII characters enclosed by a single quote (') or double quote
("). The following is an example of a quoted string:
string"
.
"This is a quoted
A quoted string can include any character defined in the 7-bit ASCII character
set. Follow these rules when you use quoted strings:
1. Use the same type of quote character to open and close the string. For
example:
"this is a valid string".
2. You can mix quotation marks within a string if you follow the previous rule.
For example:
"this is an 'acceptable' string".
3. You can include a quote character within a string by repeating the quote. For
example:
"here is a "" mark".
4. Strings can have upper or lower case characters.
5. If you use a GPIB network, you cannot terminate a quoted string with the
END message before the closing delimiter.
6. A carriage return or line feed embedded in a quoted string does not terminate
the string. The return is treated as another character in the string.
7. The maximum length of a quoted string returned from a query is 1000
characters.
Here are some invalid strings:
"Invalid string argument' (quotes are not of the same type)
"test<EOI>" (termination character is embedded in the string)
FCA3000, FCA3100, MCA3000 Series Programmer Manual2-5
Command Syntax
Macros
Block
Several instru
ment commands use a block argument form, as definedinthe
following table:
Table 2-4: Block argument
SymbolMeaning
<NZDig>
<Dig>
<DChar>A character with the hexadecimal equivalent of 00 through FF (0
<Block>
A nonzero digit character in the range of 1-9
A digit character, in the range of 0-9
<NZDig> specifies the number of <Dig> elements that follow. Taken together,
the <NZDig> and <Dig> elements form a decimal integer that specifies how
many <DChar> elements follow.
A macro is a single command, that represents one or several other commands,
ding on your definition. You can define 25 macros of 40 characters in the
depen
instrument. One macro can address other macros, but you cannot call a macro
from within itself (recursion). You can use variable parameters that modify the
macro.
Macro Names
Data Types Within Macros
Usemacrostodothefollowing:
Provide a shorthand for complex commands.
tdownonbustraffic.
Cu
You can use both commands and queries as macro labels. The label cannot be
the same as common commands or queries. If a macro label is the same as an
nstrument command, the instrument will execute the macro when macros are
i
enabled ( *EMC 1), and it will execute the instrument command when macros
are disabled (*EMC 0).
The commands to be performed by the macro can be sent both as block and string
data.
String data is the easiest to use since you don’t have to count the number of
characters in the m acro. However, there are some things you must keep in mind:
Both double quote (“) and single quote (‘) can be used to identify the string data.
If you use a controller language that uses double quotation marks to define strings
2-6FCA3000, FCA3100, MCA3000 Series Programmer Manual
Command Syntax
Define Macro Command
within the lang
and use single quotes as string identifiers within the macro.
When using str
different type of string data identifiers for strings within the macro. If the
macro should for instance set the input slope to positive and select the period
function, you must type:
“:Inp:slope pos; :Func ’PER 1’”
or
‘:Inp:slo
*DMC assigns a sequence of commands to a macro label. Late r when you use the
macro label as a command, the instrument will execute the sequence of commands.
NP:LEV:AUTO ON ;:ARM:START:LAY2:SOURCE BUS;:INIT:CONT
1’;:I
ON;*TRG"
uage (like BASIC) we recommend that you use block data instead,
ing data for the commands in a macro, remember to use a
pe pos; :Func "PER 1"’
example defines a macro “FREQUENCY?” that takes a single frequency
This
measurement with an automatic trigger level setting and places the result in the
output queue.
Macros with arguments. You can pass arguments (variable parameters) with the
macro. Insert a dollar sign ($) followed by a single digit in the range 1 to 9 where
u want to insert the parameter. See the example below.
yo
When a macro with defined arguments is used, the first argument sent will replace
ny occurrence of $1 in the definition; the second argument will replace $2, and
This example defines a macro called AUTOFILT that takes one B oolea n argument
such as ON or OFF for ($1).
AUTOFILT OFF
Turns off both the auto function and the analog lowpass filteronbothinput
channels.
FCA3000, FCA3100, MCA3000 Series Programmer Manual2-7
Command Syntax
Deleting Macros
Enabling and Disabling
Macros
How to Execute a Macro
Use the *PMC ( pu
with the*DMC command. This removes all macro l abels and sequences
from the memory. To delete only one macro in the memory, use
the:MEMory:DELete:MACRo command.
NOTE. You cannot overwrite a macro; you must delete it before you can use the
same name for a new macro.
*EMC Enable Macro Command. When you want to execute an instrument
command or query with the same name as a defined macro, you need to disable
macro execution. Disabling macros does not delete stored macros; it just hides
them from execution.
Disabling: *EMC0 disables all macros.
Enabling: *EMC1.
*EMC? Enable Macro Query. Use this query to determine if m acros are enabled.
Possible response: 1 = macros are enabled, 0 = macros are disabled
Macros are disabled after *RST, so to be sure, start by enabling macros with
*EMC 1. Now macros can be executed by using the macro labels as commands.
2-8FCA3000, FCA3100, MCA3000 Series Programmer Manual
Command Syntax
LMC? Learn Macr
all the macros stored in the Timer/instrument.
Example:
*LMC? might return "MYINPSETTING","LIMITMON"
Now there are two macros in memory, and they have the following labels:
“MYINPSETTING” and “LIMITMON”.
oquery. This query returns a response containing the labels of
FCA3000, FCA3100, MCA3000 Series Programmer Manual2-9
Command Syntax
2-10FCA3000, FCA3100, MCA3000 Series Programmer Manual
Command Groups
Arming Subsystem
Table 2-5: Arming commands
CommandDescription
ARM:COUNtSets or returns the upward exit of the wait-for-bus-arm
ARM:DELay
ARM:LAYer2
ARM:LAYer2:SOURceSets or returns the m ode for the wait-for-bus-arm
ARM:SLOPeSets or returns the slope for the start arming condition.
ARM:SOURceSelects START arming input or switches off the start
ARM:STOP:SLOPeSets or returns the slope for the stop arming condition.
ARM:STOP:SOURceSelects STOP arming input or switches off the STOP
ARM:STOP:TIMerSets or returns a delay between a pulse on the
state.
Sets or returns a delay between the pulse on
the selected arming input and the time when the
instrument starts measuring.
Overrides the waiting for bus arm, provided the source
is set to bus.
function,
arming function.
arming function.
selected start arming input and the point of time when
totalizing stops (FCA3100 Series only, Totalize mode
only).
Calculate Subsystem
The calculate subsystem processes the measuring results. Here you can recalculate
the result using mathematics, make statistics and set upper and lower limits for
the measurement result. The instrument itself monitors the result and alerts you
when the limits are exceeded.
Limit monitoring makes it is possible to get a service request when the
measurement value falls below a lower limit or rises above an upper limit. Two
status bits are defined to support limit monitoring. One is set when the results
are greater than the UPPer limit, the other is set when the result is less than
the LOWer limit. Enable the bits by using the standard *SRE command and
:STAT:DREG0:ENAB. Using both these bits, it is possible to get a service request
when a value passes out of a band ( UPPer is set at the upper band border and
LOWer at the lower border) OR when a measurement value enters a band (LOWer
set at the upper band border and UPPer set at the lower border). Turning the limit
monitoring calculations on or off will not influence the status register mask bits
which determine whether or not to generate a service request when a limit is
reached. Note that the calculate subsystem is automatically enabled when limit
FCA3000, FCA3100, MCA3000 Series Programmer Manual2-11
Command Groups
monitoring is s
witched on. This means that other enabled calculate sub-blocks are
indirectly switched on.
Table 2-6: Calculate commands
CommandDescription
CALCulate:AVERage:ALL?
CALCulate:AVERage:COUNtSets or returns the number of samples to use in
CALCulate
CURRent?
CALCulate:AVERage:STATeSwitches the statistical function on and off or returns
CALCulate:AVERage:TYPESets or returns the statistical function to be performed.
CALCulate:DATA?
CALCulate:IMMediateCauses the calculate subsystem to reprocess
CALCulate:LIMitTurns On/Off the limit-monitoring calculations.
CALCulate:LIMit:CLEar
CALCulate:LIMit:CLEar:AUTO
CAL
CAL
CALCulate:LIMit:FCOunt:LOWer?Returns the number of times the set lower limit was
ALCulate:LIMit:FCOunt:UPPer?
C
CALCulate:LIMit:LOWerSets or returns the value of the lower limit.
CALCulate:LIMit:LOWer:STATeSets whether the measured value should be checked
CALCulate:LIMit:PCOunt?Returns the number of measurement results between
CALCulate:LIMit:UPPerSets or returns the value of the upper limit.
CALCulate:LIMit:UPPer:STATeSets whether the measured value should be checked
CALCulate:MATHDefines the mathematical expression used for
:AVERage:COUNt:
Culate:LIMit:FAIL?
Culate:LIMit:FCOunt?
Returns mean value, standard deviation, min and max
value from the current statistics sampling.
statistics
Returns th
sampling.
the state.
Fetches data calculated in the post processing block.
the sta
reacquiring the data. Query returns this reprocessed
data.
Resets the instrument that reports its result using the
CALCulate:LIMit:FCOunt? query.
Activates or deactivates automatic reset by INIT
of the instrument that reports its result using the
CALC
Ret
Ret
upper limits have been passed since the instrument
was last reset.
p
R
passed since the instrument was l ast reset
against the lower limit.
the set lower and upper limits since the instrument
was last reset
against the upper limit.
mathematical operations.
sampling.
e number of samples in the current statistics
tistical function on the sense data without
ulate:LIMit:FCOunt? query.
urns the result of limit testing.
urns the total number of times the set lower and
assed since the instrument was last reset.
eturns the number of times the set upper limit was
2-12FCA3000, FCA3100, MCA3000 Series Programmer Manual
Calibration Subsystem
Command Groups
Table 2-6: C alculate commands (cont.)
CommandDescription
CALCulate:MATH:STATeSwitches on/off the mathematical function.
CALCulate:STATeSwitches on/off the complete post-processing block.
CALCulate:TOTalize:TYPESelects postprocessing for totalize.
This subsystem controls the calibration of the interpolators used to increase the
resolution of the instrument.
Table 2-7: Calibration commands
CommandDescription
CALibration:INTerpolator:AUTOSets or returns whether the instrument calibrates the
time interpolators for every measurement.
Configure Function
CONFigure; READ?
The CONFigure command sets up the instrument to make the same measurements
as the MEASure query, but without initiating the measurement and fetching the
result. Use configure when you want to change any parameters before making
measurement.
the
The CONFigure command causes the instrument to choose an optimal setting for
the specified measurement. CONFigure may cause any device setting to change.
EAD? starts the acquisition and returns the result.
R
This sequence operates in the same way as the MEASure command, but now it is
ossible to insert commands between CONFigure and READ ? to fine-tune the
p
setting of a particular function. For example, you can change the input impedance
from 1M Ω to 50Ω.
Start with the command CONFigure:FREQ 2E6,1, where 2E6 is the expected
value 1 is the required resolution (1Hz).
Then send INPut:IMPedance 50 to set input impedance to 50 Ω.
Then send READ? to start the measurement and returns the result.
CONFigure;INITiate;FETCh?
FCA3000, FCA3100, MCA3000 Series Programmer Manual2-13
The READ? command can be divided into the INITiate command, which starts
the m easurement, and the FETCh? command, which requests the instrument to
return the measuring results to the controller.
Command Groups
Start with the c
ommand CONFigure:FREQ 20E6,1, where 20E6 is the expected
signal value 1 is the required resolution.
Then send INPu
t:IMPedance 1E6 to set input impedance to 1 MΩ.
Then send INITiate to start the measurement.
Then send FETCh? to fetch the result.
Table 2-8: Comparison of ways to take a measurement
CommandAdvantage
MEASure?Simple to use, few additional possibilities.
CONFigure READ?Somewhat more difficult, but some extra
possibilities.
CONFigure INITiate FETCh?Most difficult to use, but many extra features.
Table 2
CommandDescription
CONFigure:ARRay:
<MeasuringFunction>
CONFigure:<MeasuringFunction>Sets up the instrument to perform one measurement.
CONFigure:TOTalize[:
CONT
-9: Configure commands
Sets up the instrument to perform the number of
measurements you choose.
Set up the instrument to take repeated measurements.
inuous]
Display Subsystem
Fetch Function
Commands in this subsystem control what data is to be present on the display
and whether the display is on or off.
Table 2-10: Display command
mmand
Co
ISPlay:ENABle
D
scription
De
urns On/Off the updating of the screen.
T
Table 2-11: Fetch commands
CommandDescription
FETCh:ARRay?
FETCh[:SCALar]?
Fetches multiple measurements.
Fetches a single measurement.
2-14FCA3000, FCA3100, MCA3000 Series Programmer Manual
Loading...
+ 161 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.