Mitsubishi Electric MELSEC-KOJIU Instruction Manual page 87

Table of Contents

Advertisement

IEl L 8EEnK
5 . EXPLANATION OF PROGRAM
5.4.13.2 Circuit applications
(1) Checking of number of bits "1" (ON) in shift register
This application example is used when number of goods in a conveyor line must be numeri-
cally displayed, for example.
Ex.:
Shift register
M50
-
M81
32 bits
Display unit
Y80
-
Y87
Decimal 2 digits
A
B
Check command
PLS
49
109
Fig. 5.4.13.2 Display of Number of Bits "1" in Shift Register
Command is converted into pulse signal.
Lower 16 bits (M50
-
65) of shift register
are transferred to D110.
Execution of bit check
Result is saved in D16.
Upper 16 bits (M66
hr
81
)
of shift register
are transferred to D110.
Resultant upper bits are added to resultant
lower bits (total bits).
Total bits are converted from binary nota-
tion into BCD.
Total bits are output to display unit (2
digits).
In the example shown in Fig. 5.4.13.2, number of stocked goods is numerically displayed.
However, this circuit may be used for other control, such as quantitative comprison or
definition of quantitative range of stored goods, by using instructions
(>,
<,
=).
In this example, number of bits being in "1" in output Y (4 bits) is checked. This applica-
tion example may be actually employed for error detection.
(2) Checking of number of bits "1" (ON) of output Y
Ex.:
Output
Y20
-
2B
12 bits
Error exists when number of bits "1
' i
is larger than 9 bits.
Command is converted into pulse signal.
3 digits from Y20 are specified.
12-bit data (3 digits) from Y20 i s stored
in 028.
MOV
I
K1028
I
Dl11
Data is transferred from Y to D.
Data is entered in D110.
I
I
1
-
,
A
b
reset
I
Fig. 5.4.1 3.3 Checking of Number of Bits "1 of Output Y
Execution of bit check
When number of bits "1
"
is larger than 9
bits, M94 turns.
79

Advertisement

Table of Contents
loading

Table of Contents