Bit Check; 32-Bit Data Bit Check - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.14.3 Bit check

The number of bits having 1 in the specified BIN 16-bit data is counted.
Function definition

5.14.4 32-bit data bit check

The number of bits having 1 in the specified BIN 32-bit data is counted.
Function definition
5 - 60
SUM_M
BOOL SUM_M (BOOL EN, ANY16 S1, ANY16 D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the number of bits having 1 in dData
(* is stored into Result.
SUM_M (X0, iData, Result);
Corresponding MELSEC command
SUM (16-bit data bit check)
DSUM_M
BOOL DSUM_M (BOOL EN);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the number of bits having 1
(* in iData is stored into Result.
DSUM_M (X0, dData, Result);
Corresponding MELSEC command
DSUM (32-bit data bit check)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be counted (BIN 16-bit data)
OUT
Count result (BIN 16-bit data)
IN/OUT
Execution condition (Function is executed only when
IN
the result is TRUE)
IN
Data to be counted (BIN 32-bit data)
OUT
Count result (BIN 16-bit data)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 60

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents