352
17 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION)
17.4 Data Communication Using Nonprocedural Protocol
Operation example of reception by the receive end code
When C24 receives data from the target device when ASCII-BIN conversion is enabled (Reception by the receive end code)
End code: 9H (code after ASCII-BIN conversion)
When ASCII-BIN conversion is enabled, the codes for the receivable data and the codes for the received data which is stored
in the receive area on the buffer memory are as shown below.
If data codes other than 30H to 39H and 41H to 46H are received for an arbitrary data portion, an error (7F20H) occurs after
ASCII-BIN conversion processing by C24.
To perform ASCII-BIN conversion, ensure the end code is the code after conversion.
Type Receivable codes Codes stored in the receive
area
Arbitrary data portion (including end code) 30H to 39H, 41H to 46H 0H to 9H, AH to FH
30H 31H 32H 33H 34H 35H 41H 43H 44H 45H39H42H
0123 BA45 DC9E
X3
M0
M1
ON
ON
00H , 03H
23H , 01H
ABH , 45H
E9H , CDH
D10
D11
D12
00H , 03H
23H , 01H
ABH , 45H
E9H , CDH
D2
INPUT
*
Data
corresponding
to complete code
Head data
For word units
Number of bytes after
ASCII-BIN conversion:
((6)/2=3)
For byte units
Number of bytes after
ASCII-BIN conversion:
(6)
Two bytes of received data is read to
C24 as one-byte data.
Transmit data from the target device so
that the converted complete code data
is arranged in an even-number-byte of data.
Target device
Set to even byte
C24
Reception data
read request
Store receive
data count
CPU module
The following diagram is for word unit
Completion device
Abnormal completion
Status display device
at completion
Normal completion
Un\G1536
1 scan
Un\G1537
Un\G1538
Un\G1539
Buffer memory Program
device memory