
51
Receiving Data
Section 4-4
4-4
Receiving Data
Data is received using the INPUT# command or the INPUT$ (<numeral
expression>[,#<port expression>])) function.
4-4-1
INPUT# Command
Use the INPUT# command to store data received from the receive buffer in
variables using the CR code as a terminator. This allows reception of CR-
delimited communications responses and input data from the keyboard. The
BASIC indicator on the front panel will flash slowly until the CR code is
entered. If data is not received within a certain time, INPUT# can be quit by
using this command after the WAIT command. See
5-4 Time Processing
.
Example
INPUT #2, A$
Data from communications port #2’s receive buffer up until the CR code termi-
nator is stored in character variable A$.
Example
INPUT #2, A$, B$
Data from communications port #2’s receive buffer delimited by commas is
stored in character variables A$ and B$.
Note
CR or LF is not received as data for the INPUT # command.
4-4-2
Transmission Control Signals
If the RTS signal is ON, received data will be stored in the receive buffer inde-
pendent of the INPUT command. When the INPUT command is executed, the
data in the receive buffer will be stored in each variable, using the CR code as
the terminator.
RTS will turn ON if the INPUT command is executed when the RTS signal is
OFF. If data is received, it will be stored in the receive buffer, and then stored
in each variable using the CR code as the terminator. (CTS and DSR are not
checked.)
If the receive buffer overflows, the allocated I/O area ports (1, 2, and terminal
port) will turn ON error flags and indicators.
Note
1.
Use Xon/Xoff flow control to ensure that the ASCII Unit receive buffer does
not overflow.
2.
Choose one of the following flow controls according to the external devices
to ensure that the receive buffers of the external devices do not overflow.
ASCII Unit
Variable
CR
terminator
Receive
buffer
General-purpose
external device
INPUT#2
BASIC program
Summary of Contents for C200H-ASC11
Page 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Page 2: ...iv...
Page 4: ...vi...