
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
Содержание 2714
Страница 4: ......
Страница 11: ...Introduction ...
Страница 12: ......
Страница 38: ...Introduction to Programming 1 26 2714 2715 Programmer Manual ...
Страница 39: ...Message Structure ...
Страница 40: ......
Страница 54: ...Instrument Specific Message Structure 2 14 2714 2715 Programmer Manual ...
Страница 55: ...Functional Groups ...
Страница 56: ......
Страница 85: ...Command Query ...
Страница 86: ......
Страница 179: ...Status Reporting ...
Страница 180: ......
Страница 197: ...Programming ...
Страница 198: ......
Страница 266: ...Programming 6 68 2714 2715 Programmer Manual ...
Страница 267: ...Appendices ...
Страница 268: ......
Страница 276: ...Appendix A RS 232 Concepts A 8 2714 2715 Programmer Manual ...
Страница 296: ...Appendix B GPIB System Concepts B 20 2714 2715 Programmer Manual ...
Страница 297: ...Index ...
Страница 298: ......
Страница 307: ......
Страница 308: ......