5 - 65 5 - 65
5 MELSEC FUNCTIONS
5.14.13 Byte unit data connection BTOW_MD
The lower 8 bits of n points of BIN 16-bit data in and after the specified device are connected in word units.
Function definition
BOOL BTOW_MD (BOOL EN, ANY16 S1, ANY16 n, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1
IN
Data to be connected in byte units (BIN 16-bit data)
n
IN
Number of byte data to be connected (BIN 16-bit data)
D
OUT
Connection result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the lower 8 bits of iData2 words of
*)
(* 16-bit data in and after iData1 are connected in word units, and the result is
*)
(* stored into Result and later.
*)
BTOW_MD (X0, iData1, iData2, Result);
Corresponding MELSEC command
BTOW (Connection of byte unit data)
5.14.14 Data maximum value retrieval MAX_M
The maximum value is retrieved from n points of BIN 16-bit data, starting at the specified device.
Function definition
BOOL MAX_M (BOOL EN, ANY16 S1, ANY16 n, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1
IN
Head of data to be retrieved (BIN 16-bit data)
n
IN
Number of data to be retrieved (BIN 16-bit data)
D
OUT
Maximum value retrieval result (BIN 16-bit data)
Remarks: When a constant is specified for the timer set value, only a decimal number
can be specified.
The timer set value can be specified within the range 0 to 32767.
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the maximum value is retrieved
*)
(* from iData2 points of 16-bit BIN data in and after iData1,and the result is
*)
(* stored into Result. *
*)
MAX_M (X0, iData1, iData2, Result)
Corresponding MELSEC command
MAX (16-bit data maximum value retrieval)
For the usable data type, refer to "3.2.2 About
ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......