2635A
Users Manual
4-18
For example, an STB byte of binary 00100000 (decimal 32) indicates an Event Status
Bit. If the SRE register is set to binary 00100000 (using the command *SRE 32), then an
Event Status Bit will cause the Logical OR gate to output a logic high, which
automatically sets bit 6 to high via the MSS input. Therefore, a query of the STB register
(command *STB?) would return decimal 96 (binary 01100000).
Other commands include *SRE?, which returns the decimal equivalent of the SRE byte.
The command *CLS will clear all event registers. (See Appendix E for an 8-bit binary-
coded decimal table.)
Table 4-3. Status Byte Register (STB)
Bit Name Description
0 IEB Instrument Event Bit. When any bit in the Instrument Event Register is set and
the corresponding mask bit(s) in the Instrument Event Enable register is set,
this Instrument Event Bit in the Status Byte will be set.
When read, the Instrument Event Bit is recomputed based on the new value
from the Instrument Event Register and its mask, the Instrument Event Enable
Register.
1,2,3 not used Always set to 0.
4 MAV Message Available (ASCII bytes available for output).
5 ESB Event Status Bit
6 MSS Master Summary Status
7 not used Always set to 0.
Computer Interface Command Set
Table 4-4 is a summary of computer interface commands and queries. A detailed
description of each command or query, with examples, can be found in Table 4-5.
Sample programs that use the command set are shown in Figure 4-4 (GWBASIC),
Figure 4-5 (QBASIC) and Figure 4-6 (Quick C). Program examples are provided on the
Starter application software floppy disk.
Xmodem File Transfers
The FILE_TX and FILE_RX computer commands are used to transfer memory card files
in binary format over the RS-232 interface. The protocol implemented for file transfers
is XMODEM, an 8-bit block-oriented protocol using CRC or checksums for error
checking. When receiving a file, the protocol attempts to do CRCs but will fall back to
checksums if CRCs are not sent. When FILE_TX and FILE_RX are used with terminal
emulators, the emulator must support the XMODEM protocol; for example, the PC
Windows terminal emulator. The PC software must support both 128-byte and 1024-byte
data blocks. Since XMODEM is an 8-bit protocol, no parity must be selected when
configuring the RS-232 ports and XON/XOFF flow control cannot be used.
When a FILE_TX or FILE_RX command is issued, it returns an immediate execution
error prompt (!>) if the file transfer can not be initiated. If this prompt is not returned,
then the XMODEM transfer may begin (refer to the communications software being
used for the procedure to send or receive a binary file). When the file transfer is
complete, the => prompt is returned. If an unrecoverable error occurred, the !> prompt is
returned. As with any XMODEM transfer, the last block received, if it is not an even
multiple of 128 or 1024 bytes, is padded with nulls. See the FILE_RX and FILE_TX
commands in Table 4-5 for more information.