Bit Check Of 16-Bit Data - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Bit check of 16-bit data

SUM(P)
These instructions store the total bits of 1 in the binary 16-bit data of the device specified by (s) to the device specified by (d).
Ladder diagram
(s)
(d)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Head device number that counts the total bits of 1
(d)
Head device number storing the total bits
■Applicable devices
Operand
Bit
X, Y, M, L,
U\G T, ST,
SM, F, B, SB
(s)
(d)
Processing details
• These instructions store the total bits of 1 in the binary 16-bit data of the device specified by (s) to the device specified by
(d).
b15
b8b7
(s)
1 1 0
0
1
0 1 1 0
0
1
1 0 0 0 1
Total of 1
b15
b8b7
(d)
0 0 0
0
0
0 0 0 0
0
0
0 1 0 0 0
• When all binary 16-bit data of the device specified by (s) are 0 (off), the zero flag M8020 turns on.
Precautions
While the command input is off, the instruction is not executed. The output of the number of bits in the on status is latched in
the previous status.
Operation error
There is no operation error.
Word
T, ST, C, D,
U\G
C, LC
W, SD, SW, R
b0
The total of 1 is stored in the binary data. (In the example shown on the left, the total is 8.)
b0
Structured text
ENO:=SUM(EN,s,d);
ENO:=SUMP(EN,s,d);
Range
Data type
16-bit signed binary
16-bit signed binary
Double word Indirect
specification
Z
LC
LZ
7 APPLICATION INSTRUCTION
Data type (label)
ANY16
ANY16
Constant
Others
K, H
E
$
7.17 Data operation instruction
7
551

Advertisement

Table of Contents
loading

Table of Contents