5 - 63 5 - 63
5 MELSEC FUNCTIONS
5.14.9 4-bit connection of 16-bit data UNI_M
The lower 4 bits of n points of BIN 16-bit data, starting at the specified device, are connected to the specified
device.
Function definition
BOOL UNI_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
Data to be connected (BIN 16-bit data)
n IN
Number of connected data (1 to 4) *0: No processing
(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 4 bits of 3 points of 16-bit
*)
(* data, starting at D100 are connected to Result.
*)
UNI_M (X0, D100, K3, Result);
Corresponding MELSEC command
UNI (4-bit connection of 16-bit data)
5.14.10 Bit disconnection of any data NDIS_M
The bits of the data stored in and after the specified device are disconnected in units of the specified bits.
Function definition
BOOL NDIS_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 disconnected (BIN 16-bit data)
S2 IN
Disconnection unit (number of bits to be disconnected)
(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 bits of the data stored in and
*)
(* after iData1 are disconnected in units of iData2 bits, and the result is stored
*)
(* into Result and later.
*)
NDIS_M (X0, iData1, iData2, Result);
Corresponding MELSEC command
NDIS (Disconnection of any bit data)
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: ......