• Keine Ergebnisse gefunden

I!JS~NG THlE THRElE-PORT

PlER~IPHlERAl ~NTlERfAClE

Option 10, the Three-Port Peripheral Interface, provides RS232 communications support. The specific TEKTRONIX products supported by the 3PPI (Three-Port Peripheral Interface) are:

o The 4662 Interactive Digital Plotter o The 4663 Interactive Digital Plotter o The 4643 Matrix Printer

o The 4923 Option 01 Digital Cartridge Tape Drive The Option 10 rear panel connector (Figure 3-6) contains three RS232 connectors, labeled PORT 0, PORT 1, and PORT 2.

The 3PPI uses device drivers to support specific devices attached to one of the peripheral ports. A device driver is a program that interfaces the terminal with a specific device attached to the port. For example, some devices may require certain characters as part of their communications protocol; a device driver would make sure that these char-acters are present when required.

The 3PPI supports any RS232 device using its PPORT driver, which simply passes data through the port without any formatting. To set up Port 0 with the general PPORT driver, give the following command:

PASSIGN po: PPORT

You can format output to the 3PPI for specific Tektronix devices with the setup command PASSIGN. For example, you can connect a 4663 plotter to Port 0, and configure the port with the following command:

PASSIGN po: 4663/T

This command assigns the 4663 device driver to Port 0; it also instructs the driver to translate terminal commands into 4663 commands in data sent to the plotter. See the PASSIGN command description in Section 6 for details.

You can also use various setup commands to assign com-munications parameters to a peripheral port, much as you assign these parameters to the host port. Just as with the host, these parameters must be set to the values required by the device attached to the port, or communications will be garbled. The various port configuration commands are summarized under the following heading.

41158 OPERATORS REV, JAN 1984

3-15

FILE TRANSFERS AND PERIPHERALS

/'-'

Figure 3-6. Three-Port Peripheral Interface Panel.

3-16 REV, JAN 1984 41158 OPERATORS

COMMAND SUMMARY

Table 3-3 summarizes the commands used with the 3PPI.

Each of these commands is discussed in detail in Section 6 of this manual. However, refer to the 4110 Series Host Pro-grammers Manual for the basic concepts of port communi-cations.

Table 3-3

THREE-PORT PERIPHERAlll'.lTERU=AC;::

COMMAND SW\.IiMARV Command Description

PASSIGN Assigns a device driver to a specified port.

PBAUD Sets the baud rate for a specified port.

PBITS Sets the number of stop bits and data bits for a specified port.

PCOPY Establishes a two-way communication path between two devices.

PEOF Sets the end-ot-file string for the specified port.

PEal Sets the end-at-line string for the specified port.

(Used only with the 4643 device driver.) PFlAG Sets the flagging method used by the specified

port.

PLOT Sends information to a plotter.

PPARITY Sets the parity used by a specified port.

STATUS3PPI Displays a status report for all peripheral ports.

CONNECTiNG THE PLOTTER TO THE TERMiNAL

When using a TEKTRONIX 4662 or 4663 Interactive Digital Plotter, connect the plotter's "modem" connector to one of the terminal's three RS-232 peripheral ports.

NOTE

Do not connect the plotter between the terminal's host port and the host compute!; Although Ihe plotter is designed 10 run in this conjiguration, the terminal design assumes that the plotter is con-nected to one of the RS-232 peripheral ports.

ii'lllT!AUZING THE PORT

To use a TEKTRONIX 4662 or 4663 Interactive Digital Piot-ter with the Piot-terminal's RS-232 peripheral port, you must set the plotter's switches and the peripheral port settings in a compatible way. For instance, if the plotter is set to operate at 1200 baud, then the peripheral port to which it is attached must also be set for 1200 baud. The terminal's plotter driv-ers always use device address A.

4662 Plotter. Table 3-4 shows one way the switches on the TEKTRONIX 4662 Digital Plotter can be set for communi-cating with the terminal through the terminal's Option 10 Three Port Peripheral Interface.

Table 3-4

4662 PLOTTER SETTINGS

Switch Setting

A 3

B 3

C 2

D 3

4115B OPERATORS REV, JAN 1984 3-17

FILE TRANSFERS AND PERIPHERALS

These switch positions set the 4662 as follows:

Copy mode.

CR implies CR-LF.

GIN terminator CR.

Number of stop bits 1.

No Parity.

Plotter device address A.

Baud rate

=

1200.

