Bit Test Of Word Device; Bit Test Of 32-Bit 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.13.3 Bit test of word device

The bit status in the specified position of the specified word device is written to the specified bit device.
Function definition

5.13.4 Bit test of 32-bit data

The bit in the specified position of the specified BIN 32-bit data is written to the specified bit device.
Function definition
5 - 57
TEST_MD
BOOL TEST_MD (BOOL EN, ANY16 S1, ANY 16 S2, BOOL D);
Argument Name
EN
S1
S2
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, M0 is turned ON/OFF
(* according to the status of bit 10 of D100.
TEST_MD (X0, D100, K10, M0);
Corresponding MELSEC command
TEST (Bit set)
DTEST_MD
BOOL DTEST_MD (BOOL EN, ANY32 S1, ANY16 S2,BOOL D);
Argument Name
EN
S1
S2
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, bit 10 in dData is fetched and
(* written to M0.
DTEST_MD (X0, dData, K10, M0);
Corresponding MELSEC command
DTEST (Bit set)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be extracted (BIN 16-bit data)
IN
Position of bit to be extracted (BIN 16-bit data)
OUT
Extracted data (bit data)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be extracted (BIN 32-bit data)
IN
Position of bit to be extracted (BIN 16-bit data)
OUT
Extracted data (bit data)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 57

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents