FP
Σ
User's Manual
8.6 Program Controlled Communication
193
ST Body
When the variable
bSend
is set to TRUE, the function F10_BKMV copies the characters of
the string
sSendData
to the buffer
awSendBuffer
beginning at
awSendBuffer[1]
.
Then, F159_MTRN sends the data from the first element of the send buffer
(
awSendBuffer[0])
as specified by
s_Start
. The length of the string to be sent (8 bytes) is set
at
n_Number
(using the function LEN to calculate the number of bytes). The data is output
from COM port 1 as specified by
d_Port.
NOTE
•
For details on the operation of the "reception done" flag, the "transmission
done" flag, and the communication error flag, see page 198 .
•
For details on the format of the data in the send buffer and in the receive
buffer, please see "Data Format" on page 197.
•
Data cannot be sent unless the pin CS (Clear to Send) is on. When
connecting to a three-wire port, short-circuit the RS and CS pins.
8.6.3 Receiving
Data
from External Devices
Steps for receiving data from external devices:
1.
Setting the communication parameters and specifying the receive buffer
2.
Receiving the data
3.
Processing the data in the receive buffer
4.
Preparing the system to receive subsequent data
NOTE
Data received via the communication ports of an MCU has to be moved to the
CPU receive buffer using the instruction F161_MRCV.
1. Setting the communication parameters (see "Setting Communication Parameters" on
page 188)
2. Receiving the data
Data is automatically received in the receive buffer defined in the system registers. Reception
can be controlled by the "reception done" flag or by directly evaluating the receive buffer. (For
details on flag operation, see page 198.) When this flag is FALSE and data is sent to the
Summary of Contents for FPS Series
Page 7: ......
Page 17: ......
Page 18: ...Chapter 1 Safety Measures...
Page 21: ......
Page 22: ...Chapter 2 Overview...
Page 32: ...Chapter 3 CPU Types...
Page 47: ...CPU Types FP User s Manual 30 LD Body...
Page 51: ...CPU Types FP User s Manual 34 POU Header and LD Body...
Page 55: ...CPU Types FP User s Manual 38 LD Body...
Page 57: ......
Page 58: ...Chapter 4 Expansion...
Page 73: ......
Page 74: ...Chapter 5 I O Allocation...
Page 81: ......
Page 82: ...Chapter 6 Installation and Wiring...
Page 115: ......
Page 116: ...Chapter 7 High Speed Counter and Pulse Output...
Page 169: ......
Page 170: ...Chapter 8 Communication...
Page 227: ...Communication FP User s Manual 210 LD Body ST Body...
Page 233: ...Communication FP User s Manual 216 POU Header LD Body...
Page 236: ...FP User s Manual 8 6 Program Controlled Communication 219 POU Header LD Body 1 2...
Page 237: ...Communication FP User s Manual 220 2 2 ST Body...
Page 266: ...Chapter 9 Security Functions...
Page 273: ......
Page 274: ...Chapter 10 Other Functions...
Page 277: ......
Page 278: ...Chapter 11 Troubleshooting...
Page 289: ......
Page 290: ...Chapter 12 Appendix...