![Tektronix 2714 Programmer'S Manual Download Page 200](http://html1.mh-extra.com/html/tektronix/2714/2714_programmers-manual_1077901200.webp)
Programming
6–2
2714 & 2715 Programmer Manual
RS-232 Program Examples
This section contains two RS-232 program examples:
H
Talk/Listen Demo Program (Example 6–1)
H
CATV XMOD Command Demo Program (Example 6–2)
NOTE
. The 2714 or 2715 must have a spectral display on its screen when these
programs are executed. If the 2714 or 2715 is displaying a menu when either
program is executed, the program will not run properly.
The Talk/Listen Demo Program accepts single commands or queries, and
performs the command function or returns the query response.
The CATV XMOD Command Demo Program executes the
CATV XMOD
command, and displays the test data in a single-column format.
These interactive programs include extensive error checking and a friendly
human interface. The code clearly defines program variables and their use, and
subroutine linkage. The code also contains useful comments that clarify program
requirements.
Each example program configures the 2714 or 2715’s RS-232 interface to use the
VERBOSE mode (see Verbose Mode and Error Handling on page 1–9). As a
result, the 2714 or 2715 sends a response back to the program for each command
it receives. The program terminates normally if the operator enters [ESC] from
the computer keyboard. Otherwise, the program analyzes and displays each
possible VERBOSE mode response and takes one of the following actions:
H
If a command results in the response
OK
, the program displays the response
and waits for the next operator entry (Example 6–1), or the program executes
the
CATV XMOD
command (Example 6–2).
H
If a command or query results in an error, the program retrieves and displays
the 2714 or 2715’s response,
ERR
, followed by the associated event code. It
then awaits the next operator entry.
H
If a query does not result in the response
ERR
, the program displays the
spectrum analyzer’s query response and awaits the next operator entry.
Program Example 6–1 illustrates interactive control of the 2714 or 2715 with the
RS-232 interface. It accepts single commands or queries, and performs the
command function or returns the query response. As an example, Figure 6–1
shows how the terminal display appears after sending the
ID?
query when this
program is running.
Talk/Listen Demo Program
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: ......