G-33
FX Series PLC User's Manual - Data Communication Edition
Non-Protocol Communication (FX2N-232IF)
6 Practical Program Examples
6.1 Example of Sending/Receiving 16-Bit Buffer Length Data
A
Common Items
B
N:N Network
C
Parallel Link
D
Computer Link
E
Inverter
Communication
F
Non-Protocol
Communication
(RS/RS2 Instruction)
G
Non-Protocol
Communication
(FX
2N
-232IF)
H
Programming
Communication
I
Remote
Maintenance
Apx.
Discontinued
models
6. Practical Program Examples
6.1 Example of Sending/Receiving 16-Bit Buffer Length Data
In this example, the 16-bit buffer length data is sent and received between the 232IF and equipment with the
terminal specifications. In this example, ASCII codes stored in the data registers D201 to D205 in the PLC are
sent to the external equipment, and the data received from the external equipment is stored to data registers
D301 to D304 in the PLC.
1. System configuration
2. Example of setting buffer memory
Suppose that each buffer memory not described here is set to the initial value.
1) Communication format <BFM #0>
2) Command <BFM #1>
M0
→ b0: Sending/receiving enable (ER ON)
M1
→ b1: Sending command
M2
→ b2: Receiving complete flag reset command
M3
→ b3: Error reset
3) Maximum number of receivable bytes <BFM #2>
8 bytes
Bit Contents Setting
b0 Data length (1) : 8-bit
b1
b2
Parity (1,1) : Even
b3 Stop bit (1) : 2-bit
b4
b5
b6
b7
Baud rate (1001) : 19200 bps
b8
b9
Control line (00) : Not provided
b10
b11
CR and LF addition (00) : Not provided
b12
b13
Absence/presence of check
sum and ASCII-Hexadecimal
conversion
(00) : Not provided
b14
Send/receive data buffer data
length
(0) : 16-bit
←
Item to specify 16-bit data
b15 Undefined —
FX
2N
-232IF
Cross cable
Personal computer, etc.
FX
3U
Series
+
POWER
SD
RD
b15
0
0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1
b0
0
9 F
(009F
H
)
b8 b7