With the 4662's switches set as in Table 3-4, the following SETUP mode commands will then initialize peripheral port zero for communicating with the plotter. The terminal remembers these settings even when turned off; thus the commands need only be issued once, when attaching the plotter to the terminal.

PBAUD po: 1200

Sets port zero to communicate with the 4662 at 1200 bits per second.

PASSIGN PO: 4662

Assigns the standard "4662" device protocol to peripheral port zero. (If the 4662 is equipped with multiple pens - Option 31 - then the second parameter in this command should be

"4662/MP" rather than "4662.) PPARITY PO: NONE

PBITSPO: 18

Sets peripheral port zero to send ASCII characters ~hich have eight data bits, no parity bit, and one stop bit.

PFLAG PO: NONE

Disables DTR/CTS and character flagging at the peripheral port. (Instead, the plotter's block mode is used to prevent data overrun.)

4663 Plotter. Table 3-5 shows one way to set the 4663 pIot-ter's parameter entry switches for use with the terminal.

Suppose the plotter switches have been set as shown in Table 3-5. In that case, the following SETUP mode com-mands initialize peripheral port zero in the terminal for proper communication with the plotter:

PBAUD po: 9600

Sets peripheral port zero to communicate with the plotter at 9600 bits per second.

PASSIGN PO: 4663

Assigns the "4663" device protocol to peripheral port zero.

PPARITY PO: NONE PBITSPO: 18

Sets peripheral port zero to send ASCII characters which have eight data bits, no parity bit, and one stop bit.

PFLAG PO: NONE

Disables DTR/CTS and character flagging. (Instead of flag-ging, the plotter's block mode protocol is used to prevent data overrun.)

Initial command response format Serial device address

Receive baud rate Transmit baud rate Transmit baud rate limit Character format

Y vertical, X horizontal 1 (RS-232 interface)

3-18 REV, JAN 1984 41158 OPERATORS

(

EXAMPLES OF USE

The following show several command sequences that will transfer data to a plotter.

DIRECTORY to a PloUell'

To send a directory to the plotter, the following conditions must be met:

o The plotter must be set for "CR implies LF", since each line in the directory report ends with cR , NOTwith CRL F.

o Other plotter parameters required are:

Attention character EC

Address character A

o The port device driver should have an "NT" parameter assigned by a PASSIGN 4662/NT or PASSIGN 4663/NT command.

o You (the operator) must pOSition the plotter pen (with the plotter's joystick) to the upper left corner of the plotter's viewport.

Once these conditions are met, simply give a DIRECTORY command to the port to which the plotter is connected. For example, if the plotter is connected to Port 0, the following command outputs a directory for the disk in drive 0:

DIRECTORY FO: TO PO:

Remember that device names must include the colon; Port

o

is device PO:, not simply PO.

The PLOT Command

You can draw all visible graphic segments in the current view on an attached plotter by using the PLOT command. For example, if a plotter is attached to peripheral Port 0, just give the command:

PLOT TO po:

This command also assumes that the port has been cor-rectly configured to receive output for the attached plotter (see the PASSIGN command).

Note, however, that this command will tie up all other termi-nal operations until the PLOT is complete. A more efficient method is to use the SPOOL command discussed later.

SAVEing

to a

PloUer

The SAVE command, although normally used for file crea-tion, will format data in a single graphic segment to allow it to be drawn correctly on to a plotter. Just give the SAVE command with a segment number. For example, if a plotter is attached to peripheral Port 1, you can plot segment 3 by giving the following command:

SAVE SEG 3 TO P1:

However, this will tie up terminal operations until all of seg-ment 3 has been plotted. A more efficient way is to use the SPOOL command discussed next.

You can also save various classes of segments with SAVE;

see the command description in Section 6.

SPOOling to a PloUer

As mentioned earlier, although you can PLOT or SAVE information directly to a plotter, it is generally more efficient first to save that information in a disk file, then spool from the disk file to the plotter, since spooling frees the terminal for other functions. For example, suppose a plotter is attached to Port O. To plot all visible segments, replace:

PLOT TO PO:

with the two commands:

PLOT TO FO:TEMPFILE SPOOL FO:TEMPFILE TO PO:

To plot a particular segment, replace:

SAVE SEG 3 TO PO:

with the two commands:

SAVE SEG 3 TO FO:TEMPFILE SPOOL FO:TEMPFILE TO PO:

A spooling operation in progress can be halted with the STOP command.

4115B OPERATORS REV, JAN 1984 3-19

FILE TRANSFERS AND PERIPHERALS