5-10
5-7  Connecting Variables and Commands
        to FB Terminals
Connecting to FB terminals
5-7-3 Operation for sending data
Send request is made after send data and its byte length are set.
SDAT
INT#18
OK_F
OK_F
OPEN
S_REQ
S_LEN
OK
O_STS
S_END
S_ERR
S_STS
R_END
R_ERR
R_STS
R_LEN
STN_NO
S_DAT
Send condition
 After confirming that the data has been written, send request is turned ON.
SSET
18 bytes (9 words) for the example 
in "5-6  Writing the Send Data."
Variable SDAT which is written into 
data in "5-6  Writing the Send Data" 
is connected.
Note: When data sending is completed, send end flag “S_END” turns ON only for one scan.  In case of sending error,
send error flag “S_ERR” turns ON only for one scan.
As the content of sending error is stored in send status “S_STS,” judge the occurred error according to the S_STS
data stored when S_ERR has turned ON.
5-7-4 Data receiving operation
When communication ready terminal “OK” is turned ON, non-procedural FB continuously checks whether there is any data
to be received and, when it exists, executes operations for data receiving. When the delimiter between received data
frames is detected, R_END (receive end) turns ON for one scan, and receive data and receive status are stored in R_DAT
and R_STS, respectively.
In case of receiveing error, R_ERR (receive error) also turns ON for one scan.
REND
RERR
RSTS
RDAT
R_END
R_ERR
R_STS
R_LEN
STN_NO
S_DAT
R_DAT
RERRREND
to the processing of received data
Received data is processed 
using the output of R_END 
and R_ERR.