Chapter 7
7-107
Programming Examples
Report Generation Examples
Example 7C: Printing with the Parallel Port
This program will select the parallel port and program the analyzer to copy its display to a
printer. There are a number of commands associated with the serial and parallel ports
which allow you to configure output modes such as the baud rate and the handshake type
used by the port and the printer. In this example, the parallel port is configured by the
program. The interface may also be configured from the analyzer's front-panel keys by
pressing
. This menu allows manual
selection of the parallel-interface parameters.
Since the GPIB port is not being used for the copy operation, programming of the analyzer
and measurement operations may continue once the copy operation has been initiated. An
internal spooler in the analyzer's memory provides buffering of the printer operation. In
the example which follows, the status byte of the analyzer is checked to determine when
the print operation is complete.
• An I/O path is assigned to the analyzer.
• The analyzer is initialized.
• A single sweep is taken and the analyzer is placed in hold mode.
• The status registers are cleared.
• The copy-complete bit is set and enabled.
• The printer operation and communication modes are set.
• The print command is sent.
• The analyzer is released from remote control and placed in continuous-sweep mode.
• The analyzer is polled until the status bit representing copy complete is detected.
• The analyzer is released from remote control and the program ends.
Running the Program
Run the program. The analyzer is initialized, set to single-sweep mode, and a sweep is
taken. The program sets the system up to print the analyzer's display to a printer
connected to the parallel port. At this time, the analyzer can continue making
measurements as printer prints the display. When the analyzer display has finished
printing, the controller displays the message:
“DONE”
, the analyzer is released from GPIB
control, and the program ends.
BASIC Program Listing
10 ! This program shows how to set up and print the display through the
20 ! parallel printer port.
30 !
40 ! EXAMP7C
50 !
60 ASSIGN @Nwa TO 716 ! Assign an I/O path for the analyzer
70 !
80 CLEAR SCREEN
90 ! Initialize the analzyer without preset to preserve the data
100 ABORT 7 ! Generate an IFC (Interface Clear)
110 CLEAR @Nwa ! SDC (Selected Device Clear)
Local
SET ADDRESSES PRINTER PORT
Summary of Contents for 8719ES
Page 15: ...1 1 1 Alphabetical Command Reference ...
Page 293: ...2 1 2 Introduction to Instrument Control ...
Page 310: ...3 1 3 GPIB Programming ...
Page 334: ...4 1 4 Reading Analyzer Data ...
Page 343: ...5 1 5 Data Processing Chain ...
Page 350: ...6 1 6 Error Reporting ...
Page 364: ...7 1 7 Programming Examples ...
Page 502: ...A 1 A Preset Conditions ...
Page 517: ...B 1 B Command Listings ...