FP
Σ
Communication Function 2 General-purpose Serial Communication
9 - 12
9.2.2
Receiving Data from External Device
Overview of data reception
FP
Σ
Data register (DT)
Device with
RS232C port
Data receiving
Reception done flag: on
Figure 175: FP
Σ
Data reception
Data input from the COM. port is stored in the received buffer specified by the system
register, and the “Reception done” flag goes on.
If the “Reception done” flag is off, data can be received at any time.
Sample program for data reception
Data “10 byte” received in the received buffer through the COM.1 port is read to DT0.
Preparing to receive the next data
To prepare to receive the next data, the
F159
instruction resets the buffer writing point and
turns off the reception done contact “R9038”,
based on the empty data.
Retrieving received data
The received data in the received buffer is read
from the area in which it is stored (from DT201 )
and sent to DT0.
Reception done detection
The internal relay (R10) is turned on at the
reception done contact “R9038” timing.
Starting from DT100
The contents of the four words
from DT201 to DT204
are written to data registers DT0 to DT4.
the contents of 0 bytes
are sent from the COM.1 (K1) port.
R9038
F10 BKMV ,DT201 , DT204
,DT0
F159 MTRN ,DT100
,K0
, K1
R10
DF
R10
R10
Figure 176: FP
Σ
Sample program for data reception
The program described above is executed in the following sequence.
1.
Data is received from the RS232C device to the received buffer.
2.
The reception done contact “R9038 (R9048)” is turned on.
3.
The received data is sent from the received buffer to the area starting
with the data register DT0.
4.
The
F159 (MTRN)
instruction based on the empty data is executed,
which resets the buffer writing point and turns off the reception done
contact “R9038 (R9048)”.
The system is then ready to receive the next data.
Содержание FP Series
Страница 15: ...FP Functions and Restrictions of the Unit 1 2...
Страница 25: ...FP Specifications and Functions of Control Unit 2 2...
Страница 37: ...FP Expansion 3 2...
Страница 44: ...Chapter 4 I O Allocation 4 1 I O Allocation 4 3...
Страница 45: ...FP I O Allocation 4 2...
Страница 51: ...FP Installation and Wiring 5 2...
Страница 77: ...FP High speed Counter and Pulse Output Functions 6 2...
Страница 133: ...FP High speed Counter and Pulse Output Functions 6 58...
Страница 135: ...FP Communication Cassette 7 2...
Страница 147: ...FP Communication Function 1 Computer Link 8 2...
Страница 169: ...FP Communication Function 2 General purpose Serial Communication 9 2...
Страница 205: ...FP Communication Function 2 General purpose Serial Communication 9 38...
Страница 207: ...FP Communication Function 3 PLC Link Function 10 2...
Страница 232: ...Chapter 11 Other Functions 11 1 Analog Potentiometer 11 3 11 2 Clock Calendar Function 11 4...
Страница 233: ...FP Other Functions 11 2...
Страница 238: ...Chapter 12 Self Diagnostic and Troubleshooting 12 1 Self Diagnostic Function 12 3 12 2 Troubleshooting 12 5...
Страница 239: ...FP Self Diagnostic and Troubleshooting 12 2...
Страница 249: ...FP Self Diagnostic and Troubleshooting 12 12...
Страница 251: ...FP Specifications 13 2...
Страница 323: ...Index FP I 4...
Страница 325: ...FP Record of changes R 2...