beautypg.com

Appendix d - terminal emulation program – KEPCO BIT 232F User Manual

Page 59

background image

BIT 232 2/28/00

D-1

APPENDIX D - TERMINAL EMULATION PROGRAM

D.1

INTRODUCTION

Appendix D is a C language program used with an IBM-PC-compatible computer as a terminal
emulator, allowing the BOP to be controlled directly from a keyboard. Refer to Appendix F for all
functions. (See PAR. 1.4 to order Sample Programs diskette.)

To modify this program for computers other than IBM-PC-compatible (e.g., Macintosh), four
ROM BIOS routines must be replaced with their equivalent (see Table D-1).

The Terminal Emulation program is a loop in which typed characters from the computer key-
board are sent to the BIT Card using the SendWecho function (see Appendix F). This allows the
BOP to be exercised by typing the appropriate commands (SCPI or CIIL) directly from the key-
board. Responses to the typed commands are received from the BIT Card and displayed on the
computer monitor. Typing ALT+Q ends the program.

The Terminal Emulation program can be set to run on either COM 1 or COM 2. For convenience
it is recommended that two separate programs be created, one for COM 1, one for COM 2.

If this program is started before power is applied to the BOP, the sign on message will be dis-
played on the computer monitor when the BOP is powered up:

KEPCO BOP BIT232 REV. 1.0
POWER SUPPLY Type = XX (BOP YY-Y)

where

XX =

hex value representing setting of Power Supply Identifications switch
S2 (see PAR. 2.2.2)

YY-Y = BOP Model No. (e.g., 20-5)

NOTE: If switch S2 is set to an illegal setting, the message will read:

UNDEFINED BOP TYPE

TABLE D-1. ROM BIOS ROUTINES TO BE REPLACED WITH EQUIVALENT

FOR NON-IBM-PC-COMPATIBLE PC’S

ROM BIOS ROUTINE

FUNCTION

open_port(n) n=0 for COM1 or n=1 for COM 2

Initialize the serial port.

put_serc(n,c)

Write the character c to COM 1 or COM 2 serial port.

get_serc(n)

Read a character from the serial port.

in_ready(n)

Fetch the current status of the serial port.

This manual is related to the following products: