32-Bit Data Sort; Total Value Calculation - Mitsubishi MELSEC-q Programming Manual

Melsec q series; melsec l series
Hide thumbs Also See for MELSEC-q:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.14.19 32-bit data sort

n points of BIN 32-bit data, starting at the specified device, are sorted in ascending or descending order.
Function definition

5.14.20 Total value calculation

n points of BIN 16-bit data, starting at the specified device, are all added.
Function definition
5 - 68
DSORT_M
BOOL DSORT_M (BOOL EN, ANY32 S1, ANY16 n, ANY16 S2, BOOL D1, ANY16 D2);
Argument Name
EN
S1
n
S2
D1
D2
Remarks: Specify the sort order by turning ON/OFF SM703. When SM703 is OFF:
Ascending order, when SM703 is ON: Descending order
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, iData1 points of BIN 32-bit data,
(* starting at dData, are sorted in ascending or descending order.
DSORT_M (X0, dData, iData1, iData2, bData, iData3);
Corresponding MELSEC command
DSORT (32-bit data sort)
WSUM_M
BOOL WSUM_M (BOOL EN, ANY16 S1, ANY16 n, ANY32 D);
Argument Name
EN
S1
n
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, iData2 points of 16-bit BIN data,
(* starting at iData1, are all added, and the result is stored into Result.
WSUM_M (X0, iData1, iData2, Result);
Corresponding MELSEC command
WSUM (16-bit total value calculation)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Head of data to be sorted (BIN 32-bit data)
IN
Number of data to be sorted (BIN 16-bit data)
Number of data to be compared at one execution (BIN
IN
16-bit data)
OUT
Bit device to be turned ON at sort completion (bit data)
OUT
System used device (BIN 16-bit data)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data from which total value will be calculated (BIN 16-bit
IN
data)
IN
Number of data (BIN 16-bit data)
OUT
Total value storage destination (BIN 32-bit data)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 68

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents