User`s manual

305
CHAPTER 12 TRANSPARENT CODES AND ADDITIONAL CODES
12
12.4 Example of Data Communication Using the Non Procedure Protocol
12.4.1 Example of data reception
The following shows an example of storing receive data in the data register.
(1) Receiving based on the receive complete code
Additional code: 10H (DLE), transparent code: 02H (STX), complete code: 0D0AH (CR + LF)
When the receive transparent code designation is set to Enable and the ASCII-BIN conversion is set to Disable, the codes
for receivable data and those for receive data that is stored in the buffer memory's reception area are as follows:
Item Receivable codes Codes stored in the reception area
Receive transparent code designation
section
Additional code 01H to FFH (Delete)
Transparent
code
00H to FFH 00H to FFH
Arbitrary data section (including complete code) 00H to FFH 00H to FFH
30H31H 32H 33H 10H 02H 00H 41H 12H0DH0AH42H
0123
D
L
E
BA
(1234H)
L
F
C
R
S
T
X
N
U
L
L
34H
X83
M0
M1
ON
ON
600H
601H
602H
603H
604H
605H
606H
00H , 06H
(1) (0)
31H , 30H
(3) (2)
33H , 32H
(NULL) (STX)
00H , 02H
(B) (A)
42H , 41H
(1234H , 34H)
12H
(LF) (CR)
0AH , 0DH
D10
D11
D12
D13
D14
D15
00H , 06H
(0) (0)
31H , 30H
(3) (2)
33H , 32H
(NULL) (STX)
00H , 02H
(B) (A)
42H, 41H
(1234H , 34H)
12H
(LF) (CR)
0AH , 0DH
D2
INPUT
Completion device
External device
Reception data
read request
Head data
Transparent code
1 scan
Programmable
controller CPU
Programmable
controller CPU
Status display device
at completion
Abnormal
completion
Normal
completion
For word unit:
Received byte count excluding additional code (12)/2=6
For byte unit:
Received byte count excluding additional code (12)
The following diagram is for word unit
Buffer memory Sequence program
device memory
Received data count
is stored
Additional code (Q series C24 deletes)
Sets CH1 to the reception channel
Sets the normal completion flag
Sets the abnormal completion flag
Executes reception
Reception data read request
Sets the allowable number of
receive data to 6