5 - 71 5 - 71
5 MELSEC FUNCTIONS
5.16 Buffer Memory Access
5.16.1 Intelligent function module 1-word data read FROM_M
The specified points of data are read from the specified address and later of the buffer memory in the specified
intelligent function module or special function module.
Function definition
BOOL FROM_M (BOOL EN, ANY16 n1, ANY16 n2, ANY16 n3, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
n1 IN
Head input number of specified intelligent function
module/special function module
*1
(BIN 16-bit data)
n2
IN
Head address of data to be read (BIN 16-bit data)
n3
IN
Number of data to be read (BIN 16-bit data)
D
OUT
Read data (BIN 16-bit data)
*1: Specified with the upper three digits when the head I/O number is expressed in 4
hexadecimal digits.
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, 1 word of data are read to D0 from
*)
(* address 10 and later of the buffer memory in the intelligent function module
*)
(* mounted at I/O numbers 040 to 05F.
*)
FROM_M (X0, H4, K10, K1, D0);
Corresponding MELSEC command
FROM (Reading 1-word data from the intelligent function module)
5.16.2 Intelligent function module 2-word data read DFRO_M
The specified points 2 of data are read from the specified address and later of the buffer memory in the
specified intelligent function module or special function module.
Function definition
BOOL DFRO_M (BOOL EN, ANY16 n1, ANY16 n2, ANY16 n3, ANY32 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
n1 IN
Head input number of specified intelligent function
module/special function module
*1
(BIN 16-bit data)
n2
IN
Head address of data to be read (BIN 16-bit data)
n3
IN
Number of data to be read (BIN 16-bit data)
D
OUT
Read data (BIN 32-bit data)
*1: Specified with the upper three digits when the head I/O number is expressed in 4
hexadecimal digits.
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, 2 words of data are read to DwResult *)
(* from addresses 602, 603 and later of the buffer memory in the intelligent
*)
(* function module mounted at I/O numbers 040 to 05F.
*)
DFRO_M (X0, H4, K602, K1, DwResult);
Corresponding MELSEC command
DFRO (Reading 2-word data from the intelligent function module)
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: ......