32-Bit Data Minimum Value Retrieval; Data Sort - 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.17 32-bit data minimum value retrieval

The minimum value is retrieved from n points of BIN 32-bit data, starting at the specified device.
Function definition

5.14.18 Data sort

n points of BIN 16-bit data, starting at the specified device, are sorted in ascending or descending order.
Function definition
5 - 67
BOOL DMIN_M (BOOL EN, ANY32 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, the minimum value is retrieved from
(* iData points of 32-bit BIN data in and after dData, and the result is stored
(* into Result and Result+1.
DMIN_M (X0, dData, iData, Result);
Corresponding MELSEC command
DMIN (32-bit data minimum value retrieval)
SORT_M
BOOL SORT_M (BOOL EN, ANY16 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, iData2 points of BIN 16-bit data,
(* starting at iData1, are sorted in ascending or descending order.
SORT_M (X0, iData1, iData2, iData3, bData, iData4);
Corresponding MELSEC command
SORT (16-bit data sort)
DMIN_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Head of data to be retrieved (BIN 32-bit data)
IN
Number of data to be retrieved (BIN 16-bit data)
OUT
Minimum value retrieval result (BIN 32-bit data)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Head of data to be sorted (BIN 16-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)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
*)
5 - 67

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents