FP
Σ
9.6 Flag Operations When Using Serial Communication
9 - 35
9.6.2
When “STX” is Set for Start Code and “ETX” is Set for End Code
When receiving data:
Relationship between the various flags “Reception done flag and Transmission done
flag” and the
F159 (MTRN)
instruction
Number of bytes
received is cleared
when
F159 (MTRN)
instruction is
executed.
A
B
C
STX
D
H
ETX
<1>
<2>
<3>
<0>
<0>
<1>
<1>
E
ETX
F
G
STX
Reception done flag is
turned off by execut-
ing the
F159 (MTRN)
instruction.
Reception code is
deleted by
F159
(MTRN)
instruction.
<1>
<2>
<2>
<0>
<1>
Number of bytes
received is
cleared when
start code is
received.
on
off
on
off
External received
data
Reception
done flag
“R9038 or R9048”
F159 (MTRN)
instruction
execution
Reception
buffer
Number of
reception bytes
Stored
*
: Write pointer
Cannot be
stored when
reception done
flag is on
Number of bytes
received is
cleared when
start code is
received.
A
A
A
A
B
B
B
B
C
C
C
C
C
E
E
E
E
E
E
E
C
C
C
C
C
D
D
D
D
G
G
H
H
D
Figure 198: FP
Σ
Flag operation when receiving data (STX and ETX setting)
The data is stored in the reception buffer in sequential order, but at the point at which
the start code is received, the number of bytes received is cleared, and the address
(write pointer) is returned to the initial address in the reception buffer.
Reception is disabled while the reception done flag “R9038 or R9048” is on.
When the
F159 (MTRN)
instruction is executed, the number of bytes received is
cleared, and the address (write pointer) is returned to the initial address in the reception
buffer.
If there are two start codes, data following the later start code is overwritten and stored
in the reception buffer.
The reception done flag “R9038 or R9049” is turned off by the
F159 (MTRN)
instruction.
Because of this, if the
F159 (MTRN)
instruction is executed at the same time that the
terminal code is received, the reception done flag will not be detected.
Summary of Contents for FP Series
Page 15: ...FP Functions and Restrictions of the Unit 1 2...
Page 25: ...FP Specifications and Functions of Control Unit 2 2...
Page 37: ...FP Expansion 3 2...
Page 44: ...Chapter 4 I O Allocation 4 1 I O Allocation 4 3...
Page 45: ...FP I O Allocation 4 2...
Page 51: ...FP Installation and Wiring 5 2...
Page 77: ...FP High speed Counter and Pulse Output Functions 6 2...
Page 133: ...FP High speed Counter and Pulse Output Functions 6 58...
Page 135: ...FP Communication Cassette 7 2...
Page 147: ...FP Communication Function 1 Computer Link 8 2...
Page 169: ...FP Communication Function 2 General purpose Serial Communication 9 2...
Page 205: ...FP Communication Function 2 General purpose Serial Communication 9 38...
Page 207: ...FP Communication Function 3 PLC Link Function 10 2...
Page 232: ...Chapter 11 Other Functions 11 1 Analog Potentiometer 11 3 11 2 Clock Calendar Function 11 4...
Page 233: ...FP Other Functions 11 2...
Page 239: ...FP Self Diagnostic and Troubleshooting 12 2...
Page 249: ...FP Self Diagnostic and Troubleshooting 12 12...
Page 251: ...FP Specifications 13 2...
Page 323: ...Index FP I 4...
Page 325: ...FP Record of changes R 2...