
Programming
2714 & 2715 Programmer Manual
6–49
NOTE
. The header statements in Example 6–3 and the sample subroutines in this
section do not make provisions for error trapping and event reporting.
See Status Reporting and the demonstration program at the end of this section
for error and event reporting routines.
NOTE
. The 2714 or 2715 must have a spectral display on its screen when any
RS-232 or GPIB program is executed. If the 2714 or 2715 is displaying a menu
when a program is executed, the program will not run properly.
REM $INCLUDE: 'QBDECL4.BAS'
COMMON SHARED BD%,BDNAME$,RD$,WRT$
RD$=SPACE$(5000)
BDNAME$ = TEK_SA"
CALL IBFIND (BDNAME$, BD%)
Curves (waveforms) transferred from the spectrum analyzer to the controller are
important for data analysis, archiving, and reporting purposes. Curves transferred
to the spectrum analyzer can be used for comparison or to establish references.
The
CURve
command transfers a block of data from the controller to the spectrum
analyzer and the
CURve?
query returns a block of data from the spectrum
analyzer to the controller.
The data block represents the 512 points in a 2714 or 2715 waveform (see
Command and Query Definitions for
CURve?
response formats). Before curve
data is transferred you must specify which digital display register (A, B, C, or D)
the curve is coming from or going to, and the type of data encoding to be used.
The encoding (ASCII-encoded decimal, ASCII-encoded hexadecimal, or binary)
is determined by the waveform preamble (see the
WFMpre
command).
The destination of the transmitted data or origin of the returned data is also
determined by the preamble unless the
A
,
B
,
C
, or
D
argument is used with the
CURve?
query. In these cases, the origin is specified by the argument. For
example,
CURve? C
returns data from the C register.
Example 6–4 shows two QuickBASIC subroutines that can be used with the
National Instruments board and software to send and return ASCII-encoded
curve data. The returned data is displayed on the controller screen, and will
resemble the ASCII example in the
CURve
command as described in Command
and Query Definitions. The
WFMpre
command determines the encoding and
source or destination registers in both subroutines. An alternate approach to
transferring curve data (as packed integers) is illustrated in the GPIB demonstra-
tion program at the end of this section.
Example 6–3
GPIB Program Header
Statements
Curve Transfers
Summary of Contents for 2714
Page 4: ......
Page 11: ...Introduction ...
Page 12: ......
Page 38: ...Introduction to Programming 1 26 2714 2715 Programmer Manual ...
Page 39: ...Message Structure ...
Page 40: ......
Page 54: ...Instrument Specific Message Structure 2 14 2714 2715 Programmer Manual ...
Page 55: ...Functional Groups ...
Page 56: ......
Page 85: ...Command Query ...
Page 86: ......
Page 179: ...Status Reporting ...
Page 180: ......
Page 197: ...Programming ...
Page 198: ......
Page 266: ...Programming 6 68 2714 2715 Programmer Manual ...
Page 267: ...Appendices ...
Page 268: ......
Page 276: ...Appendix A RS 232 Concepts A 8 2714 2715 Programmer Manual ...
Page 296: ...Appendix B GPIB System Concepts B 20 2714 2715 Programmer Manual ...
Page 297: ...Index ...
Page 298: ......
Page 307: ......
Page 308: ......