5 - 64 5 - 64
5 MELSEC FUNCTIONS
5.14.11 Bit connection of any data NUNI_M
The bits of the data stored in and after the specified device are connected in units of the specified bits.
Function definition
BOOL NUNI_M (BOOL EN, ANY16 S1, ANY16 S2, 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 (BIN 16-bit data)
S2 IN
Connection unit (number of bits 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 bits of the data stored in and after *)
(* iData1 are connected in units of iData2 bits, and the result is stored into
*)
(* Result and later.
*)
NUNI_M (X0, iData1, iData2, Result);
Corresponding MELSEC command
NUNI (Connection of any bit data)
5.14.12 Byte unit data disconnection WTOB_MD
The BIN 16-bit data stored in and after the specified device are disconnected into n bytes.
Function definition
BOOL WTOB_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 disconnected in byte units (BIN 16-bit data)
n
IN
Number of resultant byte data (BIN 16-bit data)
D
OUT
Disconnection result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the 16-bit data stored in and after
*)
(* iData1 is disconnected in iData2 bytes, and the result is stored into Result
*)
(* and later.
*)
WTOB_MD (X0, iData1, iData2, Result);
Corresponding MELSEC command
WTOB (Disconnection into byte unit data)
For the usable data type, refer to "3.2.2 About
ANY type".
Summary of Contents for MELSEC L series
Page 1: ...Programming Manual Structured Text ...
Page 2: ......
Page 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Page 297: ......