Block Data Exchange; First/Last Byte Exchange - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.7.7 Block data exchange

n points of BIN 16-bit data, starting at the specified devices, are exchanged.
Function definition

5.7.8 First/last byte exchange

The first 8 bits and last 8 bits of the specified device are exchanged.
Function definition
5 - 36
BXCH_M
BOOL BXCH_M (BOOL EN, ANY16 n, ANY16 D1, ANY16 D2);
Argument Name
EN
n
D1
IN/ OUT
D2
IN/ OUT
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, 3 points of 16-bit data, starting at
(* D100, and 3 points of 16-bit data, starting at D200, are exchanged.
BXCH_M (X0, K3, D100, D200);
Corresponding MELSEC command
BXCH (Block 16-bit data exchange)
SWAP_MD
BOOL SWAP_MD (BOOL EN, ANY16 D);
Argument Name
EN
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the first 8 bits and last 8 bits of D0
(* are exchanged.
SWAP_MD (X0, D0);
Corresponding MELSEC command
SWAP (First/last byte exchange)
IN/OUT
Execution condition (Function is executed only when
IN
the result is TRUE)
IN
Number of data to be exchanged (BIN 16-bit data)
Data to be exchanged, exchange result (BIN 16-bit
data)
Data to be exchanged, exchange result (BIN 16-bit
data)
IN/OUT
Execution condition (Function is executed only when
IN
the result is TRUE)
Data to be exchanged, exchange result (BIN 16-bit
IN/OUT
data)
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 36

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents