Start Code "Stx", End Code "Etx - Panasonic AFP7CPS4E User Manual

Fp7 series, programmable controller
Table of Contents

Advertisement

General-Purpose Communication
 After GPSEND instruction is executed, dual sending to the same port is not possible until the
"sending General-purpose communication Sending active flag" (Y8, Y9, YA, YB) turns OFF.
The "General-purpose communication Sending active flag" (Y8, Y9, YA, YB) turns OFF in
instruction execution in the next scan or later following completion of data sending.

9.5.2 Start Code "STX", End Code "ETX":

Receiving process: Reception done flag and GPRECV instruction are related as
follows:
Data received
from external
A
device
Stored
SCU
A
receive bu ffer
No. of bytes
<1>
received
Reception
done flag
X0, X1, X2, X3
GPSEND
instruction
execution
Receive bu ffer
specified using
GPRECV instruction
When the start code is set to "STX", the data are saved in the reception buffer. When the
start code is received, the receive pointer is initialized. If there are two headers, data
following the second header overwrites the data in the reception buffer.
 The COM port has eight reception buffers. The reception process is continued after the
reception done flag (X0, X1, X2, X3) turns ON. The reception done flag (X0, X1, X2, X3)
does not turn OFF immediately following the execution of GPRECV instruction. It will be
turned off at the beginning of the next scan or later.
If there are no received data following execution of GPRECV instruction, the reception done
copy flag (X4, X5, X6, X7) turns OFF.
KEY POINTS
The data without the Code STX at the reception is saved in the reception
buffer, and the "reception done" flag turns on when the end code is received.
9-16
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
C
D
B
STX
A
A
A
D
B
B
B
B
C
C
C
<2>
<3>
<0>
<1>
<2>
Upon reception of the
start code, the reception
pointer is initialized.
E
ETX
F
D
D
F
E
E
Even in a
C
C
"reception done"
status, received
data is continued
into another
buffer, because
there are 4,096 x
8 reception
<2>
<1>
buffers.
No. of bytes received
2
D
E
G
STX
H
ETX
F
F
H
H
G
G
G
G
<2>
<0>
<1>
<1>
Upon reception of the
start code, the reception
pointer is initialized.
ON
OFF
ON
OFF

Advertisement

Table of Contents
loading

Table of Contents