LAMBDA 10-2 OPERATION MANUAL – REV. 2.04 (20120224)
36
4.2.4.2
Input Command Structure
Input Commands may be sent through the printer adapter using an OUT
OUT
OUT
OUT command from
basic, or an equivalent command from another language. In
Microsoft QuickBasic
the form
of the command is:
OUT
OUT
OUT
OUT port, data
Where the decimal value of port would be 956, 888, or 632 depending on your system, and
data would be a number indicating the desired speed and filter number.
The number to use for data can be generated from the desired speed and filter as follows:
data = wheel[0 for A; 128 for B] + (speed * 16) + filter position
Thus, to command a move to Wheel A, Filter Position 1, at Speed 1 (0 + 16 + 1 = 17), using
a printer adapter having a base address of 888, you would use the following command:
OUT 888, 17
4.2.4.3
Output Command Structure: BUSY and ERROR Lines
The section Output Commands has a detailed explanation of the BUSY
BUSY
BUSY
BUSY and ERROR
ERROR
ERROR
ERROR signals.
That section also describes some of the factors to consider in deciding whether to read the
BUSY
BUSY
BUSY
BUSY and ERROR
ERROR
ERROR
ERROR signals. If you wish to read the status of the unit from your PC, this can
be done through the 4-bit input port on the printer adapter. The address of this port will be
the base address of the printer adapter, plus 1.
Table 4-5. PC printer adapter addresses
Address
Address
Address
Address
Base
Base
Base
Base
Input Port
Input Port
Input Port
Input Port
LPT1 on Graphics Adapter
LPT1 on Graphics Adapter
LPT1 on Graphics Adapter
LPT1 on Graphics Adapter
956 (3BC hex)
957 (3BD hex)
LPT1 on Printer Adapter
LPT1 on Printer Adapter
LPT1 on Printer Adapter
LPT1 on Printer Adapter
888 (378 hex)
889 (379 hex)
LPT2 on Printer Adapter
LPT2 on Printer Adapter
LPT2 on Printer Adapter
LPT2 on Printer Adapter
632 (278 hex)
633 (279 hex)
The 4-bit input port only uses the 4 most significant bits at that address: bits 4, 5, 6, and 7.
Bits 0, 1, 2, and 3 are not used by the printer adapter and will normally read as 1. Bit 7 in
this input port is normally used by the printer to signal that it is “busy”. That bit is set by
the data signal from the printer to Pin 11 of the DB-25 parallel port connector on the back of
the computer. The Lambda 10-2 uses this same bit in the computer’s printer adapter to
indicate that it is BUSY, although the polarity of this signal may differ from the
corresponding printer BUSY signal.
With the Lambda 10-2 BUSY line connected to Pin 11 of the computer’s parallel printer port,
the input port can be read to obtain the status of the Lambda10-2. Using Microsoft
QuickBasic, this would be done as follows: