Справочник Пользователя для Mitsubishi Electronics FX2NC

Скачать
Страница из 382
FX Series Programmable Controlers
Applied Instructions 5
5-85
5.8.5
SEGL (FNC 74)
Operation:
This instruction takes a source decimal value (S)
and writes it to a set of 4 multiplexed, outputs (D).
Because the logic  us ed with latc hed seven
segment displays varies between display manufactures, this instruction can be modified to suit
most logic requirements. Configurations are selected depending on the value of n, see the
following page.
Points to note:
a) Data is written to a set of multiplexed outputs (D
+0 
to D
+7
, 8 outputs) and hence seven
segment displays. A set of displays consists of 4 single digit seven segment units. A
maximum of two sets of displays can be driven with this instruction. When two sets are used
the displays share the same strobe outputs (D
+4 
to D
+7 
are the strobe outputs). An
additional set of 4 output devices is required to supply the new data for the second set of
displays (D
+10 
to D
+13
, this is an octal addition). The strobe outputs cause the written data to
be latched at the seven segment display.
b) Source data within the range of 0 to 9,999 (decimal) is written to the multiplexed outputs.
When one set of displays are used this data is taken from the device specified as operand
S. When two sets of displays are active the source device S
+1 
supplies the data for the
second set of displays. This data must again be within the range 0 to 9,999. When using
two sets of displays the data is treated as two separate numbers and is not combined to
provide a single output of 0 to 99,999,999.
c) The SEGL instruction takes 12 program scans to complete one output cycle regardless of
the number of display sets used. On completion, the execution complete flag M8029 is set.
Mnemonic
Function 
Operands
Program steps
S
D
n
SEGL
FNC 74
(
Seven
segment
with latch)
Writes data to
multiplexed single
digit displays - 4
digits per set,
max. 2 sets
K, H
KnX, KnY, 
KnM, KnS
T, C, D, V, Z
Y
Note:
n = 0 to 3, 8
outputs are
used
n = 4 to 7, 12
outputs are
used
K, H,
Note:
n= 0 to 3, 1 set
of 7 Seg active
n= 4 to 7, 2 sets
of 7 Seg active
SEGL:
7 steps
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION
FLAGS
Operation
Complete M8029
X0
D 0
Y 0
K 4
SEGL
[ D ]
[ S ]
[ n ]
10
10
10
10
3
0
1
2
Y2
Y3
+V0
Y0
Y1
Y6
Y7
+V1
Y4
Y5
Y12 Y13
+V2
Y10 Y11
1
2
4
8
10
10
10
10
3
0
1
2
V+
V+
1
2
4
8
1
2
4
8
1
2
4
8
Transistor Output (Source)
BCD 
data 
signals
Display set 2
Display set 1
In this example it has
been assumed that the
seven segment displays
accept data HIGH inputs
and latch when a HIGH
signal is received 
Note: A single set of strobe signals are always used 
regardless of the number of display sets.