461
COMRD, COMRDP
1
2
3
4
4
6
7
8
7.11 Character string processing instructions
7.11.7 COMRD, COMRDP
(2) The following program converts the decimal ASCII data set at D20 to D23 into 8-digit BCD data, stores the result at D10
and D11, and also outputs it to from Y40 to Y5F.
[Ladder Mode]
[List Mode]
[Operation]
: Head number of the devices where a comment to be read is stored (Device name)
: Head number of the devices where the read comment will be stored (character string)
Function
(1) Reads the comment at the device number designated by , and stores it as ASCII code in the area starting from the
device number designated by .
7.11.7 COMRD, COMRDP Reading device comment data
7.11.7
COMRD, COMRDP
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn Constants
Other
BL\S,
BL\TR, BL,
P, I, J, U
Bit Word Bit Word
––
–– –– –– ––
Outputs the converted
BCD value to a display device.
Step Instruction Device
D21
D22
D23
20
H
(space)34
H
(4)
39
H
(9)37
H
(7)
b15 b8 b7 b0
32
H
(2)39
H
(9)
D20
34
H
(4)39
H
(9)
BCD value
0
4 97294 9
Regarded
as 04972949
BCD value
0
4 97294 9
D11 D10
Y5FY
50
Y4F
Y4
0
DMOV
4972949
Process
High
performance
Redundant
Universal
LCPU
Basic
Command
Command
COMRD
COMRDP
S
D
COMRD
COMRDP
S
D
S
D
S
D
S
D
+1
ASCII code for the 1st character
ASCII code for the 2nd character
ASCII code for the 3rd character
ASCII code for the 4th character
b15 b8b7 b0
+2
Stores up to 32
characters
ASCII code for the 5th character
ASCII code for the 6th character
ASCII code for the 7th character
ASCII code for the 8th character
ASCII code for the 29th character
ASCII code for the 30th character
ASCII code for the 31st character
ASCII code for the 32nd character
00
H
Comment at device number designated by
+3
S
D
D
D
D
+15
D