FP2 Serial Data Unit
Communication with External Devices
4 − 8
4.2 Programming When Data is Sent
Operation steps when data is sent
Operation is carried out in the following steps when data is sent from the serial data unit.
1. The data to be sent is created.
Using the F95 (ASC) instruction of the ladder program, the data to be sent is converted
to ASCII data. Then end codes are added, and the data is stored in a data register.
FP2 CPU unit
FP2 serial data unit
RS232C device
Data register
DT0
R10
, K0 , DT0 , K7 , K1
F151 WRT
R10
M ABC123DEF456 , DT0
F95 ASC ,
, H 000D , DT7F0 MV
2. The data to be sent is written to the shared memory.
Using the F151 (WRT) instruction of the ladder program, the data to be sent is written
to the sent buffer of the shared memory in the serial data unit installed in slot 0.
FP2
CPU unit
FP2 serial data unit
Shared memory
Sent buffer
Data writing using F151 (WRT) instruction
RS232C device
Data register
DT0
3. The data is sent.
The Y10 (Sending directive) contact is turned on by the ladder program, and the data
stored earlier in the shared memory is output from the RS232C port.
FP2
CPU unit
FP2 serial data unit
Shared memory
Sent buffer
RS232C device
Data register
DT0
Data sending
Sending directive (Y10: on)