Start Code "Stx", End Code "Etx - Panasonic AF7CPS Series User Manual

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) turns OFF. The
"General-purpose communication Sending active flag" (Y8) turns OFF in instruction
execution in the next scan or later following completion of data sending.

6.4.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
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) turns ON. The reception done flag (X0) 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) turns OFF.
6-14
C
D
B
STX
A
A
A
D
B
B
B
B
C
C
C
<2>
<3>
<0>
<1>
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>
<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