FX Series Programmable Controlers Applied Instructions 5
5-89
5.8.8 PR (FNC 77)
Operation:
Source data (stored as ASCII values) is read b
te
b
b
te from the source data devices. Each b
te is
mapped directl
to the first 8 consecutive
destination devices D
+0
to D
+7
). The final two destination bits provide a strobe si
nal (D
+10
,
numbered in octal) and an execution/bus
fla
(D
+11
, in octal).
Points to note:
a) The source b
te-data maps the lowest bit to the first destination device D
+0.
Consequentl
the hi
hest bit of the b
te is sent to destination device D
+7.
b) The PR instruction ma
be used
ONCE
on FX units fitted with CPU versions earlier than
3.07. FX units with CPU ver3.07 or later and all FX
2C
units can operate
TWO
PR
instructions. This instruction should onl
be used on transistor output PLC’s. The PR
instruction will not automaticall
repeat its operation unless the drive input has been turned
OFF and ON a
ain.
c) The operation of the PR instruction is pro
ram scan dependent. Under standard
circumstances it takes 3 pro
ram scans to send 1 b
te. However, for a faster operation the
PR instruction could be written into a timer interrupt routine similar to the one demonstrated
for HKY on pa
e 5-82.
d)8 b
te operation has the followin
timin
dia
ram. 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 be
innin
of the messa
e strin
.
Once all 8 b
tes have been sent the execution/bus
fla
is dropped and the PR instruction suspends operation.
e) 16 b
te operation requires the special auxiliar
fla
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
have to be active all of the time. Once the PR
instruction is activated it will operate continuousl
until all 16 b
tes of data have been sent or the value
00H (null) has been sent. Once the operation is
complete the execution/bus
fla
(D
+11
, octal) is
turned OFF and M8029 the execution complete fla
is set.
Mnemonic Function
Operands
Program steps
S
D
1
PR
FNC 77
(Print)
Outputs ASCII
data to items
such as displa
units
T, C, D
Note: 8 b
te mode
M8027=OFF
uses 4 consecutive devices
16 b
te mode
M8027= ON
uses 8
consecutive devices
Y
Note: uses
10
consecutive
devices.
PR:
5 steps
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.