
Chapter 13 Input/Output Control Statements
13-11
WRITE (Statement)
Function
Outputs data from the RS232C or Ethernet port.
Format
WRITE [#<Circuit number>,]<Message>[,<Message>…]
Explanation
This statement outputs the value of <Message> from the RS232C or Ethernet
port to an external device.
For <Circuit number>, designate the circuit number of the RS232C or Ethernet
port to be used. If <Circuit number> is ignored, the default value of ch2 is set.
Ch1 cannot be designated since it is used for the pendant. (Refer to Section
6.1, "Circuit Number.")
If plural messages are written, a comma (,) must be used to separate the
messages.
The following are the points that differ from the PRINT statement.
(1) Character string data is output in double quotation marks (").
(2) At the end of output information, a delimiter (CR or CR+LF) is added.
(3) Commas (,) separating messages are output as they are.
(4) If pose type data is output, each element is separated for output using
a comma (,).
Related Terms
PRINT
Example
DEFINT li1, li2
DEFSTR ls1, ls2
WRITE #1, li1, ls1, ls2 'Outputs the values of li1, ls1, ls2 from ch2.
WRITE li2 'Outputs the value of li2 from ch2.
Kommentare zu diesen Handbüchern