![Okuma OSP-P200L Скачать руководство пользователя страница 305](http://html1.mh-extra.com/html/okuma/osp-p200l/osp-p200l_programming-manual_3667818305.webp)
5238-E P-292
SECTION 12 USER TASK
4-1-5. READ/WRITE Statement
READ and WRITE statements are used for communications with external devices through the
RS232C interface.
They are used in conjunction with the GET/PUT statement described in (6) below.
[Program format]
LE33013R0301400370001
[Function]
[Details]
•
Transmission protocol
The baud rate and code configuration for the channel of the RS232C interface to be used for
communication with an RS232C device must be set in advance.
These communication parameters are set on the NC optional parameter (RS232C) screen by
selecting PARAMETER SET mode.
•
Transmission code
For transmission codes, JlS 8 bit code or JIS 7 bit code (in this case, using an even parity bit)
are used.
The end of data transmission code is either NULL or %. Which of these codes is used is
determined by the setting at stop bit check of optional parameter (RS232C).
(% is selected by "1" and NULL is selected by "0".)
READ
: Receives the data from the external device connected to the channel designated by
<n> and stores it in the read area (max. of 160 characters) in JIS8 code.
WRITE : Sends the data stored in the write area (max. of 160 characters) in JlS8 code to the
external device connected to the RS232C.
N0
READ
n
N0
WRITE
n
Sequence name of this block (can be omitted)
Designates a READ statement
Sequence name of this block (can be omitted)
Designates a WRITE statement
Channel designation for RS232C interface
Channel designation for RS232C interface
(Same as for READ)
n =0
⋅⋅⋅⋅⋅⋅⋅
CN0 :
=1
⋅⋅⋅⋅⋅⋅⋅
CN1 :
=2
⋅⋅⋅⋅⋅⋅⋅
CN2 :
=3
⋅⋅⋅⋅⋅⋅⋅
CN3 :
or TT :
(Default: n = 0)