434
PRC
Program Example
(1) The following program converts the string "ABCDEFGHIJKLMNOP" to ASCII code when X0 is turned ON and stores it
from D0 to D7, and then outputs the ASCII code at D0 to D7 to Y14 to Y1D when X3 is turned ON.
[Ladder Mode]
[List Mode]
[Timing Chart]
: Head number of the device which prints the comment (Device name)
: Head number of the output module which outputs the comment (bits)
PRC
Print comment
7.9.2
PRC
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
Other
P, I, J, U
Bit
Word
Bit
Word
––
––
(Only Y)
––
––
––
––
––
When X0 turns ON, converts “ABCDEFGHIJKLMOP”
to the ASCII code and stores it to D to D7.
When X3 turns ON, outputs the ASCII
code in D0 to D7 to Y14 to Y1D.
Step
Instruction
Device
Y14
Y1B
PR instruction in
execution flag Y1D
Strobe signal Y1C
ASCII code
10
ms
10
ms
PR instruction
10 ms
41
H
42
H
50
H
A
B
P
10 ms
OFF
ON
OFF
PR instruction in execution 480 ms
$MOV "ABCDEFGH" D0
$MOV "IJKLMNOP" D4
X0
X3
OFF
ON
Stores the ASCII
code for "A" to "H"
to D0 to D3.
Stores the ASCII code for
"I" to "P" to D4 to D7.
Bas
i
c
Redundant
U
n
iv
ersa
l
L
CP
U
Process
High
performance
Command
S
D
PRC
PRC
S
D
S
D