Mitsubishi Electronics C6 Home Safety Product User Manual


 
8. Function Commands
SUM, SUMP
- 278 -
{ SUM, SUMP ... Count of No. of 16-bit data set to 1
Usable device
Bit device Word device
Con-
stant
Pointer
X Y M L F BSB T SM VTCDRWSWZSDKH P
Digit
desig-
nation
Index
No. of
steps
S
{ { { { { { {
D
{ { { { { { {
{
4
SUM
Operation command
D
S
SUM
SUMP
SUMP DS
Setting data
D
Head No. of device
to count the total No.
of bits set to 1.
S
Head No. of device
where the total No. of
bits is stored.
Function
The total No. of bits that are set to 1 in the 16-bit data of the device designated with S is stored in D.
01
D after execution
1000100001 1111
16 bits
S before execution
000001000000 0000
B15……………………………………………B0
Total No. of "1" bits
The total No. of "1" bits is set in BIN.
(In this example, 8 is set.)
Execution conditions
The execution conditions for SUM, SUMP are as shown below.
Operation command OFF
SUM
ON
Executed per scan
Executed per scan
SUMP