
13-8
13.2 Command for RS232C and Ethernet
(Server/Client) Port
INPUT (Statement)[Conforms to SLIM]
Function
Obtains data from the RS232C or Ethernet port.
Format
INPUT [#<Circuit number>,]<Variable name>[,<Variable name>…]
Explanation
This statement stores data received via the RS232C or Ethernet port into the
variable designated by <Variable name>.
Designate a circuit number to use for <Circuit number>. If <Circuit number> is
ignored the default value of ch2 is set. Ch1 cannot be designated because it is
used for the pendant. (Refer to Section 2.4.1, “ Circuit Number”.)
If plural information is received for the same number of variables add a comma
(,) between each variable.
Designate the baud rate using a system parameter.
Note (1): Execute a FLUSH command to clear the data remaining in
the input buffer of the received data prior to receiving data.
Note (2): If input data exceeds the maximum value of the variable type
to which it has been assigned, the result is the maximum
value of that type.
Related Terms
FLUSH, PRINT, WRITE
Example
DIM li1 As Integer
DEFSTR ls1, ls2, ls3, ls4
INPUT #1, ls1 'Writes data from ch2 to ls1.
INPUT #1, li1, ls2, ls3 'Writes data from ch2 to li1, ls2, and ls3.
INPUT ls4 'Writes data from ch2 to ls4.
Comentarios a estos manuales