4-Bit Connection Of 16-Bit Data; Bit Disconnection Of Any Data - Mitsubishi MELSEC-q Programming Manual

Melsec q series; melsec l series
Hide thumbs Also See for MELSEC-q:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.14.9 4-bit connection of 16-bit data

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

5.14.10 Bit disconnection of any data

The bits of the data stored in and after the specified device are disconnected in units of the specified bits.
Function definition
5 - 63
BOOL UNI_M (BOOL EN, ANY16 S1, ANY16 n, ANY16 D);
Argument Name
EN
S1
n
D
Return Value
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)
BOOL NDIS_M (BOOL EN, ANY16 S1, ANY16 S2, ANY16 D);
Argument Name
EN
S1
S2
D
Return Value
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)
UNI_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be connected (BIN 16-bit data)
Number of connected data (1 to 4) *0: No processing
IN
(BIN 16-bit data)
OUT
Connection result (BIN 16-bit data)
NDIS_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be disconnected (BIN 16-bit data)
Disconnection unit (number of bits to be disconnected)
IN
(BIN 16-bit data)
OUT
Disconnection result (BIN 16-bit data)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
*)
5 - 63

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents