User`s manual
273
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES
11
11.3 Receive Program
11.3 Receive Program
This section shows examples of the sequence program to read the reception data stored in the Q series C24 buffer
memory to the programmable controller CPU, when data including the user frame is received.
11.3.1 Sequence program example
In the program examples provided in this section, data reception by the user frame is indicated based on the following:
• I/O signals of Q series C24: Install Q series C24 in the position where the I/O signal with QCPU is X/Y00 to
X/Y1F.
• Interface for Q series C24 used for data communications with external device: Use an RS-232 interface on
the CH1 side of Q series C24.
• Intelligent function module switch settings
• Buffer memory settings for the examples (For other than below, default values are used.)
• Example in Page 275, Section 11.3.1 (1) shows the GX Configurator-SC setting. For settings, refer to
Page 267, Section 11.2.4.
• Example in Page 276, Section 11.3.1 (2) shows the setting by a sequence program.
Switch No.
Bit
Description Setting value
Position
Specified
value
Switch 1
b0 OFF
Transmissio
n setting
Operation setting Independent
0702H
(Matched with
the external
device)
b1 ON Data bit 8 bits
b2 OFF Parity bit None
b3 OFF Even/odd parity Odd
b4 OFF Stop bit 1 bit
b5 OFF Sum check code None
b6 OFF Write during RUN Prohibited
b7 OFF Setting modifications Prohibited
b8 to b15 Communication rate setting 19200bps
Switch 2 Communication protocol setting Nonprocedural protocol 0006H
Switch 5 Station number setting No. 0 station 0000H
Address Dec. (Hex.)
Name Setting value
CH1
173 (ADH) User frame use enable/disable designation 1H: Enable
174 (AEH)
First frame No. designation, 1st
*1
Example (1): 3E8H
Example (2): 8001H
175 (AFH)
First frame No. designation, 2nd
*1
Example (1): 3E9H
Example (2): 8002H
176 (B0H)
First frame No. designation, 3rd
*1
6H
177 (B1H)
First frame No. designation, 4th
*1
15H
178 (B2H)
Last frame No. designation, 1st
*1
Example (1): 41BH
Example (2): 8005H
179 (B3H) Last frame No. designation, 2nd 0H: None
180 (B4H) Last frame No. designation, 3rd 0H: None
181 (B5H) Last frame No. designation, 4th 0H: None
8224 (2020H) User frame receive format designation, 1st 0H: Format 0
8225 (2021H) User frame receive format designation, 2nd 1H: Format 1
8226 (2022H) User frame receive format designation, 3rd 1H: Format 1