Mitsubishi Electronics FX2C Home Theater Server User Manual


 
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
y
te
b
y
b
y
te from the source data devices. Each b
y
te is
mapped directl
y
to the first 8 consecutive
destination devices D
+0
to D
+7
). The final two destination bits provide a strobe si
g
nal (D
+10
,
numbered in octal) and an execution/bus
y
fla
g
(D
+11
, in octal).
Points to note:
a) The source b
y
te-data maps the lowest bit to the first destination device D
+0.
Consequentl
y
the hi
g
hest bit of the b
y
te is sent to destination device D
+7.
b) The PR instruction ma
y
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
y
be used on transistor output PLC’s. The PR
instruction will not automaticall
y
repeat its operation unless the drive input has been turned
OFF and ON a
g
ain.
c) The operation of the PR instruction is pro
g
ram scan dependent. Under standard
circumstances it takes 3 pro
g
ram scans to send 1 b
y
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
g
e 5-82.
d)8 b
y
te operation has the followin
g
timin
g
dia
g
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
g
innin
g
of the messa
g
e strin
g
.
Once all 8 b
y
tes have been sent the execution/bus
y
fla
g
is dropped and the PR instruction suspends operation.
e) 16 b
y
te operation requires the special auxiliar
y
fla
g
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
y
until all 16 b
y
tes of data have been sent or the value
00H (null) has been sent. Once the operation is
complete the execution/bus
y
fla
g
(D
+11
, octal) is
turned OFF and M8029 the execution complete fla
g
is set.
Mnemonic Function
Operands
Program steps
S
D
1
PR
FNC 77
(Print)
Outputs ASCII
data to items
such as displa
y
units
T, C, D
Note: 8 b
y
te mode
(
M8027=OFF
)
uses 4 consecutive devices
16 b
y
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.