FX Series Programmable Controlers Applied Instructions 5
5-111
5.8.8 PR (FNC 77)
Operation:
Source data (stored as ASCII values) is read byte
by byte from the source data devices. Each byte is
mapped directly to the first 8 consecutive
destination devices D
+0 to D+7). The final two destination bits provide a strobe signal (D+10,
numbered in octal) and an execution/busy flag (D
+11,inoctal).
Points to note:
a) The source byte-data maps the lowest bit to the first destination device D
+0. Consequently
the highest bit of the byte is sent to destination device D
+7.
b) The PR instruction may only be used TWICE in a sequence program. This instruction
should only be used on transistor output PLC’s. The PR instruction will not automatically
repeat its operation unless the drive input has been turned OFF and ON again.
c) The operation of the PR instruction is program scan dependent. Under standard
circumstances it takes 3 program scans to send 1 byte. However, for a faster operation the
PR instruction could be written into a timer interrupt routine similar to the one demonstrated
for HKY on page 5-82.
d)8 byte operation has the following timing diagram. It
should be noted that when the drive input (in the
example X0) is switched OFF the PR instruction will
cease operation. When it is restarted the PR
instruction will start from the beginning of the
message string. Once all 8 bytes have been sent the
execution/busy flag is dropped and the PR instruction
suspends operation.
e) 16 byte operation requires the special auxiliary flag
M8027 to be driven ON (it is recommended that
M8000 is used as a drive input). In this operation
mode the drive input (in the example X0) does not
havetobeactiveallofthetime.OncethePR
instruction is activated it will operate continuously
until all 16 bytes of data have been sent or the value
00H (null) has been sent. Once the operation is
complete the execution/busy flag (D
+11,octal)is
turned OFF and M8029 the execution complete flag
is set.
Mnemonic Function
Operands
Program steps
SD
1
PR
FNC 77
(Print)
Outputs ASCII
data to items
such as display
units
T, C , D
Note: 8 byte mode (M8027=OFF)
uses 4 consecutive devices
16 byte mode (M8027= ON) uses 8
consecutive devices
Y
Note: uses
10
consecutive
devices.
PR:
5steps
FX
1S
FX
1N
FX
2N
FX
2NC
PULSE-P
16 BIT OPERATION
32 BIT OPERATION
Flags
Operation
Complete M8029
X0
D300PR
[ D ]
[ S ]
Y 0
FX -6 !
T0 T0
T0
X0
Y0 - Y7
Y10
Y11
(D+0 - D+7)
(D+10)
(D+11)
Note:To=scan time, see note c.
T0
T0
T0
X0
Y0 - Y7
Y10
Y11
M8029
(D+0 - D+7)
(D+10)
(D+11)
Note:To=scan time, see note c.